Congratulations!

[Valid Atom 1.0] This is a valid Atom 1.0 feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://root42.blogspot.com/feeds/posts/default

  1. <?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8130446119807415263</id><updated>2024-02-19T07:46:34.737+01:00</updated><category term="coding"/><category term="OS X"/><category term="Linux"/><category term="Emacs"/><category term="UNIX"/><category term="Python"/><category term="iPhone"/><category term="Raspberry Pi"/><category term="Lisp"/><category term="Apple"/><category term="LaTeX"/><category term="OSX"/><category term="Qt"/><category term="git"/><category term="XCode"/><category term="bash"/><category term="c++"/><category term="Debian"/><category term="OpenGL"/><category term="development"/><category term="eMail"/><category term="iOS"/><category term="iPad"/><category term="tmux"/><category term="web"/><category term="Clojure"/><category term="Google"/><category term="NVIDIA"/><category term="games"/><category term="java"/><category term="objective c"/><category term="Blender"/><category term="Bug"/><category term="CLang"/><category term="CUDA"/><category term="GNU"/><category term="MacPorts"/><category term="Matlab"/><category term="MobileMe"/><category term="Music"/><category term="Network"/><category term="Printing"/><category term="REST"/><category term="SSH"/><category term="Typo3"/><category term="Ubuntu"/><category term="WiFi"/><category term="X11"/><category term="astronomy"/><category term="boost"/><category term="debugging"/><category term="mathematics"/><category term="sound"/><category term="terminal"/><category term="videos"/><category term="ATI"/><category term="Blog"/><category term="Boardgames"/><category term="Excel"/><category term="GMX"/><category term="Gimp"/><category term="IMAP"/><category term="Joy"/><category term="KDE"/><category term="MapReduce"/><category term="Musik"/><category term="NeoOffice"/><category term="Network simulation"/><category term="OpenCL"/><category term="OpenOffice"/><category term="OpenSource"/><category term="OpenWRT"/><category term="Sadness"/><category term="Safari"/><category term="Samba"/><category term="Slashdot"/><category term="Solaris"/><category term="Spherical Harmonics"/><category term="Storage"/><category term="VPN"/><category term="VirtualBox"/><category term="administration"/><category term="books"/><category term="computer science"/><category term="console"/><category term="exim4"/><category term="gnuplot"/><category term="gps"/><category term="graphics"/><category term="iPod Touch"/><category term="iTunes"/><category term="iWork"/><category term="jabber"/><category term="matplotlib"/><category term="parallel"/><category term="performance"/><category term="photos"/><category term="plot"/><category term="root42"/><category term="rsync"/><category term="scene"/><category term="scripting"/><category term="security"/><category term="svn"/><category term="theory"/><category term="valgrind"/><title type='text'>Arne&#39;s Blog</title><subtitle type='html'>A collection of coding snippets, tips, hints and random thoughts.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://root42.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default?start-index=26&amp;max-results=25'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>185</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-1963685214696140538</id><published>2016-02-25T19:19:00.001+01:00</published><updated>2016-02-25T19:19:23.116+01:00</updated><title type='text'>New Blog over at root42.de/blog</title><content type='html'>Blogger is out -- long live the new Blog! Head now over to &lt;a href=&quot;http://www.root42.de/blog&quot;&gt;http://www.root42.de/blog&lt;/a&gt; and get all the same content you had here!</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/1963685214696140538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2016/02/new-blog-over-at-root42deblog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/1963685214696140538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/1963685214696140538'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2016/02/new-blog-over-at-root42deblog.html' title='New Blog over at root42.de/blog'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-8660956413567486120</id><published>2016-02-20T15:00:00.003+01:00</published><updated>2016-02-20T15:08:42.831+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><title type='text'>ScummVM fullscreen on a Raspberry Pi TFT touchscreen</title><content type='html'>I managed to get ScummVM running on the 3.5&quot; Waveshare touchscreen. This is obviously only nice, if it runs fullscreen. Have a look:&lt;br /&gt;
  2. &lt;br /&gt;
  3. &lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/kE4QyjqgKmc&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
  4. &lt;br /&gt;
  5. For this to work, you need to adjust your openbox configuration, assuming you are running a default Raspbian with LXDE / openbox. Edit .config/openbox/lxde-pi-rc.xml and add the following to the applications section:&lt;br /&gt;
  6. &lt;br /&gt;
  7. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;   &amp;lt;application class=&quot;scummvm&quot; name=&quot;scummvm&quot;&amp;gt;  
  8.     &amp;lt;fullscreen&amp;gt;yes&amp;lt;/fullscreen&amp;gt;  
  9.   &amp;lt;/application&amp;gt;  
  10. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  11. You can switch between fullscreen and windowed mode by pressing Alt+F11, in the default openbox configuration.&lt;br /&gt;
  12. &lt;br /&gt;
  13. Next, you need to install scummvm and the OpenGL software rasterizer, since the touch screen frame buffer does not support the hardware OpenGL engine that the Pi provides:&lt;br /&gt;
  14. &lt;br /&gt;
  15. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;$ sudo apt-get install scummvm mesa-utils libgl1-mesa-dri libgl1-mesa-swx11
  16. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  17. This will also install dri drivers and some OpenGL utilities, such as glxgears to test performance.&lt;br /&gt;
  18. &lt;br /&gt;
  19. Now you want to tell ScummVM to actually use the OpenGL backend driver, or else it will not scale to, but rather use the default 2x scaler, which is too large for the 480x320 display. Easiest way to do this is to edit ~/.scummvmrc (you have to have run ScummVM at least once for this) and edit the [scummvm] section to have these lines:&lt;br /&gt;
  20. &lt;br /&gt;
  21. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;[scummvm]
  22. last_fullscreen_mode_width=480
  23. last_fullscreen_mode_height=320
  24. gfx_mode=opengl_nearest
  25. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  26. If gfx_mode or the other lines already exist, edit them to your liking.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/8660956413567486120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2016/02/scummvm-fullscreen-on-raspberry-pi-tft.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8660956413567486120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8660956413567486120'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2016/02/scummvm-fullscreen-on-raspberry-pi-tft.html' title='ScummVM fullscreen on a Raspberry Pi TFT touchscreen'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/kE4QyjqgKmc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-2686235741534146226</id><published>2016-02-20T11:27:00.004+01:00</published><updated>2016-02-23T22:49:27.303+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><title type='text'>Installing an ads7864 based Raspberry Pi TFT touchscreen (Waveshare 3.5&quot; LCD)</title><content type='html'>I have a Waveshare 3.5&quot; TFT touch screen for the Raspberry Pi. Those displays come with some software to help set it up. Sadly, this only works for Raspbian based on Debian 7. The new Raspbian Debian 8 (Jessie) does not play well with this setup. So here is what I did to make it work.&lt;br /&gt;
  27. &lt;br /&gt;
  28. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVK8f8CRNPJ1bsaboG1v3wMA_sOoxxzBoOcMwjvAcwphnrDTCgfK_jaBbYzoQPlKPvrRCCmqv2RQ2VxFAOcll5dRacXttytb85HIuPhn5kvM3U7XO5EHTmG5aZnEo_9brM0EC67TUGESq/s1600/IMG_1808.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVK8f8CRNPJ1bsaboG1v3wMA_sOoxxzBoOcMwjvAcwphnrDTCgfK_jaBbYzoQPlKPvrRCCmqv2RQ2VxFAOcll5dRacXttytb85HIuPhn5kvM3U7XO5EHTmG5aZnEo_9brM0EC67TUGESq/s400/IMG_1808.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
  29. &lt;br /&gt;
  30. First of all, you need to upgrade the kernel on your brand new Jessie installation:&lt;br /&gt;
  31. &lt;br /&gt;
  32. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;$ sudo rpi-update
  33. $ sudo power off
  34. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  35. I had to do the power off, or else the Pi would show only a black screen after reboot. YMMV.&lt;br /&gt;
  36. &lt;br /&gt;
  37. Next up, we need to change the boot parameters, i.e. the /boot/config.txt and /boot/cmdline.txt. Add the following to the end of /boot/cmdline.txt:&lt;br /&gt;
  38. &lt;br /&gt;
  39. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
  40. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  41. This chooses a smaller font for the framebuffer console and turns off the boot logo.&lt;br /&gt;
  42. &lt;br /&gt;
  43. Second, add the following lines to the end of /boot/config.txt:&lt;br /&gt;
  44. &lt;br /&gt;
  45. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;dtparam=audio=on
  46. dtparam=spi=on
  47. dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
  48. dtparam=i2c_arm=on
  49. dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
  50. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  51. Next step is setting up all the kernel modules. Make sure /etc/modules contains exactly these line:&lt;br /&gt;
  52. &lt;br /&gt;
  53. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;spi-bcm2835
  54. snd-bcm2835
  55. i2c-bcm2708
  56. i2c-dev
  57. ads7846
  58. flexfb
  59. fbtft_device
  60. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  61. The options for these modules have to be put in a file called /etc/modprobe.d/lcd.conf:&lt;br /&gt;
  62. &lt;br /&gt;
  63. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;options flexfb  width=320  height=480  regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
  64. options fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24
  65. options ads7846_device model=7846 cs=1 gpio_pendown=17  keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
  66. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  67. Next up are the X11 configurations. First, add a file /etc/X11/xorg.conf.d/99-calibration.conf&amp;nbsp;with the following content:&lt;br /&gt;
  68. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;Section &quot;InputClass&quot;
  69.    Identifier &quot;calibration&quot;
  70.    MatchProduct &quot;ADS7846 Touchscreen&quot;
  71.    Option &quot;Calibration&quot; &quot;126, 3734, 3892, 199&quot;
  72.    Option &quot;SwapAxes&quot; &quot;1&quot;
  73. EndSection
  74. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  75. You also need to edit /usr/share/X11/xorg.conf.d/99-fbturbo.conf. It should already exist, and you need to make it have this content:&lt;br /&gt;
  76. &lt;br /&gt;
  77. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;Section &quot;Device&quot;
  78.        Identifier      &quot;Allwinner A10/A13 FBDEV&quot;
  79.        Driver          &quot;fbturbo&quot;
  80.        Option          &quot;fbdev&quot; &quot;/dev/fb1&quot;
  81.        Option          &quot;SwapbuffersWait&quot; &quot;true&quot;
  82. EndSection
  83. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  84. The change is setting the fbdev to /dev/fb1, which is the touchscreen, instead of /dev/fb0, which is the HDMI output.&lt;br /&gt;
  85. &lt;br /&gt;
  86. Last but not least, you may want to install the input calibration tool:&lt;br /&gt;
  87. &lt;br /&gt;
  88. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;$ sudo apt-get install xinput-calibrator
  89. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  90. After all this, reboot and hopefully the Pi will reboot into a tiny X11 session on the touch screen.&lt;br /&gt;
  91. &lt;br /&gt;
  92. You can calibrate the display by running this, e.g. via an ssh session:&lt;br /&gt;
  93. &lt;br /&gt;
  94. &lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;$ DISPLAY=:0 xinput_calibrator
  95. Calibrating EVDEV driver for &quot;ADS7846 Touchscreen&quot; id=6
  96.        current calibration values (from XInput): min_x=3932, max_x=300 and min_y=294, max_y=3801
  97.  
  98. Doing dynamic recalibration:
  99.        Swapping X and Y axis...
  100.        Setting calibration data: 2763, 2763, 2942, 2978
  101.        --&gt; Making the calibration permanent &lt;-- span=&quot;&quot;&gt;
  102.  copy the snippet below into &#39;/etc/X11/xorg.conf.d/99-calibration.conf&#39; (/usr/share/X11/xorg.conf.d/ in some distro&#39;s)
  103. Section &quot;InputClass&quot;
  104.        Identifier      &quot;calibration&quot;
  105.        MatchProduct    &quot;ADS7846 Touchscreen&quot;
  106.        Option  &quot;Calibration&quot;   &quot;2763 2763 2942 2978&quot;
  107.        Option  &quot;SwapAxes&quot;      &quot;1&quot;
  108. EndSection
  109. &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
  110. You simply have to replace the calibration and swap axes lines into your /etc/X11/xorg.conf.d/99-calibration.conf, which we created earlier.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/2686235741534146226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2016/02/installing-ads7864-based-raspberry-pi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/2686235741534146226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/2686235741534146226'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2016/02/installing-ads7864-based-raspberry-pi.html' title='Installing an ads7864 based Raspberry Pi TFT touchscreen (Waveshare 3.5&quot; LCD)'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVK8f8CRNPJ1bsaboG1v3wMA_sOoxxzBoOcMwjvAcwphnrDTCgfK_jaBbYzoQPlKPvrRCCmqv2RQ2VxFAOcll5dRacXttytb85HIuPhn5kvM3U7XO5EHTmG5aZnEo_9brM0EC67TUGESq/s72-c/IMG_1808.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-3812591048405906791</id><published>2015-02-11T17:49:00.001+01:00</published><updated>2015-02-11T17:51:47.671+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Network"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><title type='text'>How to setup mDNS lookups on the Raspberry Pi</title><content type='html'>I&#39;ve got the new &lt;a href=&quot;http://www.raspberrypi.org/&quot;&gt;Raspberry Pi 2&lt;/a&gt;, and was setting it up the other day. The first thing that annoys me with vanilla Debian installations is that they don&#39;t have &lt;a href=&quot;http://en.wikipedia.org/wiki/Multicast_DNS&quot;&gt;mDNS&lt;/a&gt;/&lt;a href=&quot;http://en.wikipedia.org/wiki/Zero-configuration_networking#Service_discovery&quot;&gt;zeroconf&lt;/a&gt;/avahi enabled by default. This technology is very useful, since it helps you to advertise services on you local network, lets you resolve host names without the need for setting up a DNS server and much more.&lt;br /&gt;
  111. &lt;br /&gt;
  112. Especially the convenience of not having to remember IP-addresses for your machines is worth the work to set this up. With DHCP you might not even get the same IP for every machine every time.&lt;br /&gt;
  113. &lt;br /&gt;
  114. For this to work, I asked a question over at the &lt;a href=&quot;http://unix.stackexchange.com/questions/183689/how-to-search-local&quot;&gt;Linux &amp;amp; Unix StackExchange&lt;/a&gt;. So parts of this blog entry are taken from there.&lt;br /&gt;
  115. &lt;br /&gt;
  116. First, you might want to install avahi on your RasPi;&lt;br /&gt;
  117. &lt;br /&gt;
  118. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo apt-get install avahi-daemon&lt;/span&gt;&lt;br /&gt;
  119. &lt;br /&gt;
  120. This should help with the Pi being resolvable by name from other machines -- which also have to support mDNS. For example Macs will come with mDNS-lookup enabled. So you should be able to ping your Pi just by using its name plus the local-domain:&lt;br /&gt;
  121. &lt;br /&gt;
  122. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ping raspberrypi.local&lt;/span&gt;&lt;br /&gt;
  123. &lt;br /&gt;
  124. Next, you want to install the client side name service support for mDNS:&lt;br /&gt;
  125. &lt;br /&gt;
  126. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo apt-get install libnss-mdns&lt;/span&gt;&lt;br /&gt;
  127. &lt;br /&gt;
  128. Make sure that the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/nsswitch.conf&lt;/span&gt; contains this line:&lt;br /&gt;
  129. &lt;br /&gt;
  130. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4&lt;/span&gt;&lt;br /&gt;
  131. &lt;br /&gt;
  132. There is probably already a line starting with &quot;hosts:&quot;, which you can simple comment out with the #-sign.&lt;br /&gt;
  133. &lt;br /&gt;
  134. For added convenience, you may want to add the sshd to the advertised services of avahi. Simply add a file&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/avahi/services/ssh.service&lt;/span&gt; containing the following lines:&lt;br /&gt;
  135. &lt;br /&gt;
  136. &lt;pre&gt;
  137. &amp;lt;?xml version=&quot;1.0&quot; standalone=&#39;no&#39;?&amp;gt;&amp;lt;!--*-nxml-*--&amp;gt;
  138. &amp;lt;!DOCTYPE service-group SYSTEM &quot;avahi-service.dtd&quot;&amp;gt;
  139. &amp;lt;service-group&amp;gt;
  140.  &amp;lt;name replace-wildcards=&quot;yes&quot;&amp;gt;%h&amp;lt;/name&amp;gt;
  141.  &amp;lt;service&amp;gt;
  142.     &amp;lt;type&amp;gt;_ssh._tcp&amp;lt;/type&amp;gt;
  143.     &amp;lt;port&amp;gt;22&amp;lt;/port&amp;gt;
  144.  &amp;lt;/service&amp;gt;
  145. &amp;lt;/service-group&amp;gt;
  146. &lt;/pre&gt;
  147. &lt;br /&gt;
  148. This should let you use mDNS on you Pi, see the advertised services on you other machines in the local network. If you are using Plex Media Server (&lt;a href=&quot;https://bitbucket.org/inkubux/cubox-i/wiki/Plex%20Wheezy&quot;&gt;see this great post&lt;/a&gt;), it will also utilize avahi to advertise its services.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/3812591048405906791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2015/02/how-to-setup-mdns-lookups-on-raspberry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/3812591048405906791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/3812591048405906791'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2015/02/how-to-setup-mdns-lookups-on-raspberry.html' title='How to setup mDNS lookups on the Raspberry Pi'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-4422566605205445387</id><published>2014-11-19T20:33:00.003+01:00</published><updated>2014-11-25T19:33:10.619+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><title type='text'>Autocompletion for C and C++ with Emacs 24</title><content type='html'>I have already done a &lt;a href=&quot;http://root42.blogspot.de/2012/07/nice-c-autocomplete-configuration-for.html&quot;&gt;blog&lt;/a&gt; post on auto completion using Emacs. But that was back in Emacs 23 days. Long ago...&lt;br /&gt;
  149. &lt;br /&gt;
  150. Since then a lot has happened. &lt;a href=&quot;http://www.gnu.org/software/emacs/&quot;&gt;Emacs 24&lt;/a&gt; has been released, package managers like &lt;a href=&quot;http://melpa.milkbox.net/&quot;&gt;MELPA&lt;/a&gt; or &lt;a href=&quot;http://elpa.gnu.org/&quot;&gt;ELPA&lt;/a&gt; have become standard, and &lt;a href=&quot;http://company-mode.github.io/&quot;&gt;company-mode&lt;/a&gt; seems to be winning against &lt;a href=&quot;https://github.com/auto-complete/auto-complete&quot;&gt;auto-complete&lt;/a&gt;. Also, &lt;a href=&quot;http://clang.llvm.org/&quot;&gt;clang&lt;/a&gt; has made huge strides forward.&lt;br /&gt;
  151. &lt;br /&gt;
  152. So it is time to revisit the task of developing C or C++ using Emacs. I have put &lt;a href=&quot;https://github.com/root42/yet-another-emacs-init-el&quot;&gt;online an easy-to-install Emacs init.el&lt;/a&gt; that you can use as a start for your own development environment. I am using the OS X version of Emacs, but this should also work on Linux, given that you have clang and git installed.&lt;br /&gt;
  153. &lt;br /&gt;
  154. You can install this init.el by issuing the following commands:&lt;br /&gt;
  155. &lt;br /&gt;
  156. &lt;pre class=&quot;brush:plain&quot;&gt;cd
  157. git clone https://github.com/root42/yet-another-emacs-init-el
  158. mkdir ~/.emacs.d
  159. cd ~/.emacs.d
  160. ln -snf ../yet-another-emacs-init-el/init.el .
  161. &lt;/pre&gt;
  162. &lt;br /&gt;
  163. The file will make sure that upon startup of Emacs all necessary packages are installed, like company, magit but also LaTeX tools like aucTeX or refTeX. You can disable this check (or individual packages) in the init.el.&lt;br /&gt;
  164. &lt;br /&gt;
  165. The code is up on &lt;a href=&quot;https://github.com/root42/yet-another-emacs-init-el&quot;&gt;github&lt;/a&gt;, so feel free to fork and/or contribute.&lt;br /&gt;
  166. &lt;br /&gt;
  167. When doing simple C++ programming using only standard libraries, you should be ready to go. For more complex projects, you have to tweak the clang parameters, so that the compiler will find the header files. Completion happens automatically after &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;.&lt;/span&gt;&quot;, &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-&amp;gt;&lt;/span&gt;&quot; and &quot;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;::&lt;/span&gt;&quot; but also when pressing M-/. You can rebind this key in the init.el, of course. This is what the completion looks like:&lt;br /&gt;
  168. &lt;br /&gt;
  169. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  170. &lt;/div&gt;
  171. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  172. &lt;/div&gt;
  173. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  174. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYF4VGeCyljpgawfriosulKDhOCBb65rwX2RE322oEwwTxmDufZGtDoVcGQM6LGJvZL_cjyutQZz-QyOKK8dCRdJztaPzgUc3foQdEknrTQxfhcq1A2NzBSatDg3ydOzmPwLBLIE1CHIx6/s1600/company.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYF4VGeCyljpgawfriosulKDhOCBb65rwX2RE322oEwwTxmDufZGtDoVcGQM6LGJvZL_cjyutQZz-QyOKK8dCRdJztaPzgUc3foQdEknrTQxfhcq1A2NzBSatDg3ydOzmPwLBLIE1CHIx6/s1600/company.png&quot; height=&quot;460&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
  175. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  176. &lt;br /&gt;&lt;/div&gt;
  177. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  178. My most commonly used keys that I have re-bound are as follows:&lt;/div&gt;
  179. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  180. &lt;/div&gt;
  181. &lt;ul&gt;
  182. &lt;li&gt;f3 -&amp;nbsp;Runs ff-find-other-file, trying to switch between header and implementation for C/C++ programs.&lt;/li&gt;
  183. &lt;li&gt;f4 - Toggles the last two used buffers.&lt;/li&gt;
  184. &lt;li&gt;f5, f6 -&amp;nbsp;If tabbar is enabled (tabbar-mode), navigates back/forward through tabs.&lt;/li&gt;
  185. &lt;li&gt;f7 -&amp;nbsp;Toggle ispell dictionaries (german/english).&lt;/li&gt;
  186. &lt;li&gt;f8 - Kill current buffer.&lt;/li&gt;
  187. &lt;li&gt;f9 - Run compile.&lt;/li&gt;
  188. &lt;li&gt;M-? - Run grep.&lt;/li&gt;
  189. &lt;li&gt;M-n - Go to next error in compilation buffer.&lt;/li&gt;
  190. &lt;li&gt;M-S-n - Go to previous error in compilation buffer.&lt;/li&gt;
  191. &lt;li&gt;M-&amp;gt;, M-&amp;lt; - Go to next/previous Emacs frame.&lt;/li&gt;
  192. &lt;li&gt;M-/ - Run autocompletion using company mode.&lt;/li&gt;
  193. &lt;li&gt;C-x o, C-x C-o - Go to next/previous Emacs window&lt;/li&gt;
  194. &lt;/ul&gt;
  195. Very nice is also the &lt;a href=&quot;http://magit.github.io/&quot;&gt;magit-mode&lt;/a&gt;, which is a very sane interface to git for Emacs. It looks like this:&lt;br /&gt;
  196. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  197. &lt;/div&gt;
  198. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  199. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxN7lWV3FIcPe_2_mIwgshsstBT2okPnm4-9b6nIhehYodrdZcY9m0g87SuGxeCtiNVukD33KHwAa1hTIWTSQVHkY_21WVTRCGrgXukjErtgT9qPAAdvWC55eFk_lcZpmfejIFYm-u9kf8/s1600/magit.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxN7lWV3FIcPe_2_mIwgshsstBT2okPnm4-9b6nIhehYodrdZcY9m0g87SuGxeCtiNVukD33KHwAa1hTIWTSQVHkY_21WVTRCGrgXukjErtgT9qPAAdvWC55eFk_lcZpmfejIFYm-u9kf8/s1600/magit.png&quot; height=&quot;506&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
  200. You can run it by executing &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;M-x magit-status&lt;/span&gt;. Just type &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;?&lt;/span&gt; to get online help. Magit uses simple one-character-commands, like &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;s&lt;/span&gt; for stage, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;c&lt;/span&gt; for commit, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;p&lt;/span&gt; for push and so on.&lt;br /&gt;
  201. &lt;br /&gt;
  202. Currently I am evaluating the integration of lldb into Emacs, but haven&#39;t come far enough to say that I have found a powerful and flexible interface, apart from the standard command line. So there&#39;s more to come, hopefully!</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/4422566605205445387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/11/autocompletion-for-c-and-c-with-emacs-24.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4422566605205445387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4422566605205445387'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/11/autocompletion-for-c-and-c-with-emacs-24.html' title='Autocompletion for C and C++ with Emacs 24'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYF4VGeCyljpgawfriosulKDhOCBb65rwX2RE322oEwwTxmDufZGtDoVcGQM6LGJvZL_cjyutQZz-QyOKK8dCRdJztaPzgUc3foQdEknrTQxfhcq1A2NzBSatDg3ydOzmPwLBLIE1CHIx6/s72-c/company.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-4965827327941440269</id><published>2014-08-31T12:27:00.001+02:00</published><updated>2014-11-11T14:30:29.145+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Clojure"/><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="Lisp"/><title type='text'>How to view clojure docs in Emacs Cider</title><content type='html'>Developing clojure with Emacs Cider is great. To be able to view summaries for clojure functions and special forms, type this in you Cider REPL:&lt;br /&gt;
  203. &lt;br /&gt;
  204. &lt;pre class=&quot;brush: lisp&quot;&gt;(use &#39;clojure.repl)
  205. &lt;/pre&gt;
  206. &lt;br /&gt;
  207. Afterwards, you can do stuff like this:
  208. &lt;br /&gt;
  209. &lt;pre class=&quot;brush: lisp&quot;&gt;my.repl&amp;gt; (doc conj)
  210. -------------------------
  211. clojure.core/conj
  212. ([coll x] [coll x &amp;amp; xs])
  213.  conj[oin]. Returns a new collection with the xs
  214.    &#39;added&#39;. (conj nil item) returns (item).  The &#39;addition&#39; may
  215.    happen at different &#39;places&#39; depending on the concrete type.
  216. nil
  217. &lt;/pre&gt;
  218. &lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/4965827327941440269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/08/how-to-view-clojure-docs-in-emacs-cider.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4965827327941440269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4965827327941440269'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/08/how-to-view-clojure-docs-in-emacs-cider.html' title='How to view clojure docs in Emacs Cider'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-6264675591621344945</id><published>2014-08-20T20:52:00.000+02:00</published><updated>2014-08-31T12:28:32.683+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Clojure"/><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="Lisp"/><title type='text'>How to automatically refresh Cider when saving a clojure file in Emacs</title><content type='html'>&lt;a href=&quot;http://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt; has a great mode for using &lt;a href=&quot;http://clojure.org/&quot;&gt;Clojure&lt;/a&gt; called &lt;a href=&quot;https://github.com/clojure-emacs/cider&quot;&gt;Cider&lt;/a&gt;. Cider comes with an interactive &lt;a href=&quot;http://en.wikipedia.org/wiki/REPL&quot;&gt;REPL&lt;/a&gt;. The REPL allows you to test your code, start web apps, if you are using &lt;a href=&quot;http://www.luminusweb.net/&quot;&gt;Luminus&lt;/a&gt;, and all in all accelerates &amp;nbsp;development. One annoying thing though is that you have to refresh Cider every time you saved your sources. The good thing is that you can do this automatically. Just add the following to your init.el. I took the function from a &lt;a href=&quot;http://blog.jenkster.com/2013/12/a-cider-excursion.html&quot;&gt;blog post by Kris Jenkins&lt;/a&gt;:&lt;br /&gt;
  219. &lt;br /&gt;
  220. &lt;pre class=&quot;brush:lisp&quot;&gt;
  221.  (add-hook &#39;cider-mode-hook
  222.     &#39;(lambda () (add-hook &#39;after-save-hook
  223.      &#39;(lambda ()
  224.         (if (and (boundp &#39;cider-mode) cider-mode)
  225.      (cider-namespace-refresh)
  226.           )))))
  227.  
  228.  (defun cider-namespace-refresh ()
  229.    (interactive)
  230.    (cider-interactive-eval
  231.     &quot;(require &#39;clojure.tools.namespace.repl)
  232.    (clojure.tools.namespace.repl/refresh)&quot;))
  233.  
  234.  (define-key clojure-mode-map (kbd &quot;C-c C-r&quot;) &#39;cider-namespace-refresh)
  235. &lt;/pre&gt;
  236. &lt;br /&gt;
  237. Additionally, you can now run the refresh command manually, by hitting C-c C-r.&lt;br /&gt;
  238. &lt;br /&gt;
  239. &lt;b&gt;Update:&lt;/b&gt; I changed the after-save-hook to only trigger if we are in a buffer that has cider-mode enabled. Otherwise every save command in Emacs would have triggered the refresh!</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/6264675591621344945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/08/how-to-automatically-refresh-cider-when.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/6264675591621344945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/6264675591621344945'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/08/how-to-automatically-refresh-cider-when.html' title='How to automatically refresh Cider when saving a clojure file in Emacs'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-328934109440816144</id><published>2014-08-17T12:07:00.001+02:00</published><updated>2014-08-17T12:10:29.370+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="eMail"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Forwarding emails using fetchmail and msmtp</title><content type='html'>My goal here was to forward emails from my GMX freemail account to my iCloud account. Up until now, I used GMX&#39;s own forwarding capability, which is a bit hidden in the filters settings. However, iCloud cranked up its spam filtering, and is now using spamhaus blacklists, which very often label the GMX forwarding servers as bad.&lt;br /&gt;
  240. &lt;br /&gt;
  241. Hence I would only get bounce mails instead of the actual mails. Since this is no good, I set up &lt;a href=&quot;http://www.fetchmail.info/&quot;&gt;fetchmail&lt;/a&gt; and &lt;a href=&quot;http://msmtp.sourceforge.net/&quot;&gt;msmtp&lt;/a&gt; on my root server to do the forwarding for me. First, fetchmail will get all mail on GMX via POP3 and pass it on to msmtp, which will in turn pass it on to the iCloud mx server.&lt;br /&gt;
  242. &lt;br /&gt;
  243. At first I tried to deliver it via authenticated SMTP, but iCloud refuses mails sent this way, if the header from field does not contain any of your own iCloud aliases. This will most of the time be a problem, since we are trying to forward emails that were sent to you, not sent from you.&lt;br /&gt;
  244. &lt;br /&gt;
  245. So first let&#39;s see the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;~/.fetchmailrc&lt;/span&gt; (make sure to &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;chmod 0600&lt;/span&gt; it):&lt;br /&gt;
  246. &lt;br /&gt;
  247. &lt;pre class=&quot;brush:bash&quot;&gt;poll pop.gmx.net
  248. with proto POP3
  249. user &quot;user@gmx.net&quot;
  250. there with password &quot;secretpassword&quot;
  251. mda &quot;/usr/bin/msmtp -- someuser@icloud.com&quot;
  252. options
  253. no keep
  254. ssl
  255. sslcertck
  256. sslcertpath /etc/ssl/certs
  257. set daemon 300
  258. &lt;/pre&gt;
  259. &lt;br /&gt;
  260. This will poll GMX every 300 seconds and pass the received mails to &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;msmtp&lt;/span&gt; for delivery to &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;someuser@icloud.com&lt;/span&gt;.&lt;br /&gt;
  261. &lt;br /&gt;
  262. The corresponding &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;~/.msmtprc&lt;/span&gt; looks like this:&lt;br /&gt;
  263. &lt;br /&gt;
  264. &lt;pre class=&quot;brush:bash&quot;&gt;account default
  265. host mx6.mail.icloud.com
  266. port 25
  267. auto_from off
  268. from &quot;user@localdomain&quot;
  269. tls on
  270. tls_starttls on
  271. tls_trust_file /etc/ssl/certs/ca-certificates.crt
  272. logfile ~/.msmtp.log
  273. domain mx.of.localdomain
  274. &lt;/pre&gt;
  275. &lt;br /&gt;
  276. You can find out the valid mx entries for iCloud by running &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;nslookup -type=mx icloud.com&lt;/span&gt;.&lt;br /&gt;
  277. &lt;br /&gt;
  278. The settings above are assuming Debian stable. Other distributions or operating systems may have the SSL certs at different places in the file system.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/328934109440816144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/08/forwarding-emails-using-fetchmail-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/328934109440816144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/328934109440816144'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/08/forwarding-emails-using-fetchmail-and.html' title='Forwarding emails using fetchmail and msmtp'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-1378092688846251872</id><published>2014-07-30T21:16:00.000+02:00</published><updated>2014-07-30T21:22:27.254+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>hal+json is the way to go for representing REST resources</title><content type='html'>If you are implementing &lt;a href=&quot;http://en.wikipedia.org/wiki/REST&quot;&gt;REST&lt;/a&gt; APIs, and are thinking about using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;application/json&lt;/span&gt; as your content type, please consider &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;a href=&quot;http://tools.ietf.org/html/draft-kelly-json-hal-06&quot;&gt;application/hal+json&lt;/a&gt;&lt;/span&gt;. It allows you to represent link relations and embedded resources in a standardized manner.&lt;br /&gt;
  279. &lt;br /&gt;
  280. The content type offers three things:&lt;br /&gt;
  281. &lt;br /&gt;
  282. &lt;ol&gt;
  283. &lt;li&gt;Semantic link relations using the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;_link&lt;/span&gt; key. The &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;self&lt;/span&gt; link is a good example.&lt;/li&gt;
  284. &lt;li&gt;Embedded resources using the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;_embedded&lt;/span&gt; key, which are a subset of the link relations&lt;/li&gt;
  285. &lt;li&gt;Properties with arbitrary keys&lt;/li&gt;
  286. &lt;/ol&gt;
  287. &lt;br /&gt;
  288. As an example, you might have a programmable power strip with three sockets. The strip itself can be modeled as a resource. It will have three optionally embedded resources with the link relation sockets. These resources themselves will have a link relation called toggle. Doing e.g. a POST on this resource will allow you to toggle it. The lovely thing here is that the API will give you the correct URL to turn on or off the socket. An example request and response:&lt;br /&gt;
  289. &lt;br /&gt;
  290. &lt;pre class=&quot;brush:js&quot;&gt;
  291. GET http://foo.com/powerstrip/1
  292. Accept: application/hal+json
  293.  
  294. {
  295.    &quot;_links&quot; : {
  296. &quot;self&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1&quot; },
  297. &quot;sockets&quot; : [
  298.     { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/1&quot;, &quot;name&quot; : &quot;Socket 1&quot; },
  299.     { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/1&quot;, &quot;name&quot; : &quot;Socket 2&quot; },
  300.     { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/1&quot;, &quot;name&quot; : &quot;Socket 3&quot; }
  301. ]
  302.    },
  303.    &quot;_embedded&quot; : {
  304. &quot;sockets&quot; : [
  305.     {
  306.  &quot;_links&quot; : {
  307.      &quot;self&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/1&quot; },
  308.      &quot;toggle&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/1/off&quot; }
  309.  }
  310.  &quot;state&quot; : &quot;on&quot;
  311.     },
  312.     {
  313.  &quot;_links&quot; : {
  314.      &quot;self&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/2&quot; },
  315.      &quot;toggle&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/2/on&quot; }
  316.  }
  317.  &quot;state&quot; : &quot;off&quot;
  318.     },
  319.     {
  320.  &quot;_links&quot; : {
  321.      &quot;self&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/3&quot; },
  322.      &quot;toggle&quot; : { &quot;href&quot; : &quot;http://somedomain/powerstrip/1/sockets/3/on&quot; }
  323.  }
  324.  &quot;state&quot; : &quot;off&quot;
  325.     }
  326. ]
  327.    },
  328.    &quot;numberOfSockets&quot; : 3,
  329.    &quot;voltage&quot; : 230
  330. }
  331. &lt;/pre&gt;
  332. &lt;br /&gt;
  333. The content type is described in an &lt;a href=&quot;http://tools.ietf.org/html/draft-kelly-json-hal-06&quot;&gt;RFC draft&lt;/a&gt;, and is well on its way to become a standard. Make sure to also read the associated &lt;a href=&quot;http://tools.ietf.org/html/rfc5988&quot;&gt;web linking RFC&lt;/a&gt;.&lt;br /&gt;
  334. &lt;br /&gt;
  335. Amazon is already using this content type in its &lt;a href=&quot;http://docs.aws.amazon.com/appstream/latest/developerguide/rest-api.html&quot;&gt;AppStream API&lt;/a&gt;.&lt;br /&gt;
  336. &lt;br /&gt;
  337. The strength of using link relations and a content type such as HAL is that you can actually document your link relations, which are a fundamental part of your API. You should actively design the link relations and make them meaningful. &lt;br /&gt;
  338. &lt;br /&gt;
  339. For resources, I recommend that you document the following aspects:&lt;br /&gt;
  340. &lt;br /&gt;
  341. &lt;ol&gt;
  342. &lt;li&gt;Expected link relations and their embeddedness&lt;/li&gt;
  343. &lt;li&gt;Attributes of the resource&lt;/li&gt;
  344. &lt;li&gt;Example method calls for all allowed methods (GET, POST, ...) with example responses&amp;nbsp;&lt;/li&gt;
  345. &lt;/ol&gt;
  346. &lt;br /&gt;
  347. For link relations you should document these aspects:&lt;br /&gt;
  348. &lt;br /&gt;
  349. &lt;ol&gt;
  350. &lt;li&gt;Synopsis what the link relation means or represents, and which resource is to be expected&lt;/li&gt;
  351. &lt;li&gt;Allowed methods with optional templated arguments&lt;/li&gt;
  352. &lt;/ol&gt;
  353. &lt;div&gt;
  354. I place the example method calls with the resource documentation, since they might be redundant if specified with the link relations. But you should link to the resource documentation from the associated link relation documentation.&lt;/div&gt;
  355. </content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/1378092688846251872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/07/haljson-is-way-to-go-for-representing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/1378092688846251872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/1378092688846251872'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/07/haljson-is-way-to-go-for-representing.html' title='hal+json is the way to go for representing REST resources'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-810485098469195773</id><published>2014-07-15T13:39:00.003+02:00</published><updated>2014-07-15T13:41:07.614+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Extracting Names from Email Addresses</title><content type='html'>Given a CSV file with the following format:&lt;br /&gt;
  356.  
  357. &lt;pre class=&quot;brush:bash&quot;&gt;
  358. ;;firstname.lastname@somehost.com
  359. &lt;/pre&gt;
  360.  
  361. The task is to extract the names from the email addresses. We assume that the names are seperated by periods (.) and that all the names are supposed to be capitalized and printed with strings:
  362.  
  363. &lt;pre class=&quot;brush:python&quot;&gt;
  364. #!/usr/bin/env python
  365.  
  366. import sys
  367.  
  368. if len( sys.argv ) &lt; 2:
  369.    print &quot;Usage: %s filename&quot; % sys.argv[ 0 ]
  370.    sys.exit( 1 )
  371.  
  372. textFileName = sys.argv[ 1 ]
  373. textFile = open( textFileName, &quot;r&quot; )
  374.  
  375. for line in textFile:
  376.    fields = line.strip().split( &#39;;&#39; )
  377.    email = fields[ 2 ].split( &quot;@&quot; )
  378.    emailName = email[ 0 ].split( &#39;.&#39; )
  379.    capitalizedName = [ x[:1].upper() + x[1:].lower() for x in emailName ]
  380.    print &#39;%s;%s;%s&#39; % ( capitalizedName[ 0 ], &#39; &#39;.join( capitalizedName[ 1: ] ), fields[ 2 ] )
  381. &lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/810485098469195773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/07/extracting-names-from-email-addresses.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/810485098469195773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/810485098469195773'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/07/extracting-names-from-email-addresses.html' title='Extracting Names from Email Addresses'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-4425076807966893795</id><published>2014-03-22T11:54:00.000+01:00</published><updated>2014-03-22T19:58:13.654+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><title type='text'>How to backup your Raspberry Pi SD-Card</title><content type='html'>In the following I will explain on how you can backup your Pi&#39;s SD-card, so that whenever it breaks down, you can simply restore the backup image to a fresh SD-Card. This may also help with tinkering, when you totally screwed up your Pi&#39;s Linux-installation. I will explain the first step specifically for Mac OS X, but you can do this similarly on other UNIXes and Linux, by using the mount and umount commands.&lt;br /&gt;
  382. &lt;br /&gt;
  383. So, shut down your Pi using the command &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo shutdown -h now&lt;/span&gt;&amp;nbsp;and remove the SD-card after the Pi has done so. Take the card and insert it into your Mac&#39;s SD-card slot.&lt;br /&gt;
  384. &lt;br /&gt;
  385. First of all, we need to find out which disk device has been assigned to the card. We can do this with &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diskutil list&lt;/span&gt;:&lt;br /&gt;
  386. &lt;br /&gt;
  387. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  388. user@mymacintosh:~ $ diskutil list  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  389. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  390. /dev/disk0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  391. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  392. &amp;nbsp;&amp;nbsp; #: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TYPE NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SIZE &amp;nbsp; &amp;nbsp; &amp;nbsp; IDENTIFIER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  393. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  394. &amp;nbsp;&amp;nbsp; 0:&amp;nbsp; &amp;nbsp; &amp;nbsp; GUID_partition_scheme&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *512.1 GB &amp;nbsp; disk0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  395. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  396. &amp;nbsp;&amp;nbsp; 1:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EFI EFI &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 209.7 MB &amp;nbsp; disk0s1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  397. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  398. &amp;nbsp;&amp;nbsp; 2:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Apple_HFS M4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 511.1 GB &amp;nbsp; disk0s2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  399. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  400. &amp;nbsp;&amp;nbsp; 3: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Apple_Boot Recovery HD &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 784.2 MB &amp;nbsp; disk0s3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  401. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  402. /dev/disk1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  403. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  404. &amp;nbsp;&amp;nbsp; #: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TYPE NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SIZE &amp;nbsp; &amp;nbsp; &amp;nbsp; IDENTIFIER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  405. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  406. &amp;nbsp;&amp;nbsp; 0: &amp;nbsp; &amp;nbsp; FDisk_partition_scheme&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *15.9 GB&amp;nbsp; &amp;nbsp; disk1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  407. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  408. &amp;nbsp;&amp;nbsp; 1: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Windows_FAT_32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 58.7 MB&amp;nbsp; &amp;nbsp; disk1s1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
  409. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  410. &amp;nbsp;&amp;nbsp; 2:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Linux &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.9 GB&amp;nbsp; &amp;nbsp; disk1s2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  411. &lt;br /&gt;
  412. Then unmount the card using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diskutil unmountDisk&lt;/span&gt;:&lt;br /&gt;
  413. &lt;br /&gt;
  414. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  415. user@mymacintosh:~ $ diskutil umountDisk /dev/disk1  &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  416. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  417. Unmount of all volumes on disk1 was successful&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  418. &lt;br /&gt;
  419. Next we will use dd to produce an image, which we can compress using bzip2, or pbzip2 for more performance. You can use MacPorts to install pbzip2.&lt;br /&gt;
  420. &lt;br /&gt;
  421. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  422. user@mymacintosh:~ $ sudo dd if=/dev/disk1 | pbzip2 &amp;gt; raspberry_pi_$(date &quot;+%Y-%m-%d&quot;).img.bz2&amp;nbsp;&lt;/div&gt;
  423. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  424. 31116288+0 records in&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  425. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  426. 31116288+0 records out &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  427. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  428. 15931539456 bytes transferred in 2347.692010 secs (6786043 bytes/sec)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  429. &lt;br /&gt;
  430. Restoring the image is also easy:&lt;br /&gt;
  431. &lt;br /&gt;
  432. &lt;div style=&quot;background-color: black; color: whitesmoke; font-family: fixed-7x14, monospace; font-size: 14px;&quot;&gt;
  433. user@mymacintosh:~ $ bunzip2 raspberry_pi_2014-03-22.img.bz2 | sudo dd of=/dev/disk1 &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
  434. </content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/4425076807966893795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/03/how-to-backup-your-raspberry-pi-sd-card.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4425076807966893795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4425076807966893795'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/03/how-to-backup-your-raspberry-pi-sd-card.html' title='How to backup your Raspberry Pi SD-Card'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-2357164052850688051</id><published>2014-03-16T13:54:00.000+01:00</published><updated>2014-03-16T13:54:55.268+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Getting Emacs for Mac OS X to honour the shell environment</title><content type='html'>If your are using the excellent &lt;a href=&quot;http://emacsformacosx.com/&quot;&gt;Emacs for Mac OS X&lt;/a&gt; distribution, you may have noticed that it does not use the environment you may have defined in your ~/.bashrc. This can be a problem if you are using &lt;a href=&quot;http://www.macports.org/&quot;&gt;MacPorts&lt;/a&gt;, for example to install &lt;a href=&quot;http://clojure.org/&quot;&gt;clojure&lt;/a&gt; and &lt;a href=&quot;http://leiningen.org/&quot;&gt;Leiningen&lt;/a&gt;. You will get an error message like this, when trying to run inferior-lisp in clojure-mode:&lt;br /&gt;
  435. &lt;br /&gt;
  436. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;apply: Searching for program: No such file or directory, lein
  437. &lt;/span&gt;&lt;br /&gt;
  438. &lt;div&gt;
  439. &lt;br /&gt;
  440. This can be avoided by using the excellent &lt;a href=&quot;https://github.com/purcell/exec-path-from-shell&quot;&gt;exec-path-from-shell&lt;/a&gt; package for Emacs. It is available via (&lt;a href=&quot;http://melpa.milkbox.net/#/&quot;&gt;M&lt;/a&gt;)&lt;a href=&quot;http://elpa.gnu.org/&quot;&gt;ELPA&lt;/a&gt;, just install it using list-packages, or download it from &lt;a href=&quot;https://github.com/purcell/exec-path-from-shell&quot;&gt;github&lt;/a&gt;. You can enable it, especially for OS X, by putting this in your init.el:&lt;/div&gt;
  441. &lt;div&gt;
  442. &lt;br /&gt;&lt;/div&gt;
  443. &lt;pre class=&quot;brush:lisp&quot;&gt;(when (memq window-system &#39;(mac ns))
  444.    (exec-path-from-shell-initialize))
  445.  
  446. &lt;/pre&gt;
  447. </content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/2357164052850688051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/03/getting-emacs-for-mac-os-x-to-honour.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/2357164052850688051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/2357164052850688051'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/03/getting-emacs-for-mac-os-x-to-honour.html' title='Getting Emacs for Mac OS X to honour the shell environment'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-3117886807363920908</id><published>2014-02-01T16:52:00.000+01:00</published><updated>2014-02-01T18:50:18.743+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><category scheme="http://www.blogger.com/atom/ns#" term="rsync"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to use find and rsync to copy a bunch of files to a local or remote destination</title><content type='html'>I use rsync a lot. And I use find a lot. You can use them both together, by using the magnificent xargs command. Two problems are there to solve: xargs usually just pastes the arguments from find at the end of the specified command. No way to specify the destination directory. Second, file names with spaces are a problem.&lt;br /&gt;
  448. &lt;br /&gt;
  449. The solutions are:&lt;br /&gt;
  450. &lt;br /&gt;
  451. &lt;ul&gt;
  452. &lt;li&gt;The -print0 option of find uses 0-bytes to separate results, instead of spaces and newlines&lt;/li&gt;
  453. &lt;li&gt;The -0 option of xargs tells xargs to look for said 0-bytes&lt;/li&gt;
  454. &lt;li&gt;The -J option of xargs allows us to tell xargs where to put the file names that we feed to it.&lt;/li&gt;
  455. &lt;/ul&gt;
  456. So let&#39;s put it together:&lt;br /&gt;
  457. &lt;br /&gt;
  458. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  459. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #34bd26;&quot;&gt;pi@raspberrypi&lt;/span&gt; &lt;span style=&quot;color: #5330e1;&quot;&gt;~ $&lt;/span&gt; find . -name &#39;your*pattern.jpg&#39; -print0 | xargs -J % -0 rsync -aP % user@host:some/dir/&lt;/span&gt;&lt;/div&gt;
  460. &lt;br /&gt;
  461. Thanks to &lt;a href=&quot;http://www.redeyeblind.com/post/48271055922/rsync-and-xargs-files-with-spaces&quot;&gt;redeyeblind&lt;/a&gt; for the insightful blog post.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/3117886807363920908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/02/how-to-use-find-and-rsync-to-copy-bunch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/3117886807363920908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/3117886807363920908'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/02/how-to-use-find-and-rsync-to-copy-bunch.html' title='How to use find and rsync to copy a bunch of files to a local or remote destination'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-8679634905750703118</id><published>2014-01-19T17:49:00.000+01:00</published><updated>2014-02-01T20:02:54.505+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="tmux"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to resize tmux windows using OS X terminal</title><content type='html'>A while back I pointed out a blog post by someone else, which described how to get C-left and C-right working in tmux and OS X. Now I noticed that I cannot resize windows in tmux. This is because tmux seems to expect xterm keys for C-arrow. The xterm keycodes for the arrow keys are:&lt;br /&gt;
  462. &lt;br /&gt;
  463. &lt;ul&gt;
  464. &lt;li&gt;left key: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[D&lt;/span&gt;&lt;/li&gt;
  465. &lt;li&gt;right key: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[C&lt;/span&gt;&lt;/li&gt;
  466. &lt;li&gt;up key: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[A&lt;/span&gt;&lt;/li&gt;
  467. &lt;li&gt;down key: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[B&lt;/span&gt;&lt;/li&gt;
  468. &lt;li&gt;C-left: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[1;5D&lt;/span&gt;&lt;/li&gt;
  469. &lt;li&gt;C-right: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[1;5C&lt;/span&gt;&lt;/li&gt;
  470. &lt;li&gt;C-up: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[1;5A&lt;/span&gt;&lt;/li&gt;
  471. &lt;li&gt;C-down: &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;^[[1;5B&lt;/span&gt;&lt;/li&gt;
  472. &lt;/ul&gt;
  473. &lt;br /&gt;
  474. I can now configure OS X terminal to send those key codes, and tmux works fine. However, other apps running in tmux will break, because they don&#39;t expect to get xterm key codes. I found a workaround in the &lt;a href=&quot;https://wiki.archlinux.org/index.php/tmux#Setting_the_correct_term&quot;&gt;ArchWiki&lt;/a&gt;, which suggests to create your own terminfo entry. I will try that and report back here.&lt;br /&gt;
  475. &lt;div&gt;
  476. &lt;br /&gt;
  477. Update: The solution is adding two lines to the ~/.tmux.conf file:&lt;br /&gt;
  478. &lt;br /&gt;
  479. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  480. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #afad24;&quot;&gt;set&lt;/span&gt; -g default-terminal &lt;span style=&quot;color: #34bd26;&quot;&gt;&quot;xterm-256color&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
  481. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  482. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #afad24;&quot;&gt;setw&lt;/span&gt; -g xterm-keys on &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
  483. &lt;/div&gt;
  484. &lt;div&gt;
  485. &lt;br /&gt;
  486. Update 2: And here is my OS X Terminal.app configuration:&lt;br /&gt;
  487. &lt;br /&gt;
  488. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  489. &lt;/div&gt;
  490. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  491. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixdxF2k_uLKn4CTXHoqFX88tyPJL1TfHgWBAHpQcZu18KmJundPs07NkFK28Zq5UeXNtXZ9jtH7Wyi9sKpK3RIo8hhiwlaYDwV7bymKYMZ2-xMJBt0ry1f6VJ6nO35XIaseRPan9HX69NB/s1600/Bildschirmfoto+2014-01-19+um+18.26.12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixdxF2k_uLKn4CTXHoqFX88tyPJL1TfHgWBAHpQcZu18KmJundPs07NkFK28Zq5UeXNtXZ9jtH7Wyi9sKpK3RIo8hhiwlaYDwV7bymKYMZ2-xMJBt0ry1f6VJ6nO35XIaseRPan9HX69NB/s1600/Bildschirmfoto+2014-01-19+um+18.26.12.png&quot; height=&quot;552&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
  492. Update 3: And a very last update... It seems that tmux does not support bce (&lt;a href=&quot;http://www.gnu.org/software/screen/manual/html_node/Character-Processing.html&quot;&gt;background color erase&lt;/a&gt;), which xterm does. This is a problem for progams like htop, vim, or mc. You will see rendering errors, if you do not fix this.&lt;br /&gt;
  493. &lt;br /&gt;
  494. So you need to make your own terminfo file and own terminal type, called xterm-256color-nobce. You can do this on the command line:&lt;br /&gt;
  495. &lt;br /&gt;
  496. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  497. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #34bd26;&quot;&gt;pi@raspberrypi&lt;/span&gt; &lt;span style=&quot;color: #5330e1;&quot;&gt;~ $&lt;/span&gt; infocmp xterm-256color | sed &#39;s/bce, //&#39; | sed &#39;s/xterm-256color/xterm-256color-bce/g&#39; &amp;gt; xterm-256color-nobce&lt;/span&gt;&lt;/div&gt;
  498. &lt;br /&gt;
  499. This will create a new terminfo source file, which does not advertise the bce feature. You can install this with the following command:&lt;br /&gt;
  500. &lt;br /&gt;
  501. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  502. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #34bd26;&quot;&gt;pi@raspberrypi&lt;/span&gt; &lt;span style=&quot;color: #5330e1;&quot;&gt;~ $&lt;/span&gt; sudo tic ./xterm-256color-nobce&lt;/span&gt;&lt;/div&gt;
  503. &lt;br /&gt;
  504. This makes the terminal type xterm-256color-nobce available. After this, change your ~/.tmux.conf once again, to use the new terminal type per default:&lt;br /&gt;
  505. &lt;br /&gt;
  506. &lt;div style=&quot;background-color: black; color: #af3782; font-size: 14px;&quot;&gt;
  507. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #ce7924;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: whitesmoke;&quot;&gt;-g default-terminal &lt;/span&gt;&quot;xterm-256color-nobce&quot;&lt;/span&gt;&lt;/div&gt;
  508. &lt;/div&gt;
  509. &lt;br /&gt;
  510. Update 4: To make the Ctrl+Arrow keys also work in regular OS X Terminal, you need to edit or create ~/.inputrc to contain this:&lt;br /&gt;
  511. &lt;br /&gt;
  512. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  513. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# xterm keys for skipping a word&lt;/span&gt;&lt;/div&gt;
  514. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  515. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&quot;\e[1;5C&quot;: forward-word&lt;/span&gt;&lt;/div&gt;
  516. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  517. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&quot;\e[1;5D&quot;: backward-word&lt;/span&gt;&lt;/div&gt;
  518. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  519. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&quot;\e[5C&quot;: forward-word&lt;/span&gt;&lt;/div&gt;
  520. &lt;div style=&quot;background-color: black; color: whitesmoke; font-size: 14px;&quot;&gt;
  521. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&quot;\e[5D&quot;: backward-word&lt;/span&gt;&lt;/div&gt;
  522. &lt;div&gt;
  523. &lt;br /&gt;&lt;/div&gt;
  524. The &quot;1;&quot; variant is otherwise not recognized by GNU readline on OS X.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/8679634905750703118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/01/how-to-resize-tmux-windows-using-os-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8679634905750703118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8679634905750703118'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/01/how-to-resize-tmux-windows-using-os-x.html' title='How to resize tmux windows using OS X terminal'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixdxF2k_uLKn4CTXHoqFX88tyPJL1TfHgWBAHpQcZu18KmJundPs07NkFK28Zq5UeXNtXZ9jtH7Wyi9sKpK3RIo8hhiwlaYDwV7bymKYMZ2-xMJBt0ry1f6VJ6nO35XIaseRPan9HX69NB/s72-c/Bildschirmfoto+2014-01-19+um+18.26.12.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-4586117133417638668</id><published>2014-01-02T20:06:00.001+01:00</published><updated>2014-01-02T20:06:17.976+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Network"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenWRT"/><category scheme="http://www.blogger.com/atom/ns#" term="WiFi"/><title type='text'>How to setup an OpenWRT router as a WiFi bridge to an Ethernet router</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  525. You can use an &lt;a href=&quot;https://openwrt.org/&quot;&gt;OpenWRT&lt;/a&gt; &lt;a href=&quot;http://wiki.openwrt.org/toh/start&quot;&gt;router or access point&lt;/a&gt;&amp;nbsp;to connect WiFi enabled devices to a router, which only has wired Ethernet. For this to work, I am assuming you already have an access point or router running OpenWRT, in this case version 12.09, &lt;a href=&quot;http://downloads.openwrt.org/attitude_adjustment/12.09/&quot;&gt;Attitude Adjustment&lt;/a&gt;.&lt;/div&gt;
  526. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  527. &lt;br /&gt;&lt;/div&gt;
  528. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  529. Log into your router, using the LuCi frontend, and go to the Network/Interfaces tab:&lt;/div&gt;
  530. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  531. &lt;br /&gt;&lt;/div&gt;
  532. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  533. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidCpj7JPOQAxvuh55It84979DUZtwbzR9-cpkL0DaeRszsyA0VL5xXMPIJtr2D66jM3A_VwD8UfyHegJqYNfrTbbqewGeYaXPI6JzzP8-Qf8-vDHDNzg0aB4jDOYA1Vniz8Ch8EnkBayqI/s1600/Bildschirmfoto+2014-01-02+um+19.54.39.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidCpj7JPOQAxvuh55It84979DUZtwbzR9-cpkL0DaeRszsyA0VL5xXMPIJtr2D66jM3A_VwD8UfyHegJqYNfrTbbqewGeYaXPI6JzzP8-Qf8-vDHDNzg0aB4jDOYA1Vniz8Ch8EnkBayqI/s400/Bildschirmfoto+2014-01-02+um+19.54.39.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
  534. &lt;br /&gt;
  535. There you should see your LAN device. Edit it to have an appropriate IP address from your local subnet. Most often your network will be 192.168.0.0 and your existing router will have the IP 192.168.1.1. But your mileage may vary...&lt;br /&gt;
  536. &lt;br /&gt;
  537. Lets put in a static IP address, so we can find our router in case something goes wrong. Also make sure to set the netmask (in this case 255.255.255.0), gateway and DNS server (both probably should point to your router, 192.168.1.1).&lt;br /&gt;
  538. &lt;br /&gt;
  539. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  540. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD67iwWVOF0ZPdzUryLVG204wEpMyod7Dm0RH7zRck5NJBUqOChwYwF6BGqpvXJRHiFNSly3YEK_VB5RwYFMaoZxoAY2VTPdxbjSMOQ0dmOx-uMwNdWaK3hcerVPQIKiGgMkK0fEiGwGPT/s1600/Bildschirmfoto+2014-01-02+um+19.54.50.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;371&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD67iwWVOF0ZPdzUryLVG204wEpMyod7Dm0RH7zRck5NJBUqOChwYwF6BGqpvXJRHiFNSly3YEK_VB5RwYFMaoZxoAY2VTPdxbjSMOQ0dmOx-uMwNdWaK3hcerVPQIKiGgMkK0fEiGwGPT/s400/Bildschirmfoto+2014-01-02+um+19.54.50.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
  541. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  542. &lt;br /&gt;&lt;/div&gt;
  543. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  544. Now go to the Physical Settings tab. Here, it&#39;s important to check &quot;Bridge interfaces&quot; and to select both the ethernet adapter, most likely eth0, and the wireless network. One of the ethernet devices will say &quot;wan&quot;, if your are using a router instead of an access point for this. You don&#39;t want that device.&lt;/div&gt;
  545. &lt;br /&gt;
  546. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  547. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHtf950UoOlyKWqwy80O0wc24r5NFzqacKCnv_YMrQCaHE9s3X6bdgL9I6EWtYKJTTugc1otN3TJDP5Q3JJKcJQOCz4dUekEi0EmsHZRx1DigsGq2Zi_UL0JODxuLWpMtmnWOb4gXCwMX/s1600/Bildschirmfoto+2014-01-02+um+19.55.04.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHtf950UoOlyKWqwy80O0wc24r5NFzqacKCnv_YMrQCaHE9s3X6bdgL9I6EWtYKJTTugc1otN3TJDP5Q3JJKcJQOCz4dUekEi0EmsHZRx1DigsGq2Zi_UL0JODxuLWpMtmnWOb4gXCwMX/s400/Bildschirmfoto+2014-01-02+um+19.55.04.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
  548. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  549. &lt;br /&gt;&lt;/div&gt;
  550. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
  551. Hit &quot;Save &amp;amp; Apply&quot; when you are ready. And be sure to have the &lt;a href=&quot;http://wiki.openwrt.org/doc/howto/generic.debrick&quot;&gt;de-bricking guide&lt;/a&gt; ready, if something goes wrong...&lt;/div&gt;
  552. &lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/4586117133417638668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/01/how-to-setup-openwrt-router-as-wifi.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4586117133417638668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/4586117133417638668'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/01/how-to-setup-openwrt-router-as-wifi.html' title='How to setup an OpenWRT router as a WiFi bridge to an Ethernet router'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidCpj7JPOQAxvuh55It84979DUZtwbzR9-cpkL0DaeRszsyA0VL5xXMPIJtr2D66jM3A_VwD8UfyHegJqYNfrTbbqewGeYaXPI6JzzP8-Qf8-vDHDNzg0aB4jDOYA1Vniz8Ch8EnkBayqI/s72-c/Bildschirmfoto+2014-01-02+um+19.54.39.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-35363265339490107</id><published>2014-01-01T14:53:00.000+01:00</published><updated>2014-01-01T14:53:10.726+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><category scheme="http://www.blogger.com/atom/ns#" term="SSH"/><category scheme="http://www.blogger.com/atom/ns#" term="tmux"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to run tmux via ssh instantly</title><content type='html'>With my Raspberry Pi, what I do very, very often is this:&lt;br /&gt;
  553. &lt;br /&gt;
  554. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;localhost$&lt;/span&gt; &lt;b&gt;ssh raspberrypi.local&lt;/b&gt; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: purple;&quot;&gt;# Here I already type the next command and wait a while&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
  555. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;raspberrypi$&lt;/span&gt; &lt;b&gt;tmux attach&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
  556. &lt;br /&gt;
  557. This is all well and good, but sometimes the Pi is down, and I will attach to one of my local tmux sessions. Very annoying. Instead you could try to do this:&lt;br /&gt;
  558. &lt;br /&gt;
  559. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;localhost$&lt;/span&gt; &lt;b&gt;ssh raspberrypi.local tmux attach&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
  560. &lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;not a terminal&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
  561. &lt;br /&gt;
  562. Well, that did no good. So a look at the man-page of ssh or a &lt;a href=&quot;http://unix.stackexchange.com/questions/37643/how-to-run-mutt-via-ssh-without-going-through-an-interactive-shell&quot;&gt;quick search&lt;/a&gt; reveals this gem:&lt;br /&gt;
  563. &lt;br /&gt;
  564. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;localhost$&lt;/span&gt; &lt;b&gt;ssh raspberrypi.local -t tmux attach&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
  565. &lt;div&gt;
  566. &lt;br /&gt;&lt;/div&gt;
  567. This allocates a pseudo terminal, which is needed by tmux to function correctly. This is also done by ssh, if no command is given, but a login shell is spawned.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/35363265339490107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2014/01/how-to-run-tmux-via-ssh-instantly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/35363265339490107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/35363265339490107'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2014/01/how-to-run-tmux-via-ssh-instantly.html' title='How to run tmux via ssh instantly'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-8453274934951179027</id><published>2013-11-28T15:14:00.000+01:00</published><updated>2013-12-06T07:51:12.289+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tmux"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Some tmux cheats</title><content type='html'>There&#39;s a lot of stuff you can do with tmux. Here are some nice to know things:&lt;br /&gt;
  568. &lt;br /&gt;
  569. &lt;br /&gt;
  570. &lt;ul&gt;
  571. &lt;li&gt;C-b C-o: cycle contents of current windows (or swap if there are only two windows)&lt;/li&gt;
  572. &lt;li&gt;C-b C-SPC: switch between vertical and horizontal split&lt;/li&gt;
  573. &lt;li&gt;C-b n, p: next or previous screen&lt;/li&gt;
  574. &lt;li&gt;C-b [: copy mode&lt;/li&gt;
  575. &lt;ul&gt;
  576. &lt;li&gt;Use Emacs bindings to copy and paste:&lt;/li&gt;
  577. &lt;li&gt;C-SPC: begin selection&lt;/li&gt;
  578. &lt;li&gt;C-w or M-w to copy&lt;/li&gt;
  579. &lt;/ul&gt;
  580. &lt;li&gt;C-b ] to yank (paste)&lt;/li&gt;
  581. &lt;ul&gt;
  582. &lt;/ul&gt;
  583. &lt;/ul&gt;
  584. </content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/8453274934951179027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/11/some-tmux-cheats.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8453274934951179027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8453274934951179027'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/11/some-tmux-cheats.html' title='Some tmux cheats'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-7901605056113314009</id><published>2013-10-17T19:02:00.001+02:00</published><updated>2013-10-17T19:02:10.643+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="astronomy"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>New StackExchange: Astronomy</title><content type='html'>Just so that you know, there is a new &lt;a href=&quot;http://stackexchange.com/about&quot;&gt;StackExchange&lt;/a&gt; beta site: &lt;a href=&quot;http://astronomy.stackexchange.com/&quot;&gt;Astronomy&lt;/a&gt;. You can ask astronomy-related questions there, or search for questions other people have asked. Hopefully, you will get some good answers.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/7901605056113314009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/10/new-stackexchange-astronomy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/7901605056113314009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/7901605056113314009'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/10/new-stackexchange-astronomy.html' title='New StackExchange: Astronomy'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-2225104584106877972</id><published>2013-10-01T12:01:00.000+02:00</published><updated>2013-10-03T17:04:19.511+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="eMail"/><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to copy Mails from iCloud to GMail</title><content type='html'>You can use the fabulous &lt;a href=&quot;http://imapsync.lamiral.info/&quot;&gt;imapsync&lt;/a&gt; tool to copy mails between IMAP servers. For example you can copy a certain folder from Apple&#39;s &lt;a href=&quot;https://www.icloud.com/&quot;&gt;iCloud&lt;/a&gt; to Google&#39;s &lt;a href=&quot;https://mail.google.com/&quot;&gt;gmail&lt;/a&gt;:
  585.  
  586. &lt;br /&gt;
  587. &lt;pre class=&quot;brush:bash&quot;&gt;imapsync \
  588.   --noauthmd5 --ssl1 --ssl2 \
  589.   --host1 mail.me.com --user1 &#39;your.icloud.name&#39; \
  590.   --host2 imap.gmail.com --user2 &#39;your.gmail.name@googlemail.com&#39; \
  591.   --folder &#39;your/folder/to/be/copied&#39; --sep1 &#39;/&#39; \
  592.   --prefix1 &#39;&#39; --prefix2 &#39;[Google Mail]&#39; --sep2 &#39;/&#39;
  593. &lt;/pre&gt;
  594. The important parts here are the user names for the IMAP servers. Note that you need to generate an application specific password, if you are using Google two factor authentication! Also important is the &quot;[Google Mail]&quot; IMAP prefix.&lt;br /&gt;
  595. &lt;br /&gt;
  596. Edit: It seems gmail has a weird interpretation of all the IMAP folders and stuff. Since they are using labels, the above script might create a weird label for the copied emails, but they will be there nevertheless!</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/2225104584106877972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/10/how-to-copy-mails-from-icloud-to-gmail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/2225104584106877972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/2225104584106877972'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/10/how-to-copy-mails-from-icloud-to-gmail.html' title='How to copy Mails from iCloud to GMail'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-8641946923931855328</id><published>2013-09-18T18:57:00.003+02:00</published><updated>2013-09-18T18:57:48.861+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OS X"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to get a directory recursively with lftp</title><content type='html'>Using the command &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mget&lt;/span&gt;, you can fetch files with the program &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;a href=&quot;http://lftp.yar.ru/&quot;&gt;lftp&lt;/a&gt;&lt;/span&gt;. With &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mget -c&lt;/span&gt; you can continue an aborted download. But how do you download a directory recursively? No, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mget -c -r&lt;/span&gt; does not work.&lt;br /&gt;
  597. &lt;br /&gt;
  598. It is so &lt;a href=&quot;http://bethesignal.org/blog/2008/12/04/recursive-get-with-lftp/&quot;&gt;simple&lt;/a&gt;:&lt;br /&gt;
  599. &lt;br /&gt;
  600. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mirror &lt;i&gt;somedirectory&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
  601. &lt;br /&gt;
  602. Don&#39;t forget to &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lcd&lt;/span&gt; into your download directory before.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/8641946923931855328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/09/how-to-get-directory-recursively-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8641946923931855328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8641946923931855328'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/09/how-to-get-directory-recursively-with.html' title='How to get a directory recursively with lftp'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-1256540261229918083</id><published>2013-09-18T11:37:00.002+02:00</published><updated>2013-09-18T11:37:25.480+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Solaris"/><title type='text'>Working around connection problems with Emacs Tramp</title><content type='html'>From time to time I have to edit files on a SunOS 5.10 server. I use &lt;a href=&quot;http://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt; with &lt;a href=&quot;http://www.emacswiki.org/emacs/TrampMode&quot;&gt;tramp&lt;/a&gt; for this. However, after some time I get this error message from tramp:&lt;br /&gt;
  603. &lt;br /&gt;
  604. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;File error: Couldn&#39;t find exit status of `test -e ...&lt;/span&gt;&lt;br /&gt;
  605. &lt;br /&gt;
  606. It seems that the ssh connection goes bad for some reason. After this you won&#39;t be able to save the file anymore. You can work around this by running &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;M-x&amp;nbsp;tramp-cleanup-all-connections&lt;/span&gt; and then saving again.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/1256540261229918083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/09/working-around-connection-problems-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/1256540261229918083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/1256540261229918083'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/09/working-around-connection-problems-with.html' title='Working around connection problems with Emacs Tramp'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-3821907565060255354</id><published>2013-09-17T13:52:00.000+02:00</published><updated>2013-09-17T13:52:36.096+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Clojure"/><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Lisp"/><title type='text'>Anonymous (lambda) functions in Clojure</title><content type='html'>I am learning a bit of Clojure from time to time, and today I learned about shorthand notation for anonymous functions:&lt;br /&gt;
  607.  
  608. &lt;pre class=&quot;brush:lisp&quot;&gt;
  609. &gt; (apply (fn [x y] (+ x y)) &#39;(1 1))
  610. 2
  611. &lt;/pre&gt;
  612.  
  613. Which is equivalent to:&lt;br /&gt;
  614.  
  615. &lt;pre class=&quot;brush:lisp&quot;&gt;
  616. &gt; (apply #(+ %1 %2) &#39;(1 1))
  617. 2
  618. &lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/3821907565060255354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/09/anonymous-lambda-functions-in-clojure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/3821907565060255354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/3821907565060255354'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/09/anonymous-lambda-functions-in-clojure.html' title='Anonymous (lambda) functions in Clojure'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-8355135196068404913</id><published>2013-08-13T21:35:00.000+02:00</published><updated>2013-08-13T21:35:22.062+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="coding"/><category scheme="http://www.blogger.com/atom/ns#" term="mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>There are approximately N/ln(N) primes between N and 2N</title><content type='html'>Just saw &lt;a href=&quot;http://www.youtube.com/watch?v=l8ezziaEeNE&quot;&gt;this very nice video&lt;/a&gt; by &lt;a href=&quot;https://twitter.com/numberphile&quot;&gt;@numberphile&lt;/a&gt;, and thought I whip up a small Python program to demonstrate the prime number theorem:
  619. &lt;pre class=&quot;brush:python&quot;&gt;
  620. #!/usr/bin/env python
  621. #
  622. # &quot;Chebyshev said it, and I say it again: There&#39;s always a prime between n and 2n.&quot;
  623. #
  624.  
  625. import sys
  626. import math
  627.  
  628. class PrimeFinder:
  629.  
  630.    def __init__( self, n ):
  631.        self.n = n
  632.    
  633.    def isNPrime( self, N ):
  634.        for x in range( 2, int( math.sqrt( N ) ) + 1 ):
  635.            if N % x == 0:
  636.                return False
  637.        return True
  638.  
  639.    def computeAllPrimesBetweenNAndTwoN( self ):
  640.        result = []
  641.        for N in range( self.n, 2 * self.n + 1 ):
  642.            if self.isNPrime( N ):
  643.                result = result + [ N ]
  644.        return result
  645.  
  646. def main():
  647.    if len( sys.argv ) != 2:
  648.        print &quot;Prints all prime numbers between N and 2N&quot;
  649.        print &quot;Usage: %s N&quot; % sys.argv[ 0 ]
  650.        print &quot;Where N is some positive, natural number.&quot;
  651.        sys.exit( 0 )
  652.  
  653.    N = int( sys.argv[ 1 ] )
  654.    primeFinder = PrimeFinder( N )
  655.    allPrimes = primeFinder.computeAllPrimesBetweenNAndTwoN()
  656.    print &quot;There are %u primes between %u and %u: %s&quot; % (
  657.        len( allPrimes ), N, 2 * N, str( allPrimes )[ 1 : -1 ]
  658.    )
  659.  
  660. if __name__ == &quot;__main__&quot;:
  661.    main()
  662. &lt;/pre&gt;
  663.  
  664. And it seems to work, but check &lt;a href=&quot;http://wolfr.am/17LMVLl&quot;&gt;WolframAlpha&lt;/a&gt; if you don&#39;t trust me :)
  665.  
  666. &lt;pre class=&quot;brush:bash&quot;&gt;
  667. $ ./myprimes.py 100000
  668. There are 8392 primes between 100000 and 200000: 100003, 100019, 100043 ...
  669. &lt;/pre&gt; </content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/8355135196068404913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/08/there-are-approximately-nlnn-primes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8355135196068404913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/8355135196068404913'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/08/there-are-approximately-nlnn-primes.html' title='There are approximately N/ln(N) primes between N and 2N'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-5170235993989943387</id><published>2013-08-06T17:39:00.000+02:00</published><updated>2013-08-06T17:39:05.718+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to read input from a bunch of commands in bash</title><content type='html'>You can use the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;( ... )&lt;/span&gt; subshell syntax to read from a bunch of commands, that you whip up on the fly:&lt;br /&gt;
  670. &lt;pre class=&quot;brush:bash&quot;&gt;
  671. cat &lt; &lt;( echo &quot;foo&quot;; sleep 2; echo &quot;bar&quot; )
  672. &lt;/pre&gt;
  673. You can use this for example for &lt;a href=&quot;http://stackoverflow.com/questions/14959461/how-to-talk-to-imap-server-in-bash-via-openssl&quot;&gt;accessing IMAP servers&lt;/a&gt;, which need a short delay during login.</content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/5170235993989943387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/08/how-to-read-input-from-bunch-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/5170235993989943387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/5170235993989943387'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/08/how-to-read-input-from-bunch-of.html' title='How to read input from a bunch of commands in bash'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8130446119807415263.post-5715533731715575130</id><published>2013-07-29T09:01:00.000+02:00</published><updated>2013-07-30T15:03:59.122+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="console"/><category scheme="http://www.blogger.com/atom/ns#" term="terminal"/><category scheme="http://www.blogger.com/atom/ns#" term="tmux"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>How to get Ctrl+Arrow working for programs running in tmux?</title><content type='html'>&lt;div&gt;
  674. The key combination of &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Ctrl+arrow&lt;/span&gt; key is often used for skipping forward or backward whole words. This can be used in the bash command line, &lt;a href=&quot;http://www.gnu.org/software/emacs/manual/html_node/emacs/Moving-Point.html&quot;&gt;Emacs&lt;/a&gt; and many other programs. However, when I am using &lt;a href=&quot;http://tmux.sourceforge.net/&quot;&gt;tmux&lt;/a&gt;, this will not work. You can fix this, by adding the following to your &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;~/.tmux.conf&lt;/span&gt;:&lt;br /&gt;
  675. &lt;br /&gt;&lt;/div&gt;
  676. &lt;pre class=&quot;brush:text&quot;&gt;set-window-option -g xterm-keys on
  677. &lt;/pre&gt;
  678. &lt;div&gt;
  679. &lt;br /&gt;&lt;/div&gt;
  680. &lt;div&gt;
  681. This was explained in a &lt;a href=&quot;http://superuser.com/questions/401926/how-to-get-shiftarrows-and-ctrlarrows-working-in-vim-in-tmux&quot;&gt;nice superuser Q&amp;amp;A&lt;/a&gt;.&lt;/div&gt;
  682. &lt;div&gt;
  683. You can interactively try out &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;tmux&lt;/span&gt; commands by hitting &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;C-b :&lt;/span&gt; -- this will enter the command mode. You can use &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;tab&lt;/span&gt; to complete commands.
  684. &lt;/div&gt;
  685. </content><link rel='replies' type='application/atom+xml' href='http://root42.blogspot.com/feeds/5715533731715575130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://root42.blogspot.com/2013/07/how-to-get-ctrlarrow-working-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/5715533731715575130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8130446119807415263/posts/default/5715533731715575130'/><link rel='alternate' type='text/html' href='http://root42.blogspot.com/2013/07/how-to-get-ctrlarrow-working-for.html' title='How to get Ctrl+Arrow working for programs running in tmux?'/><author><name>root42</name><uri>http://www.blogger.com/profile/13597121138269728177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_Mc79Xvd2xvE/SyAX7iyxmhI/AAAAAAAAANY/otm-HdrlhJc/S220/Foto+36.jpg'/></author><thr:total>0</thr:total></entry></feed>

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid Atom 1.0" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//root42.blogspot.com/feeds/posts/default

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda