Marcus Rohrmoser 3 months ago
parent
commit
37faff9555

+ 2 - 2
config.yaml

@@ -1,5 +1,5 @@
 ---
-url: https://mro.name/blog/
+baseUrl: https://mro.name/blog/
 title: MRo Blog
 languageCode: de
 theme: xmin-mro
@@ -17,7 +17,7 @@ params:
 <br/> [🔗](https://links.mro.name/)
 | [🔏](https://pastebin.mro.name/)
 | [![QR](/wp-content/uploads/2019/01/qrcode.png)](https://qr.mro.name/)
-| [📰](https://news.mro.name)
+| [🗞](https://news.mro.name)
 | [📻](http://rec.mro.name/stations/b2/now)
 | [🌦](http://wetter.mro.name/)
 | [🐳](https://wiki.mro.name/)

+ 11 - 29
content/posts/2008-10-04-cldc-10-und-midp-10-in-eclipseme.md

@@ -5,52 +5,34 @@ type: post
 date: 2008-10-04T21:22:39+00:00
 url: /2008/10/cldc-10-und-midp-10-in-eclipseme/
 yourls_shorturl:
-  - http://s.mro.name/22
-language: de
+- http://s.mro.name/22
 categories:
+- de
 - development
 tags:
-  - 6610
-  - CLDC
-  - EclipseME
-  - J2ME
-  - MIDP
-  - Nokia
+- 6610
+- CLDC
+- EclipseME
+- J2ME
+- MIDP
+- Nokia
 
 ---
 da das [Nokia 6610][1] schon ein recht betagtes Mobilfon ist und nur CLDC 1.0 und MIDP 1.0 unterstützt, sollte das im &#8222;Eclipse > Window > Preferences > J2ME > Device Management&#8220; eingestellt werden.
 
 Ich habe also das &#8222;DefaultColorPhone&#8220; unter Beibehaltung des Namens (sic!) geklont (duplicate):
 
-<div id="attachment_76" style="width: 310px" class="wp-caption aligncenter">
-  <a href="http://blog.mro.name/wp-content/2008/10/preferences_j2me_device_management.png"><img class="size-medium wp-image-76" title="preferences_j2me_device_management" src="http://blog.mro.name/wp-content/2008/10/preferences_j2me_device_management-300x206.png" alt="J2ME Device Management" width="300" height="206" /></a>
-  
-  <p class="wp-caption-text">
-    J2ME Device Management
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2008/10/preferences_j2me_device_management.png" title="J2ME Device Management" >}}
 
 und wie folgt eingestellt:
 
-<div id="attachment_75" style="width: 310px" class="wp-caption aligncenter">
-  <a href="http://blog.mro.name/wp-content/2008/10/edit_defaultcolorphone_definition.png"><img class="size-medium wp-image-75" title="edit_defaultcolorphone_definition" src="http://blog.mro.name/wp-content/2008/10/edit_defaultcolorphone_definition-300x287.png" alt="Edit DefaultColorPhone Definition" width="300" height="287" /></a>
-  
-  <p class="wp-caption-text">
-    Edit DefaultColorPhone Definition
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2008/10/edit_defaultcolorphone_definition.png" title="Edit DefaultColorPhone Definition" >}}
 
 Anschließend läßt sich per &#8222;Eclipse > File > New > Project > J2ME > Midlet Suite&#8220; ein neues Projekt anlegen.
 
 Vorsicht, daß auch wirklich das richtige DefaultColorPhone mit den richtigen CLDC und MIDP jars zugeordnet ist:
 
-<div id="attachment_77" style="width: 310px" class="wp-caption aligncenter">
-  <a href="http://blog.mro.name/wp-content/2008/10/firstnokia6610projectpackageexplorer.png"><img class="size-medium wp-image-77" title="firstnokia6610projectpackageexplorer" src="http://blog.mro.name/wp-content/2008/10/firstnokia6610projectpackageexplorer-300x280.png" alt="Package Explorer Ansicht" width="300" height="280" /></a>
-  
-  <p class="wp-caption-text">
-    Package Explorer Ansicht
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2008/10/firstnokia6610projectpackageexplorer.png" title="Package Explorer Ansicht" >}}
 
 Und schon kann's losgehen!
 

+ 2 - 2
content/posts/2009-02-18-lftp-osx-dmg.md

@@ -6,8 +6,8 @@ date: 2009-02-18T12:19:22+00:00
 url: /2009/02/lftp-osx-dmg/
 yourls_shorturl:
 - http://s.mro.name/3g
-language: de
 categories:
+- de
 - sysadmin
 tags:
 - FTP
@@ -18,7 +18,7 @@ tags:
 Da's für [lftp][1] zwar einen [Darwinport][2] gibt, aber kein [Disk Image][3] (was unbedarfte Seelen durchaus von der Installation abhalten kann), habe ich ein solches gebaut und hier zum
 
 <p style="text-align: center;">
-  <strong><a href="/wp-content/2009/02/lftp-376-1.dmg">Download lftp-3.7.6-1.dmg<br /> </a></strong>
+  <strong><a href="/wp-content/uploads/2009/02/lftp-376-1.dmg">Download lftp-3.7.6-1.dmg<br /> </a></strong>
 </p>
 
 verlinkt. Leider ist das Binary nicht statisch gelinkt, drum hat das ganze wenig Sinn. Details siehe unten im &#8222;Nachtrag&#8220;.

File diff suppressed because it is too large
+ 59 - 57
content/posts/2009-03-01-wordpress-plugin-fur-ted-filme.md


+ 8 - 20
content/posts/2009-03-06-iphone-safari-mobi-magic.md

@@ -5,13 +5,13 @@ type: post
 date: 2009-03-06T21:51:47+00:00
 url: /2009/03/iphone-safari-mobi-magic/
 yourls_shorturl:
-  - http://s.mro.name/23
-language: en
+- http://s.mro.name/23
 categories:
-  - development
+- en
+- development
 tags:
-  - iPhone
-  - Safari
+- iPhone
+- Safari
 
 ---
 Several weeks I was puzzling about a [mystical rendering difference of bitwise identical html documents][1]. The [official documentation][2] sadly wasn't too helpful, but [this post][3] finally solved it:
@@ -20,22 +20,10 @@ Several weeks I was puzzling about a [mystical rendering difference of bitwise i
 
 Isn't that nuts? Many thanks to Christopher for enlightening this obscure fact.
 
-<div id="attachment_783" style="width: 190px" class="wp-caption alignleft">
-  <img class="size-thumbnail wp-image-783" title="iphone-html-mobi" src="http://blog.mro.name/wp-content/2009/03/bild-7.png" alt="iphone-html-mobi" width="180" />
-  
-  <p class="wp-caption-text">
-    .mobi
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2009/03/bild-7.png" title=".mobi" >}}
 
-<div id="attachment_784" style="width: 190px" class="wp-caption alignright">
-  <img class="size-thumb wp-image-784" title="iphone-html-name" src="http://blog.mro.name/wp-content/2009/03/bild-9.png" alt="iphone-html-name" width="180" />
-  
-  <p class="wp-caption-text">
-    non .mobi
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2009/03/bild-9.png" title="non .mobi" >}}
 
  [1]: http://alsw.mobi/zoom.html
  [2]: http://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/chapter_4_section_7.html
- [3]: http://groups.google.com/group/iphonewebdev/msg/c0a36a4993d0f8f2
+ [3]: http://groups.google.com/group/iphonewebdev/msg/c0a36a4993d0f8f2

+ 98 - 97
content/posts/2009-03-31-transfer-phone-numbers-from-gammu-to-the-mac-adressbook.md

@@ -5,113 +5,114 @@ type: post
 date: 2009-03-31T13:34:28+00:00
 url: /2009/03/transfer-phone-numbers-from-gammu-to-the-mac-adressbook/
 yourls_shorturl:
-  - http://s.mro.name/1c
-
-language: en
+- http://s.mro.name/1c
 categories:
-  - sysadmin
+- en
+- sysadmin
 tags:
-  - 6610
-  - Addressbook
-  - gammu
-  - Nokia
-  - OS X
-  - Ruby
-  - vCard
+- 6610
+- Addressbook
+- gammu
+- Nokia
+- OS X
+- Ruby
+- vCard
 
 ---
 ok, make yourself comfortable, fasten your seatbelt and stop smoking. This will be quite a journey:
 
 <!--more-->
 
-  1. Get [gammu][1] and backup the phone data:
-  
-    `$ gammu backup phonedata.txt -yes`
-  2. open `phonedata.txt` and save it in &#8222;MacRoman&#8220; encoding with Unix line endings
-  3. run it through this [ruby][2] script: <pre lang="ruby">#!/usr/bin/ruby -w -- 
-
-# http://www.rubycentral.com/pickaxe/
-# http://homepage.mac.com/phrogz/CSV2vCard_v2.html
-
-records = {}
-fields = {}
-
-eor = /^[ \t]*$/
-bor = /^\[([^0-9\]]+)([0-9]*)\]$/
-etype = /^Entry([0-9]+)Type\s+=\s+(\S+)$/
-etext = /^Entry([0-9]+)Text\s+=\s+"(.*)"/
-
-record_type = nil
-entry_type = nil
-tmp = nil
-
-$stdin.each do |l|
-	if (eor =~ l) == 0
-		records[record_type] = [] if records[record_type].nil?
-		records[record_type] &lt;&lt; tmp if tmp
-#		puts '-- EOR --'
-		record_type = entry_type = tmp = nil
-		next
-	end
-	m = bor.match l
-	if m
-#		puts "#{m[1]} - #{m[2]}"
-		record_type = "#{m[1]}"
-		tmp = {}
-		next
-	end
-	if 'PhonePBK' == record_type
-		m = etype.match l
-#		raise "Parse Error: #{l}" if entry_type.nil? && m.nil?
-		if m
-			entry_type = "#{m[2]}"
-		else
-			m = etext.match l
-			if m
-				raise 'Parse Error' if entry_type.nil?
-				if 'Name' == entry_type
-					name = "#{m[2]}".split ' '
-					tmp[entry_type = 'LastName'] = "#{name[name.length-1]}"
-					fields[entry_type] = entry_type
-					name[name.length-1] = nil
-					name.compact!
-
-					count = 0
-					name.each do |tn|
-						tmp[entry_type = "Name_#{count}"] = tn
-						fields[entry_type] = entry_type
-						count += 1
-					end
-				else
-					fields[entry_type] = entry_type
-#					puts "#{entry_type} = #{m[2]}"
-					tmp[entry_type] = "#{m[2]}"
-				end
-				entry_type = nil
-			end
-		end
-	end
-end
-
-keys = fields.keys.sort
-sep = ','
-puts "\##{keys.join(sep)}"
-records['PhonePBK'].each do |item|
-	tmp = ''
-	keys.each do |key|
-		v = item[key]
-		v = '' if v.nil?
-		v.gsub! "'", "''"
-		tmp = "#{tmp}'#{v}'#{sep}"
-	end
-	puts tmp
-end</pre>
+1. Get [gammu][1] and backup the phone data:  
+   `$ gammu backup phonedata.txt -yes`
+2. open `phonedata.txt` and save it in &#8222;MacRoman&#8220; encoding with Unix line endings
+3. run it through this [ruby][2] script:
+
+```ruby
+#!/usr/bin/ruby -w -- 
+
+# http://www.rubycentral.com/pickaxe/
+# http://homepage.mac.com/phrogz/CSV2vCard_v2.html
+
+records = {}
+fields = {}
+
+eor = /^[ \t]*$/
+bor = /^\[([^0-9\]]+)([0-9]*)\]$/
+etype = /^Entry([0-9]+)Type\s+=\s+(\S+)$/
+etext = /^Entry([0-9]+)Text\s+=\s+"(.*)"/
+
+record_type = nil
+entry_type = nil
+tmp = nil
+
+$stdin.each do |l|
+  if (eor =~ l) == 0
+    records[record_type] = [] if records[record_type].nil?
+    records[record_type] << tmp if tmp
+#   puts '-- EOR --'
+    record_type = entry_type = tmp = nil
+    next
+  end
+  m = bor.match l
+  if m
+#   puts "#{m[1]} - #{m[2]}"
+    record_type = "#{m[1]}"
+    tmp = {}
+    next
+  end
+  if 'PhonePBK' == record_type
+    m = etype.match l
+#   raise "Parse Error: #{l}" if entry_type.nil? && m.nil?
+    if m
+      entry_type = "#{m[2]}"
+    else
+      m = etext.match l
+      if m
+        raise 'Parse Error' if entry_type.nil?
+        if 'Name' == entry_type
+          name = "#{m[2]}".split ' '
+          tmp[entry_type = 'LastName'] = "#{name[name.length-1]}"
+          fields[entry_type] = entry_type
+          name[name.length-1] = nil
+          name.compact!
+
+          count = 0
+          name.each do |tn|
+            tmp[entry_type = "Name_#{count}"] = tn
+            fields[entry_type] = entry_type
+            count += 1
+          end
+        else
+          fields[entry_type] = entry_type
+#         puts "#{entry_type} = #{m[2]}"
+          tmp[entry_type] = "#{m[2]}"
+        end
+        entry_type = nil
+      end
+    end
+  end
+end
 
-  4. run the result through a [csv to vcard converter][3],
-  5. remove all single quotes `'` from the vcards,
-  6. import the vcards into the osx addressbook.
+keys = fields.keys.sort
+sep = ','
+puts "\##{keys.join(sep)}"
+records['PhonePBK'].each do |item|
+  tmp = ''
+  keys.each do |key|
+    v = item[key]
+    v = '' if v.nil?
+    v.gsub! "'", "''"
+    tmp = "#{tmp}'#{v}'#{sep}"
+  end
+  puts tmp
+end
+```
+4. run the result through a [csv to vcard converter][3],
+5. remove all single quotes `'` from the vcards,
+6. import the vcards into the osx addressbook.
 
-And guess what &#8211; that really works! The script is quite a hack but does the job. I thought about rewriting it using closures prior publishing but left it as a homework to you.
+And guess what  that really works! The script is quite a hack but does the job. I thought about rewriting it using closures prior publishing but left it as a homework to you.
 
 [**Update**] Maybe [iSync][4] would have done the trick, too.
 

+ 19 - 17
content/posts/2009-06-02-billiger-vserver-als-git-server.md

@@ -5,37 +5,39 @@ type: post
 date: 2009-06-02T17:59:19+00:00
 url: /2009/06/billiger-vserver-als-git-server/
 yourls_shorturl:
-  - http://s.mro.name/i
-language: de
+- http://s.mro.name/i
 categories:
+- de
 - sysadmin
 tags:
-  - git
-  - gitosis
-  - Hosting
-  - vServer
+- git
+- gitosis
+- Hosting
+- vServer
 
 ---
 An [git][1] finde ich u.a. großartig, daß es so unkompliziert zu hosten ist (auf einem lokalen Filesystem, auf [http (readonly), ftp oder webdav Shares][2], per [gitosis (ssh getunnelt)][3], als [eigener (readonly) Dienst][4] oder ganz [ohne Server via Mail][5]).
 
 <!--more-->
 
-
-  
 Ich benutze einen [10 EUR vServer][6] mit relativ wenig RAM als (gitosis) Server. Nun habe ich doch einige Repositories mit umfänglicher Geschichte oder z.T. riesigen Dateien, so daß mancher
 
-<pre>$ git clone &lt;repo-url&gt;</pre>
+```bash
+$ git clone <repo-url>
+```
 
 speicherbedingt die Grätsche macht. [Folgende Einträge][7] in der serverseitigen `.git/config` bzw. `~/.gitconfig` schaffen Abhilfe:
 
-<pre># http://kerneltrap.org/mailarchive/git/2008/8/11/2889364
-[core]
-    packedGitWindowSize = 16m
-    packedGitLimit = 64m
-[pack]
-    threads = 1
-    windowMemory = 64m
-    deltaCacheSize = 1m</pre>
+```git
+# http://kerneltrap.org/mailarchive/git/2008/8/11/2889364
+[core]
+    packedGitWindowSize = 16m
+    packedGitLimit = 64m
+[pack]
+    threads = 1
+    windowMemory = 64m
+    deltaCacheSize = 1m
+```
 
  [1]: http://git-scm.com/
  [2]: http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS

+ 11 - 21
content/posts/2009-06-21-coredata-hello-world.md

@@ -23,41 +23,31 @@ Also los geht's zum ersten Schritt:
 
 <!--more-->
   
-1. Ein leeres Projekt
+## 1. Ein leeres Projekt
 
 Nachdem iPhone SDK 3.0 installiert ist: &#8222;XCode -> File -> New Project&#8220; mit &#8222;Use Core Data for storage&#8220; Häkchen&#8220;:
 
-<div id="attachment_989" style="width: 410px" class="wp-caption aligncenter">
-  <img class="aligncenter wp-image-989" title="xcode-new-coredata-project" src="http://blog.mro.name/wp-content/2009/06/bild-5.png" alt="Neues Projekt mit CoreData Unterstützung" width="400" />
-  
-  <p class="wp-caption-text">
-    Neues Projekt mit CoreData Unterstützung
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2009/06/bild-5.png" title="Neues Projekt mit CoreData Unterstützung" >}}
 
 Der Application Delegate enthält dann gleich eine ganze Menge Code zur Verwaltung der Datenquelle, u.a. mit
 
-<pre lang="objc">NSURL *storeUrl = [NSURL fileURLWithPath:
-[[self applicationDocumentsDirectory]
-stringByAppendingPathComponent: @"CoreDataDemo.sqlite"]];</pre>
+```objc
+NSURL *storeUrl = [NSURL fileURLWithPath:
+[[self applicationDocumentsDirectory]
+stringByAppendingPathComponent: @"CoreDataDemo.sqlite"]];
+```
 
 den Namen der sqlite DB Datei, in die gespeichert werden soll.
 
-2. Das Schema
+## 2. Das Schema
 
-<div id="attachment_993" style="width: 410px" class="wp-caption aligncenter">
-  <img class="aligncenter wp-image-993" title="new-coredata-schema" src="http://blog.mro.name/wp-content/2009/06/bild-6.png" alt="Ein neues CoreData Schema" width="400" /> 
-  
-  <p class="wp-caption-text">
-    Ein neues CoreData Schema
-  </p>
-</div>
+{{< figure src="/wp-content/uploads/2009/06/bild-6.png" title="Ein neues CoreData Schema" >}}
 
 und sollte so heißen wie die DB oben.
 
-3. Zugriffe
+## 3. Zugriffe
 
-Siehe [Core Data Programming Guide &#8211; Fetching Managed Objects][4].
+Siehe [Core Data Programming Guide – Fetching Managed Objects][4].
 
 Damit die Beispiel-Zugriffe Sinn ergeben, muß das Schema eine Entity &#8222;Employee&#8220; mit Attributen &#8222;lastName&#8220; (String) und &#8222;salary&#8220; (Numeric) enthalten.
 

+ 24 - 26
content/posts/2009-06-27-x11-quertz.md

@@ -5,43 +5,41 @@ type: post
 date: 2009-06-27T11:17:23+00:00
 url: /2009/06/x11-quertz/
 yourls_shorturl:
-  - http://s.mro.name/3c
-
-language: de
+- http://s.mro.name/3c
 categories:
+- de
 - sysadmin
 tags:
-  - gentoo
-  - HAL
-  - Linux
-  - Quertz
-  - Tastatur
-  - X11
+- gentoo
+- HAL
+- Linux
+- Quertz
+- Tastatur
+- X11
 
 ---
 Seltsamerweise hat mein [gentoo Rechner][1] vergessen, daß eine [Quertz][2]-Tastatur dranhängt.
 
 <!--more-->
 
-
-  
 Die `/etc/hal/fdi/policy/10-xinput-configuration.fdi` Konfig-Datei hat komplett gefehlt; also wie [hier beschrieben][3]
 
-<pre lang="xml">&lt; ?xml version="1.0" encoding="UTF-8"?>
-<!--
-Section "InputDevice"
-   Driver "evdev"
-   Option "XkbLayout" "de"
-EndSection
--->
-
-&lt;deviceinfo version="0.2">
-   &lt;match key="info.capabilities" contains="input.keyboard">
-      &lt;merge key="input.x11_options.XkbLayout" type="string">de&lt;/merge>
-      &lt;merge key="input.x11_options.XkbVariant" type="string">nodeadkeys&lt;/merge>
-   &lt;/match>
-&lt;/deviceinfo>
-</pre>
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Section "InputDevice"
+   Driver "evdev"
+   Option "XkbLayout" "de"
+EndSection
+-->
+
+<deviceinfo version="0.2">
+   <match key="info.capabilities" contains="input.keyboard">
+      <merge key="input.x11_options.XkbLayout" type="string">de</merge>
+      <merge key="input.x11_options.XkbVariant" type="string">nodeadkeys</merge>
+   </match>
+</deviceinfo>
+```
 
 eingetragen und alle sind glücklich.
 

+ 4 - 8
content/posts/2011-03-22-randnotiz-die-bayerische-fruehgotik-und-der-islam.md

@@ -9,8 +9,8 @@ yourls_shorturl:
 - http://mro.name/45
 yourls_tweeted:
 - 1
-language: de
 categories:
+- de
 - offtopic
 tags:
 - Bayern
@@ -28,14 +28,12 @@ tags:
 - Lederhose
 - Mathematik
 - Rant
-- 😡
-- 🇩🇪
 - Ziffern
 ---
 Neulich war ich auf der [Burg zu Burghausen][1]<sup>1</sup> und entdeckte auf einem der ältesten Bilder (eine Schutzmantelmadonna) im Palas eine merkwürdige Aufschrift:
 
 <p style="text-align: center;">
-  <a href="/wp-content/uploads/2011/03/Aufschrift-auf-Schutzmantelmadonna-im-Palas-der-Burg-zu-Burghausen.jpg"><img class="aligncenter" title="Aufschrift auf Schutzmantelmadonna im Palas der Burg zu Burghausen" src="/wp-content/uploads/2011/03/Aufschrift-auf-Schutzmantelmadonna-im-Palas-der-Burg-zu-Burghausen.jpg" alt="" width="440" height="151" /></a>
+  <a href=""><img class="aligncenter" title="" src="/wp-content/uploads/2011/03/Aufschrift-auf-Schutzmantelmadonna-im-Palas-der-Burg-zu-Burghausen.jpg" alt="" width="440" height="151" /></a>
 </p>
 
 <!--more-->
@@ -73,11 +71,9 @@ Eine zackige Wikipedia Recherche ergab:
 
 <http://www.zeit.de/politik/deutschland/2011-03/innenminister-islam-friedrich>
 
-&nbsp;
-
+<p style="text-align: center">
 * * *
-
-&nbsp;
+</p>
 
 ## Quellen
 

+ 30 - 28
content/posts/2015-08-03-autolayout-change-constraint-multiplier.md

@@ -4,39 +4,41 @@ author: Marcus Rohrmoser
 type: post
 date: 2015-08-03T06:42:40+00:00
 url: /2015/08/autolayout-change-constraint-multiplier/
-
-language: en
 categories:
-  - development
+- en
+- development
 tags:
-  - Apple
-  - Autolayout
-  - iOS
-  - NSLayoutConstraint
-  - Objective C
+- Apple
+- Autolayout
+- iOS
+- NSLayoutConstraint
+- Objective C
 
 ---
-the `<a href="https://developer.apple.com/library/ios/documentation/AppKit/Reference/NSLayoutConstraint_Class/#//apple_ref/occ/instp/NSLayoutConstraint/multiplier">NSLayoutConstraint multiplier</a>` property is read-only. But if you need to change it, you can replace the constraint with a modified clone like
+the [NSLayoutConstraint multiplier](https://developer.apple.com/library/ios/documentation/AppKit/Reference/NSLayoutConstraint_Class/#//apple_ref/occ/instp/NSLayoutConstraint/multiplier) property is read-only. But if you need to change it, you can replace the constraint with a modified clone like
 
-<pre lang="objc">@implementation NSLayoutConstraint(ChangeMultiplier)
-// visal form center http://stackoverflow.com/a/13148012/349514
--(NSLayoutConstraint *)constraintWithMultiplier:(CGFloat)multiplier
-{
-  return [NSLayoutConstraint
-    constraintWithItem:self.firstItem
-    attribute:self.firstAttribute
-    relatedBy:self.relation
-    toItem:self.secondItem
-    attribute:self.secondAttribute
-    multiplier:multiplier
-    constant:self.constant];
-}
-@end</pre>
+```objc
+@implementation NSLayoutConstraint(ChangeMultiplier)
+// visal form center http://stackoverflow.com/a/13148012/349514
+-(NSLayoutConstraint *)constraintWithMultiplier:(CGFloat)multiplier
+{
+  return [NSLayoutConstraint
+    constraintWithItem:self.firstItem
+    attribute:self.firstAttribute
+    relatedBy:self.relation
+    toItem:self.secondItem
+    attribute:self.secondAttribute
+    multiplier:multiplier
+    constant:self.constant];
+}
+@end
+```
 
 and replace it like
 
-<pre lang="objc">NSLayoutConstraint *c = [self.constraintToChange constraintWithMultiplier:0.75];
-  [self.view removeConstraint:self.constraintToChange];
-  [self.view addConstraint:self.constraintToChange = c];
-  [self.view layoutIfNeeded];
-</pre>
+```objc
+NSLayoutConstraint *c = [self.constraintToChange constraintWithMultiplier:0.75];
+  [self.view removeConstraint:self.constraintToChange];
+  [self.view addConstraint:self.constraintToChange = c];
+  [self.view layoutIfNeeded];
+```

+ 76 - 76
content/posts/2015-08-24-mktileoverlay-with-gdal2tiles-or-other-tms-tiles.md

@@ -4,92 +4,92 @@ author: Marcus Rohrmoser
 type: post
 date: 2015-08-24T06:42:41+00:00
 url: /2015/08/mktileoverlay-with-gdal2tiles-or-other-tms-tiles/
-
-language: en
 categories:
-  - development
+- en
+- development
 tags:
-  - gdal
-  - gdal2tiles
-  - iOS
-  - Map
-  - MKTileOverlay
-  - Overlay
-  - Tile
+- gdal
+- gdal2tiles
+- iOS
+- Map
+- MKTileOverlay
+- Overlay
+- Tile
 
 ---
-from iOS 7.0 onward there's the neat `<a href="https://developer.apple.com/library/prerelease/mac/documentation/MapKit/Reference/MKTileOverlay_class/#//apple_ref/occ/instm/MKTileOverlay/initWithURLTemplate:">MKTileOverlay::initWithURLTemplate:</a>` for tiled overlay maps.
+from iOS 7.0 onward there's the neat [MKTileOverlay::initWithURLTemplate:](https://developer.apple.com/library/prerelease/mac/documentation/MapKit/Reference/MKTileOverlay_class/#//apple_ref/occ/instm/MKTileOverlay/initWithURLTemplate:) for tiled overlay maps.
 
 Sadly it can't display old-school [Tile Map Service][1] maps as e.g. produced by [gdal2tiles.py][2]<sup>1)</sup> because the y-values are flipped upside down. The [OSM Wiki][3] says about this fact: _&#8222;This is really just an unfortunate historical misalignment.&#8220;_
 
-But with the drop-in `<a href="https://developer.apple.com/library/prerelease/mac/documentation/MapKit/Reference/MKTileOverlay_class/">MKTileOverlay</a>` replacement below, you can use flipped geometries and add `{-y}` in the URL template to indicate such:
+But with the drop-in [MKTileOverlay](https://developer.apple.com/library/prerelease/mac/documentation/MapKit/Reference/MKTileOverlay_class/) replacement below, you can use flipped geometries and add `{-y}` in the URL template to indicate such:
 
 <!--more-->
 
-<pre lang="objc">#import &lt;MapKit/MKTileOverlay.h&gt;
-// Copyright (c) 2015 Marcus Rohrmoser http://mro.name/me. All rights reserved.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
-
-// interface unchanged
-@interface MKTileOverlayOSMorTMS : MKTileOverlay
-@end
-
-/**
- * OSM: http://wiki.openstreetmap.org/w/index.php?title=Slippy_map_tilenames&oldid=1201902#X_and_Y
- * TSM: http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification
- *
- * http://wiki.openstreetmap.org/w/index.php?title=Slippy_map_tilenames&oldid=1201902#Tile_numbers_to_lat..2Flon._.2F_Coordinates_to_tile_numbers_.2F_Sample_of_usage.2C_with_optional_tms-format_support
- * const MKTileOverlayPath p0 = { x : 70406, y : 42987, z:17 };
- * const MKTileOverlayPath p1 = convertYfromOSMtoTMS(p0);
- * assert(88084 == p1.y && "");
- */
-static inline MKTileOverlayPath convertYfromOSMtoTMS(MKTileOverlayPath path)
-{
-  assert( (1 &lt;&lt; path.z) == (NSInteger)pow(2, path.z) && "oops, pow failed" );
-  path.y = (1 &lt;&lt; path.z) - 1 - path.y;
-  return path;
-}
-
-@implementation MKTileOverlayOSMorTMS
-
-/** Detect `{-y}` in case and set `geometryFlipped` accordingly.
- */
--(instancetype)initWithURLTemplate:(NSString *)URLTemplate
-{
-  NSString *t = [URLTemplate stringByReplacingOccurrencesOfString:@"{-y}" withString:@"{y}"];
-  if( self = [super initWithURLTemplate:t] ) {
-    // NSParameterAssert(256.0f == self.tileSize.width);
-    NSParameterAssert(256.0f == self.tileSize.height);
-    NSParameterAssert(t.length == URLTemplate.length || t.length + 1 == URLTemplate.length);
-    self.geometryFlipped = t.length &lt; URLTemplate.length;
-  }
-  return self;
-}
-
--(NSURL *)URLForTilePath:(MKTileOverlayPath)path
-{
-  if( self.geometryFlipped ) {
-    // NSParameterAssert(256.0f == self.tileSize.width);
-    NSParameterAssert(256.0f == self.tileSize.height);
-    path = convertYfromOSMtoTMS(path);
-  }
-  MRLogD(@"%ld,%ld,%ld", (long)path.z, (long)path.x, (long)path.y, nil);
-  return [super URLForTilePath:path];
-}
-@end
-</pre>
+```objc
+#import <MapKit/MKTileOverlay.h>
+// Copyright (c) 2015 Marcus Rohrmoser http://mro.name/me. All rights reserved.
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+// interface unchanged
+@interface MKTileOverlayOSMorTMS : MKTileOverlay
+@end
+
+/**
+ * OSM: http://wiki.openstreetmap.org/w/index.php?title=Slippy_map_tilenames&oldid=1201902#X_and_Y
+ * TSM: http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification
+ *
+ * http://wiki.openstreetmap.org/w/index.php?title=Slippy_map_tilenames&oldid=1201902#Tile_numbers_to_lat..2Flon._.2F_Coordinates_to_tile_numbers_.2F_Sample_of_usage.2C_with_optional_tms-format_support
+ * const MKTileOverlayPath p0 = { x : 70406, y : 42987, z:17 };
+ * const MKTileOverlayPath p1 = convertYfromOSMtoTMS(p0);
+ * assert(88084 == p1.y && "");
+ */
+static inline MKTileOverlayPath convertYfromOSMtoTMS(MKTileOverlayPath path)
+{
+  assert( (1 << path.z) == (NSInteger)pow(2, path.z) && "oops, pow failed" );
+  path.y = (1 << path.z) - 1 - path.y;
+  return path;
+}
+
+@implementation MKTileOverlayOSMorTMS
+
+/** Detect `{-y}` in case and set `geometryFlipped` accordingly.
+ */
+-(instancetype)initWithURLTemplate:(NSString *)URLTemplate
+{
+  NSString *t = [URLTemplate stringByReplacingOccurrencesOfString:@"{-y}" withString:@"{y}"];
+  if( self = [super initWithURLTemplate:t] ) {
+    // NSParameterAssert(256.0f == self.tileSize.width);
+    NSParameterAssert(256.0f == self.tileSize.height);
+    NSParameterAssert(t.length == URLTemplate.length || t.length + 1 == URLTemplate.length);
+    self.geometryFlipped = t.length < URLTemplate.length;
+  }
+  return self;
+}
+
+-(NSURL *)URLForTilePath:(MKTileOverlayPath)path
+{
+  if( self.geometryFlipped ) {
+    // NSParameterAssert(256.0f == self.tileSize.width);
+    NSParameterAssert(256.0f == self.tileSize.height);
+    path = convertYfromOSMtoTMS(path);
+  }
+  MRLogD(@"%ld,%ld,%ld", (long)path.z, (long)path.x, (long)path.y, nil);
+  return [super URLForTilePath:path];
+}
+@end
+```
 
 <sup>1)</sup> see also the debian package [python-gdal][4] or the webpage of [Petr Přidal, the author of gdal2tiles][5] with a hint to it's [commercial successor][6].
 

+ 4 - 3
content/posts/2019-01-23-a-new-blog.md

@@ -11,6 +11,7 @@ tags:
 - hugo
 ---
 
-finally I am making a first step towards a static site. 
-I decided to wait no longer and rather drop features (e.g. comments, sigh)
-and start minimal.
+finally I am making a first step towards a static hugo site.
+
+I decided to wait no longer and rather drop features (for now e.g. comments, sigh)
+and start minimal.

BIN
static/wp-content/uploads/2019/01/qrcode.png