<?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:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8512538822850128037</id><updated>2010-08-31T22:28:35.401+02:00</updated><title type='text'>why I like tech</title><subtitle type='html'>stuff like perl bash emacs java linux networks foo bar and baz.&lt;br&gt;and other stuff. maybe.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default?orderby=updated'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default?start-index=26&amp;max-results=25&amp;orderby=updated'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-3832964783248462021</id><published>2010-04-17T22:24:00.005+02:00</published><updated>2010-04-17T23:12:04.675+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dns'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Emacs lisp</title><content type='html'>&lt;p&gt;These last couple days I've been fiddling more and more with emacs lisp, aka elisp. Its nice to finally have the time to program for fun. I haven't done any lisp-like programming since Uni, and I've missed it.&lt;/p&gt;

&lt;p&gt;Heres a little function I wrote a couple months ago which solves something which bugged me for a long time. At work, we work with DNS zone files alot, and we make heavy use of the $include directive. This means that one zone file is spread out among anything between one to dozens of files.&lt;/p&gt;

&lt;p&gt;When opening one of these files, emacs looks through the syntax and decides that the contents of the buffer should be in DNS mode, and sets the major-mode accordingly. And with normal one-file zonefiles this wouldn't be a problem. In multi-file zonefiles, this becomes a pain, since it tries to help by incrementing the serial number in the SOA-record when saving.&lt;/p&gt;

&lt;p&gt;In multi-file zonefiles all but one of the files (the first one, which $includes all the others) lack a SOA post. So emacs refuses to save complaining that it "Cannot locate SOA record".&lt;/p&gt;

&lt;p&gt;So I wrote a very small and nice piece of &lt;a href="http://www.gnu.org/s/emacs/manual/html_node/elisp/Advising-Functions.html"&gt;advice&lt;/a&gt; which is called just before calling the soa serial increment function.&lt;/p&gt;

&lt;p&gt;The thing is, we don't specify a Serial number at all- that is taken care of by the Makefile which does all the syntax checks, zone transfers, etc for us. So... we want to avoid incrementing the serial if &lt;ol&gt;&lt;li&gt;There is no SOA post&lt;/li&gt;&lt;li&gt;There is a SOA post, but a serial spaceholder is there too, namely '@SERIAL@'.&lt;/li&gt;&lt;/ol&gt;

&lt;pre&gt;
;; auto-activated if we're in dns-mode.
(defadvice dns-mode-soa-maybe-increment-serial (before maybe-set-increment)
  "if there is a dns soa post and no @SERIAL@, increment it. Otherwise, do nothing"
  (save-excursion
    (goto-char (point-min))
    (setq dns-mode-soa-auto-increment-serial
          (and (search-forward-regexp "IN[ ''\t'']+SOA" nil t)
               (not (search-forward-regexp "@SERIAL@" nil t))))
    )
  )
(ad-activate 'dns-mode-soa-maybe-increment-serial)
&lt;/pre&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-3832964783248462021?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/3832964783248462021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2010/04/emacs-lisp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3832964783248462021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3832964783248462021'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2010/04/emacs-lisp.html' title='Emacs lisp'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-8251508210061964903</id><published>2010-04-17T23:00:00.003+02:00</published><updated>2010-04-17T23:12:04.674+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dns'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Sorting all A-records in region</title><content type='html'>&lt;p&gt;So, you've got a lot of A-records in your DNS zone file, and for one reason or the other you dont want to sort all the records in ascending order by IP. It could be that you have each A-record followed by TXTs or CNAMEs, or whatever.&lt;/p&gt;

&lt;p&gt;I often want to know what IPs are free. By sorting them I can easily see which ones are not in use.&lt;/p&gt;

&lt;p&gt;
&lt;pre&gt;
(defun sort-A-records (start-pos end-pos)
  "Given a DNS buffer containing a bunch of A-records, this
function finds all records inside a region and sorts them by ip
address. The output is placed in a temporary buffer called
'sorted-ips'.

Todo someday: support the GENERATE directive"
  (interactive "r")

  ;; --------------------------------------------------
  ;; Helper functions
  (defun eq-octet (a b index)
    (= (string-to-number (nth index a))
       (string-to-number (nth index b))))

  (defun lt-octet (a b index)
    (&lt; (string-to-number (nth index a))
                    (string-to-number (nth index b))))


  (defun sort-hash-by-ip (hashtable)
    (let (mylist)
      (setq mylist         ;; Create a list of ip-hostname pairs
            (let (mylist)
              (maphash
               (lambda (kk vv)
                 (setq mylist (cons (list kk vv) mylist))) hashtable)
              mylist
              ))
      (sort mylist         ;; sort them by ip
            (lambda (y z)
              (setq y (split-string  (car y) "\\."))
              (setq z (split-string  (car z) "\\."))

              (if (eq-octet y z 0)
                  (if (eq-octet y z 1)
                      (if (eq-octet y z 2)
                          (lt-octet y z 3)
                        (lt-octet y z 2))
                    (lt-octet y z 1))
                (lt-octet y z 0))
              )
            )
      )
    )



  ;; --------------------------------------------------
  ;; Main body starts here
  (let (iphash)
    ;; create hash
    (setq iphash (make-hash-table :test 'equal))

    ;; if no region selected, just grab all A-records from point.
    (setq end-pos (if (= (point) (mark)) (end-of-buffer)))
    (if (&gt; (point) (mark)) (exchange-point-and-mark))

    (while (search-forward-regexp
            "^\\([[:alnum:]\.-]+\\).*?[ ''\t'']A[ ''\t'']+.*?\\([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\\)" end-pos 1)
      (puthash (match-string 2) (match-string 1) iphash)
      )

    (with-output-to-temp-buffer "sorted-ips"
      (let (item mylist)
        (setq mylist (sort-hash-by-ip iphash))
        (while (setq item (pop mylist))
          (princ (format "%s\t%s\n" (car item) (cadr item)))
          )
        )
      )
    )
  )
&lt;/pre&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-8251508210061964903?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/8251508210061964903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2010/04/another-function-little-more-ambitious.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8251508210061964903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8251508210061964903'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2010/04/another-function-little-more-ambitious.html' title='Sorting all A-records in region'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-2656091118345463021</id><published>2009-09-20T22:17:00.003+02:00</published><updated>2009-09-20T22:20:58.989+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='games'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Word permutations</title><content type='html'>&lt;p&gt;I wrote a web-based word permutator in perl for getting all legal letter combos (also known as... words) given a string of characters. Why I wrote it? So that I can cheat when I get stuck when playing Scrabble and the like.&lt;p&gt;

&lt;p&gt;You can play with it here: &lt;a href="http://blahonga2.yanson.org/ww"&gt;http://blahonga2.yanson.org/ww&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-2656091118345463021?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/2656091118345463021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/09/word-permutations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2656091118345463021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2656091118345463021'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/09/word-permutations.html' title='Word permutations'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-8657008346673306403</id><published>2009-09-20T21:27:00.003+02:00</published><updated>2009-09-20T21:56:35.248+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc geek'/><category scheme='http://www.blogger.com/atom/ns#' term='spotify'/><title type='text'>Modifying gnome-terminal to understand Spotify URIs</title><content type='html'>&lt;p&gt;My primary tool on my Debian box (asides from emacs) is gnome-terminal. I use &lt;a href="http://www.mutt.org/"&gt;mutt&lt;/a&gt; for email, and &lt;a href="http://irssi.org/"&gt;irssi&lt;/a&gt; for irc. 
&lt;/p&gt;
&lt;p&gt;And since I'm an avid user of &lt;a href="http://www.spotify.com"&gt;Spotify&lt;/a&gt;, and trade links to music with my friends and collegues, I've been irritated about the fact that I cant click on Spotify URIs in the terminal like I can with mailto: and http: tags.
&lt;/p&gt;
&lt;p&gt;So I fixed it. Its a rather simple fix, but very useful. Here's how I did it. Oh and btw, since Lenny's version of gnome-terminal is rather old, this fix works only on gnome-terminal version 2.22.3- the version which comes with Lenny.
&lt;/p&gt;
&lt;p&gt;Anyway, quick summary of what we'll do. We download the source for gnome-terminal, apply a little patch to it, compile the code, and register the spotify: URI with gnome.
&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt; Download and unpack the source code &lt;pre&gt;$ wget  http://ftp.acc.umu.se/pub/gnome/sources/gnome-terminal/2.22/gnome-terminal-2.22.3.tar.gz
$ tar zxvf gnome-terminal-2.22.3.tar.gz
$ cd gnome-terminal-2.22.3/&lt;/pre&gt;
  &lt;/li&gt;

  &lt;li&gt; Apply patch&lt;pre&gt;$ cat &gt; gnome-terminal-spotify.diff &amp;lt;&amp;lt;EOF
87c87,88
&lt;   FLAVOR_EMAIL
---
&gt;   FLAVOR_EMAIL,
&gt;   FLAVOR_SPOTIFY
314c315
&lt; #define SCHEME    "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)"
---
&gt; #define SCHEME    "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:|spotify:)"
332a334,337
&gt;                            "\\&lt;(spotify:)[^&lt;&gt;\ \t\n\r]*\\&gt;",
&gt;                            FLAVOR_SPOTIFY);
&gt; 
&gt;   terminal_widget_match_add (screen-&gt;priv-&gt;term,
1438a1444,1446
&gt;     case FLAVOR_SPOTIFY:
&gt;       url = g_strdup (orig_url);
&gt;       break;
EOF
$ patch src/terminal-screen.c gnome-terminal-spotify.diff&lt;/pre&gt;
&lt;/li&gt;

  &lt;li&gt; Compile the code&lt;pre&gt;$ ./configure
$ make
$ sudo make install&lt;/pre&gt;&lt;/li&gt;

  &lt;li&gt;Register the spotify: URI&lt;pre&gt;$ gconftool-2 --set --type=string /desktop/gnome/url-handlers/spotify/command " wine 'c:\Program Files\Spotify\Spotify.exe' '-uri' '%s'"
$ gconftool-2 --set --type=bool /desktop/gnome/url-handlers/spotify/enabled true
$ gconftool-2 --set --type=bool /desktop/gnome/url-handlers/spotify/need-terminal false&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember that all the different gnome-terminals run under the same process, so when testing you'll want to spawn one as a separate process:&lt;pre&gt;/usr/local/bin/gnome-terminal --disable-factory&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;All done!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-8657008346673306403?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/8657008346673306403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/09/modifying-gnome-terminal-to-understand.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8657008346673306403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8657008346673306403'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/09/modifying-gnome-terminal-to-understand.html' title='Modifying gnome-terminal to understand Spotify URIs'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-810943292113876905</id><published>2009-07-11T01:41:00.005+02:00</published><updated>2009-07-12T11:55:54.847+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Pain upgrading the iPhone to 3.0 under Virtualbox</title><content type='html'>&lt;p&gt;
&lt;i&gt;Edit:&lt;/i&gt; I was informed by &lt;a href="http://nathanhowell.net"&gt;neh&lt;/a&gt; that all this was unnecessary, as you can get Vbox to auto-connects devices. Thanks Nathan!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Long story short:&lt;/b&gt; An upgrade to iphone version 3.0 under virtualbox and Debian as host system is possible, but it has to be done just right.&lt;/p&gt;

&lt;p&gt;
What you need to know before upgrading:
&lt;ul&gt;
&lt;li&gt;During the upgrade, the iPhone changes USB ID twice.
&lt;/ul&gt;&lt;/p&gt;

&lt;p&gt;Yep thats about it. What you do is this.
&lt;ol&gt;
&lt;li&gt;Jack in your iPhone to your linux box.
&lt;li&gt;Verify that it has been connected by running the command 'lsusb' in a terminal. You should see something like this:
&lt;pre&gt;
$ lsusb | grep -i apple
Bus 001 Device 006: ID 05ac:1292 Apple, Inc. 
$
&lt;/pre&gt;
&lt;li&gt;Now start virtualbox. In the settings for your Windows guestOS, under USB: check that your iPhone is visible and selected.
&lt;li&gt;Start the guestOS. Your iPhone should be autodetected and iTunes should start up.
&lt;li&gt;Tell iTunes to start the upgrade. (I have to admit I dont remember if iTunes prompted me to upgrade or if I somehow chose to. Click around till you get to upgrade.)
&lt;li&gt;Once it starts to upgrade, you'll notice that an icon at the bottom of the vbox window (dont run full screen!) looks kind of like a usb stick. Hover your mouse over it, and you should see a popup with a string like "Apple Iphone". 
&lt;li&gt;Here's the tricky part. Once it is ready to upgrade, the iPhone drops into 'recovery mode', and it changes USB ID. When it changes USB ID it VirtualBox will 
&lt;ol&gt;
&lt;li&gt;Detect that the old usb device (Apple Inc. iPhone) has disappeared.
&lt;li&gt;not automatically present the new device which your linux machine has detected.
&lt;/ol&gt;
&lt;li&gt;Turn off your guestOS (even if you need to SIGKILL it).
&lt;li&gt;Start up Virtualbox again.
&lt;li&gt;In the Settings for USB, look for the new device. It should be called something like "iPhone recovery device" or something.
&lt;li&gt;&lt;i&gt;Make sure that both your original iPhone device and the new device are visible in your list of USB devices.&lt;/i&gt; Only the recovery device need be checked.
&lt;li&gt;Start up your guestOS.
&lt;li&gt;Once started, check that the Recovery USB device is actually activated, by hovering over the USB icon at the bottom of the vbox window. If it doesn't show the name of the recovery device in bold, right click the icon and select it to activate it.&lt;br&gt;For me, this happened a number of times. There seems to be a timer involved- if you dont re-activate the device in time, you'll have to start again from the previous bullet. You'll get an error message- I think it was error 1604. Like I said, just restart the guestOS, and you should be fine.&lt;br&gt;Note: I had to restart my hostOS as well once, since I uncleanly killed the virtualbox process, leaving a tainted kernel module which refused to work properly.
&lt;li&gt;After a while, the process reverses itself- that is, the recovery device is not considered necessary anymore, and it disappears from the list of USB devices. Instead, you'll need to actively select the regular iPhone device. The normal timer rule applies.
&lt;li&gt;After a few more activating devices manually, you should be told by iTunes that the upgrade is complete. Now you'll need to re-activate the iphone device one last time for the final sync, to get all your precious data back into your system.
&lt;/ol&gt;
&lt;/p&gt;
&lt;p&gt;Thats about it!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-810943292113876905?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/810943292113876905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/07/pain-upgrading-iphone-to-30-under.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/810943292113876905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/810943292113876905'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/07/pain-upgrading-iphone-to-30-under.html' title='Pain upgrading the iPhone to 3.0 under Virtualbox'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-2527985091994344989</id><published>2009-03-21T00:15:00.002+01:00</published><updated>2009-03-21T00:20:52.893+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc geek'/><title type='text'>Text-based Graphical Desktop Environment</title><content type='html'>&lt;p&gt;I was directed by &lt;a href="http://www.reddit.com"&gt;reddit&lt;/a&gt; over to a project by a certain gentleman called Andrew Wales; where he has managed to run a X server using aalib to render the display. &lt;/p&gt;
&lt;p&gt;You really have to check out the screenshots, totally awesome! &lt;a href="http://www.meow.org.uk/stan/xserver"&gt;http://www.meow.org.uk/stan/xserver&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine running mplayer with aalib as video out under an aalib X server!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-2527985091994344989?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/2527985091994344989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/03/text-based-graphical-desktop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2527985091994344989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2527985091994344989'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/03/text-based-graphical-desktop.html' title='Text-based Graphical Desktop Environment'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-3458966964974808585</id><published>2009-03-19T20:24:00.002+01:00</published><updated>2009-03-19T20:33:45.751+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>emacs unstable?</title><content type='html'>&lt;p&gt;For the first time ever (as far as I remember anyway), emacs
crashed on me. Or rather- it froze. I'm guessing it wasn't the core
application as delivered by the GNU folks- its probably in one of the
modules I loaded when I was testing connecting to twitter and running
ssh from emacs.&lt;/p&gt;
&lt;p&gt;I guess I've learned my lesson- start a separate instance of emacs
  for testing, leave the ordinary one alone. Right now I have no idea
  how many buffers and shells I had open... All I know is that my
  machine has an uptime of two months, and I'm rather certain that the
  first program I started was emacs. And I never turn it off...&lt;/p&gt;
&lt;p&gt;Oh well.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-3458966964974808585?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/3458966964974808585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/03/emacs-unstable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3458966964974808585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3458966964974808585'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/03/emacs-unstable.html' title='emacs unstable?'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-8319542049333314456</id><published>2009-03-13T22:11:00.003+01:00</published><updated>2009-03-13T22:23:00.052+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='japan'/><title type='text'>Japanese music via last.fm</title><content type='html'>&lt;p&gt;For years I've been moaning over how hard it was to get a feel for what was popular in Japanese music. The other day I realized that I could satiate my desire for Japanese music from last.fm.&lt;/p&gt;

&lt;p&gt;Hurrah!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-8319542049333314456?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/8319542049333314456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/03/japanese-music-via-lastfm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8319542049333314456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8319542049333314456'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/03/japanese-music-via-lastfm.html' title='Japanese music via last.fm'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-4274202740947485204</id><published>2008-12-14T15:23:00.006+01:00</published><updated>2009-03-11T22:44:08.675+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>continuous ls in bash</title><content type='html'>Here's a bash function I use often at work, when I'm waiting for a
file to be saved (or updated) in a directory. It runs &lt;code&gt;ls
-larth&lt;/code&gt; regularly in your terminal. It works under bash, and
assumes that you've set the checkwinsize setting in bash.&lt;/p&gt; &lt;pre&gt;shopt -s checkwinsize

wls () { 
  arg=$1;
  seconds=${arg:=5};
  while true; do
    clear;
    echo "$(date) (refresh rate: ${seconds}s)";
    i=$COLUMNS;
    while test $i -gt 1; do
      echo -n '-';
      i=$(( $i - 1 ));
    done;
    echo;
    ls -larth |\
      tail -n $(( $LINES - 3 )) |\
      cut -c-$COLUMNS |\
      grep -v ^total;
    sleep $seconds;
  done
}
&lt;/pre&gt;
&lt;p&gt;
  It keeps track of the size of your terminal, so if there are more
  files than the number of lines in your xterm it will not display the
  oldest ones. Likewise, if there are files with filenames which are
  very long, they will also be truncated.
&lt;/p&gt;
&lt;p&gt;
  Oh, and finally, it takes a number as param, so it will wait N
  seconds between updates. Default sleep time is 5.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-4274202740947485204?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/4274202740947485204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/continuous-ls-in-bash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/4274202740947485204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/4274202740947485204'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/continuous-ls-in-bash.html' title='continuous ls in bash'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-5052204532344786356</id><published>2008-12-14T16:47:00.002+01:00</published><updated>2009-03-11T22:43:24.420+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>A consistent titlebar in emacs</title><content type='html'>&lt;p&gt;
If I know that I will be working for a while on a machine, I install
emacs onto it. In the past, depending on the version of emacs and the
build, I would have a different titlebar on my emacsen. Heres a bit of
code which standardizes the titlebar, judging from certain environment
variables. &lt;/p&gt;
&lt;pre&gt;;; Create a reasonable titlebar for emacs, which works
;; on both windows and unix.
;; Note: assumes HOSTNAME is exported.
(defun create_title_format (user host)
  "Creates a window title string"
  (interactive)
  (list (getenv user) "@" (getenv host) ":"
        '(:eval
          (if buffer-file-name
              (replace-regexp-in-string
               (getenv "HOME")
               "~"
               (buffer-file-name))
            (buffer-name))))
  )
;; Set window and icon title.
(if (eq system-type 'windows-nt)
    (setq frame-title-format
          (create_title_format "USERNAME" "COMPUTERNAME"))
  (setq frame-title-format
        (create_title_format "USER" "HOSTNAME")))

&lt;/pre&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-5052204532344786356?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/5052204532344786356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/consistent-titlebar-in-emacs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/5052204532344786356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/5052204532344786356'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/consistent-titlebar-in-emacs.html' title='A consistent titlebar in emacs'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-2637884550143126339</id><published>2008-12-18T23:41:00.005+01:00</published><updated>2009-03-11T22:42:35.776+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Easy bash file backup command</title><content type='html'>&lt;p&gt;
If you want to backup a file, with timestamps (atime,ctime,mtime)
preserved, you can run this command:
&lt;pre&gt;cp -pf --backup=t filename filename&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
Course, this is a pain to write, so an alias is in order:
&lt;pre&gt;alias bk='cp -pf --backup=t'&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
To use this alias, you can type
&lt;pre&gt;bk myimportantfile.txt myimportantfile.txt&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
But then why type it twice? Use a shell function instead:
&lt;pre&gt;bk () {
    [ "$1" == "-h" ] &amp;&amp; \
        echo "Backs up one or more files." &amp;&amp; \
        echo "usage: bk filename1 [filename2...]" &amp;&amp; \
        return

    for f in $@ ; do
        local f="$1"; shift
        \cp -pf --backup=t "$f" "$f"
    done
}
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
Oh, and this script assumes
&lt;ul&gt;
&lt;li&gt;bash
&lt;li&gt;gnu ls
&lt;li&gt;gnu cp
&lt;li&gt;no whitespaces in words.
&lt;/ul&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-2637884550143126339?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/2637884550143126339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/easy-bash-file-backup-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2637884550143126339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2637884550143126339'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/easy-bash-file-backup-command.html' title='Easy bash file backup command'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-7908759885271839833</id><published>2009-01-19T22:59:00.011+01:00</published><updated>2009-03-11T22:37:07.511+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><title type='text'>Installing HP p1505n on Ubuntu 8.10</title><content type='html'>... Well it really wasn't a problem after all. Here's what I did:
&lt;ol&gt;
  &lt;li&gt;You'll need to install build-essentials first, to be able to compile in Ubuntu. Likewise, now would be a good time to install HPLIP     if you haven't already done so:
    &lt;pre&gt;sudo apt-get install build-essential hplip&lt;/pre&gt;

  &lt;li&gt;Followed the instructions over at     &lt;a href="http://foo2xqx.rkkda.com/"&gt;foo2xqx.rkkda.com&lt;/a&gt;. But to     mirror their instructions:
    &lt;pre&gt;wget http://foo2zjs.rkkda.com/foo2zjs.tar.gz
tar zxvf foo2zjs.tar.gz
cd foo2zjs
make
./getweb P1505
sudo make install
sudo make install-hotplug
sudo make cups&lt;/pre&gt;

  &lt;li&gt;Ran &lt;code&gt;system-config-printer&lt;/code&gt; in my xterm, in the GUI that would be at System-&gt;Administrator-&gt;Printing. Clicked on New.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT9ZDHSrgI/AAAAAAAAAHk/TDt48Pejlm4/s1600-h/1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 142px;" src="http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT9ZDHSrgI/AAAAAAAAAHk/TDt48Pejlm4/s320/1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5293134068841623042" /&gt;&lt;/a&gt;
  &lt;/li&gt;

  &lt;li&gt;Selected AppSocket/HP JetDirect, and entered my printer's IP address.

    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT7FXPpexI/AAAAAAAAAG8/o17cucc0ta0/s1600-h/2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 274px;" src="http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT7FXPpexI/AAAAAAAAAG8/o17cucc0ta0/s320/2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5293131531624741650" /&gt;&lt;/a&gt;
  &lt;/li&gt;

  &lt;li&gt;HP was pre-selected, I just hit Forward.

    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FxOyLiqa6m4/SXT7TGuNJzI/AAAAAAAAAHE/OYSBQGZu0fM/s1600-h/3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 274px;" src="http://4.bp.blogspot.com/_FxOyLiqa6m4/SXT7TGuNJzI/AAAAAAAAAHE/OYSBQGZu0fM/s320/3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5293131767707674418" /&gt;&lt;/a&gt;
  &lt;/li&gt;

  &lt;li&gt;Scrolled down to "LaserJet P1505" (not P1505n!) and selected the recommended driver.

    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FxOyLiqa6m4/SXT7TNGFKBI/AAAAAAAAAHM/8SV3x3tCeuo/s1600-h/4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 174px;" src="http://4.bp.blogspot.com/_FxOyLiqa6m4/SXT7TNGFKBI/AAAAAAAAAHM/8SV3x3tCeuo/s320/4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5293131769418426386" /&gt;&lt;/a&gt;
  &lt;/li&gt;

  &lt;li&gt;Gave the printer a name.

    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FxOyLiqa6m4/SXT7TlKa-AI/AAAAAAAAAHU/uSyKGWPynpk/s1600-h/5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 174px;" src="http://3.bp.blogspot.com/_FxOyLiqa6m4/SXT7TlKa-AI/AAAAAAAAAHU/uSyKGWPynpk/s320/5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5293131775879084034" /&gt;&lt;/a&gt;
  &lt;/li&gt;

  &lt;li&gt;Tada! Now I can see my new laserprinter in the list of printers.

    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT7T76DNbI/AAAAAAAAAHc/VZcIdlYo7Us/s1600-h/6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 142px;" src="http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT7T76DNbI/AAAAAAAAAHc/VZcIdlYo7Us/s320/6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5293131781984433586" /&gt;&lt;/a&gt; 
  &lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-7908759885271839833?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/7908759885271839833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/01/installing-hp-p1505n-on-ubuntu-810.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/7908759885271839833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/7908759885271839833'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/01/installing-hp-p1505n-on-ubuntu-810.html' title='Installing HP p1505n on Ubuntu 8.10'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FxOyLiqa6m4/SXT9ZDHSrgI/AAAAAAAAAHk/TDt48Pejlm4/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-8941040231330705447</id><published>2009-03-11T22:15:00.004+01:00</published><updated>2009-03-11T22:30:39.705+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>emacs via plink, Hummingbird, but no putty window</title><content type='html'>&lt;p&gt;At the office about 95% of all work I do is on unix machines,
inside of emacs. Inside of emacs, I do most of my command-line work,
SQL connections to sybase, I do my IRCing, I send email, and of course
I edit and compile code in emacs as well. Typically I have between
twenty to fifty buffers open at any given time.&lt;/p&gt;

&lt;p&gt;But I sit by a windows machine. I have to use putty to connect to
my primary development machine, where I commence with starting emacs
which opens a window on my local machine under Hummingbird's X
server.&lt;/p&gt;

&lt;p&gt;The problem with this is that after a couple of days (or hours!) I
forget which putty session spawned the emacs I'm sitting
with. Inevitably I end up hitting ctrl-d to close the window, and it
then... just hangs there, waiting for all daughter processes to
die. And emacs proudly floats there on my screen, with all my open
files, notes, running programs and sql sessions.&lt;/p&gt;

&lt;p&gt;And I don't want to close it. But the hanging putty window is
  there, in my taskbar, taunting me. What to do? &lt;/p&gt;

&lt;p&gt;I realized that I wanted to be able to start emacs on a remote
  machine without first opening a putty session. I wanted the windows
  equivalent of &lt;pre&gt;ssh -XY remotemachine.foo.com "emacs --eval \(server-start\)"&lt;/pre&gt;.&lt;/p&gt;

&lt;p&gt;Here's what I did.
&lt;ol&gt;
&lt;li&gt;First I made sure that pageant was running, and that it had my
  private key loaded. I made sure that it was auto-started by windos
  when I logged in.&lt;/li&gt;
&lt;li&gt;Next I created a putty session which contained the configurations
  necessary for X11 tunnelling etc, gave it a name 'remoteSession'.&lt;/li&gt;
&lt;li&gt;Now I created a .bat script which contained the following:&lt;pre&gt;REM Startup emacs on remote machine
plink -X -A -agent -load remoteSession -l my_username ". .bash_profile ; emacs --eval \(server-start\)"&lt;/pre&gt;This script will, when run, connect to the remote machine and start up emacs as a server. I source .bash_profile since I have some environment settings there, yhou might not need it.&lt;/li&gt;
&lt;li&gt;The thing is, the previous step works, but it leaves an ugly windows commandprompt window which just... well hangs there. If there's something that bugs me more than a useless putty session window, its the worlds ugliest shell. So I wrote a VBscript which starts the .bat script, but without a window.&lt;pre
&gt;Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) &amp; "c:\mattias_progs\devapp_emacs_server.bat" &amp; 
Chr(34), 0 
Set WshShell = Nothing &lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Finally I made a shortcut to the vb script into my start menu, so that I could fire it up at will. &lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;Its a very small improvement, but it makes everything a little easier. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-8941040231330705447?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/8941040231330705447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/03/emacs-via-plink-hummingbird-but-no.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8941040231330705447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8941040231330705447'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/03/emacs-via-plink-hummingbird-but-no.html' title='emacs via plink, Hummingbird, but no putty window'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-3311457668046573334</id><published>2009-03-11T21:41:00.001+01:00</published><updated>2009-03-11T21:42:57.772+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='middleware'/><category scheme='http://www.blogger.com/atom/ns#' term='networks'/><title type='text'>Breaking the internet paradigm with Websphere Message Broker</title><content type='html'>&lt;p&gt;I spent half of a day looking at what you can do
with &lt;a href="http://www-01.ibm.com/software/integration/wbimessagebroker"&gt;IBMs
Websphere Message Broker&lt;/a&gt; (MB). I first thought that it was a simple
suite of programs which acted 'middleware' between systems. But it
quickly dawned on me that it was so much more.&lt;/p&gt;

&lt;p&gt;Its clearly very useful. Putting it simply, you install a tube
between two applications, and this tube takes care of
transaction-based transport, caching, both low and high-level format
conversions, routing, monitoring, and more; pretty much everything you
can think of except the kitchen sink is included in this 'tube'.&lt;/p&gt;

&lt;p&gt;So on one side of a transaction, you might have a legacy system
which can only import comma-separated data from a file in seven-bit
ASCII. On the other we might have a system which includes a Web
service which spits out XML in UTF-16. Between them you have this
'tube', which will connect to the webservice, get a bunch of data,
convert between the two formats (both hi and lo level) and deliver the
data as a file to the target system.&lt;/p&gt;

&lt;p&gt;Very nice. Very tempting.&lt;/p&gt;

&lt;p&gt;Question is if the old rule of the Internet "Keep the network dumb,
move intelligence out from the core towards to edges" applies
here.&lt;/p&gt;

&lt;p&gt;I think it does.&lt;/p&gt;

&lt;p&gt;By making the network smart, the edges will become more and more
dependent upon the network's smartness; And since the 'network' (in
the example above, the 'tube') is actually a product delivered from a
company, all the applications and thus organizations involved will be
tightly locked-in to this company... which in MBs case is IBM.&lt;/p&gt;

&lt;p&gt;Once it has set its teeth into you organization, how do you rip
this code out without tearing your organization apart? But the
pragmatist would answer "But why would we want to tear it out in the
first place? Its so useful!"&lt;/p&gt;

&lt;p&gt;True. But the path to hell is paved with good intentions...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-3311457668046573334?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/3311457668046573334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/03/breaking-internet-paradigm-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3311457668046573334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3311457668046573334'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/03/breaking-internet-paradigm-with.html' title='Breaking the internet paradigm with Websphere Message Broker'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-6572818158242701353</id><published>2009-02-13T18:04:00.002+01:00</published><updated>2009-03-11T20:21:26.824+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc geek'/><title type='text'>echo 1234567890 - $(date %s) | bc</title><content type='html'>&lt;p&gt;
Hurray! Hurray! It's &lt;a href="http://www.1234567890day.com/"&gt;1234567890&lt;/a&gt; day today!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-6572818158242701353?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/6572818158242701353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/02/echo-1234567890-date-s-bc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/6572818158242701353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/6572818158242701353'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/02/echo-1234567890-date-s-bc.html' title='echo 1234567890 - $(date %s) | bc'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-3555031597485611692</id><published>2009-02-01T22:21:00.010+01:00</published><updated>2009-02-01T22:52:15.072+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='astronomy'/><title type='text'>Makemake</title><content type='html'>Today I was doing nothing in particular when my son asked me about the planets. Being the geek that I am, I decided to look up the &lt;a href="http://en.wikipedia.org/wiki/Solar_System"&gt;solar system in wikipedia&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Course, the article was, as expected, lengthy, but I expected a nice pic of the solar system in silhouette, so to say, with all the planets rowed up and all. What I didnt expect was that the 'dwarf planets' would be included. &lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FxOyLiqa6m4/SYYYjvJufyI/AAAAAAAAAHs/vtag3SLD0aI/s1600-h/solarsystem.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 112px;" src="http://1.bp.blogspot.com/_FxOyLiqa6m4/SYYYjvJufyI/AAAAAAAAAHs/vtag3SLD0aI/s200/solarsystem.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5297949013879717666" /&gt;&lt;/a&gt;

&lt;p&gt;
Ok, so I'm like "Ok, these first four planets are the rocky planets, and those last four planets are our gassy planets. And these are our dwarf planets- Pluto, and-"&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FxOyLiqa6m4/SYYYsHpMWSI/AAAAAAAAAH0/GtEVl5QC3AY/s1600-h/solarsystem_wtf.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 192px;" src="http://1.bp.blogspot.com/_FxOyLiqa6m4/SYYYsHpMWSI/AAAAAAAAAH0/GtEVl5QC3AY/s320/solarsystem_wtf.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5297949157893101858" /&gt;&lt;/a&gt;



&lt;p&gt;and I paused. Was someone pulling my leg? I've read about undetected sabotage in the wikipedia, could this be it? I mean, why was a perl hack which created Makefiles included in the names of the dwarf planets? Maybe an astronomer with a sense of humour? Nah, can't be. But still- it was there in front of me- a Dwarf planet called Makemake.&lt;/p&gt;



&lt;p&gt;My son didn't really understand why I was suddenly so excited. I'm like- "wait, just a sec" and I looked up &lt;a href="http://en.wikipedia.org/wiki/Makemake_(dwarf_planet)"&gt;Makemake&lt;/a&gt;, and &lt;span style="font-style:italic;"&gt;Ooooh!&lt;/span&gt; It was pronounced maké-maké. And it was "... the name of the creator of humanity and god of fertility in the mythos of the Rapanui, the native people of Easter Island ...".&lt;/p&gt;

&lt;p&gt;Boy was I disappointed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-3555031597485611692?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/3555031597485611692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/02/makemake.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3555031597485611692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/3555031597485611692'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/02/makemake.html' title='Makemake'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FxOyLiqa6m4/SYYYjvJufyI/AAAAAAAAAHs/vtag3SLD0aI/s72-c/solarsystem.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-6263746596657915026</id><published>2009-02-01T15:37:00.005+01:00</published><updated>2009-02-01T15:56:54.665+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>An old version of firefox for slower machines?</title><content type='html'>I've been thinking about this for some time now- I have a very old laptop, a Vaio PCG-505RS. Its from 1998, but works quite well, albeit slowly. I haven't tested the firewire port, but otherwise I've gotten most of it up and running.&lt;/p&gt;

&lt;p&gt;The problem is, of course, surfing the web. Running Firefox is... troublesome, since it consumes almost 50M, on this 64M RAM machine. &lt;/p&gt;

&lt;p&gt;I've tried running dillo, which is, as they say, fast and lightweight, but it has pretty much &lt;span style="font-style:italic;"&gt;no&lt;/span&gt; support for CSS and the like.&lt;/p&gt;

&lt;p&gt;Which has gotten me thinking.. what if I install one of the original versions of firefox onto this laptop? The first version of Firefox, then called &lt;a href="http://en.wikipedia.org/wiki/History_of_Mozilla_Firefox"&gt;Pheonix&lt;/a&gt; must have been lightweight. At least I don't remember it hogging lots of memory. On the other hand, at the time I was probably too excited about a possible contender to Internet Explorer to be too picky about 'details' such as memory usage.&lt;/p&gt;

&lt;p&gt;Anyway, I started looking around, and found &lt;a href="http://www.oldapps.com/"&gt;this site&lt;/a&gt;, which seems to have all of them, precompiled. What I want is the source, but a quick look around the mozilla.org site didn't turn up any results.&lt;/p&gt;

&lt;p&gt;I wonder where I can get the source for pheonix 0.1?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-6263746596657915026?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/6263746596657915026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/02/old-version-of-firefox-for-slower.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/6263746596657915026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/6263746596657915026'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/02/old-version-of-firefox-for-slower.html' title='An old version of firefox for slower machines?'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-8405787759024847641</id><published>2009-01-19T22:20:00.002+01:00</published><updated>2009-01-19T23:25:00.039+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><title type='text'>Silly HP p1505n</title><content type='html'>We bought an &lt;a href="http://www.google.com/search?q=HP+p1505n"&gt;HP p1505n LaserPrinter&lt;/a&gt; just prior to Christmas, and for one reason or the other I never got around to installing it.&lt;/p&gt;
&lt;p&gt;
The thing is, I really hate printers.&lt;/p&gt;
&lt;p&gt;
I always have. Somehow I find myself always distrusting machines with moving parts. Like those cellphones which are like in two parts which are cunningly attached, where you can rotate one section to get to the key pad. Like Automobiles- they normally break down when you need them most. Or, like in this case- printers. &lt;/p&gt;
&lt;p&gt;
Anyway, enough digressing. Last year I got a Color printer, and the &lt;a href="http://hplipopensource.com/hplip-web/index.html"&gt;HPLIP&lt;/a&gt; printer install app actually worked (!!). After that I was like... "Maybe, with the right tools, printing is not a problem anymore on Linux."&lt;/p&gt;
&lt;p&gt;
Not that printing has always been a problem- Back when I ran Gentoo Linux I normally used &lt;a href="http://www.lprng.com/"&gt;lprng&lt;/a&gt;, which, despite their horrible webpage delivers very easy-to-use and stable code. Managing printers with lprng was actually quite easy.&lt;/p&gt;
&lt;p&gt;
Enter CUPS (Common Unix Printing System). I get the reason why it was considered necessary- lprng and its relatives tend to be a little.. technical. Unix needed a simple automagic manager of printers. A couple of years ago I decided to swap Linux dists to Ubuntu, and I discovered that it was not only more complicated, but it was complicated on several layers of abstraction. It took quite a lot of hours to get things working, and subsequently I would dread the day something goes wrong, because then I would have to troubleshoot my CUPS.&lt;/P&gt;

&lt;p&gt;
Anyway. Like I said earlier, my previous install being a success and all, I'm like "This won't be so bad..." and I started HPLIP. I told HPLIP I had a new printer in my network, and yep, it discovered it and its model. It then said that it needed to download a driver for this printer, is it ok to download it - to which I said yes. Then after asking me to fill in some details (name, etc), it proudly told me that it was ready, and if I wanted to print a test page.&lt;/p&gt;
&lt;P&gt;
I answered 'yes'. After two to three minutes of waiting, I get a printout with the words:
&lt;div class="code"&gt;
**** Unable to open the initial device, quitting.
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;
Great. It felt like all the angst of CUPS revisited me. I really didn't want to troubleshoot this. So I didn't.&lt;/P&gt;
&lt;P&gt;
This was all last week. Now I'm going to try to get the damn thing to work. Wish me luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-8405787759024847641?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/8405787759024847641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/01/silly-hp-p1505n.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8405787759024847641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8405787759024847641'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/01/silly-hp-p1505n.html' title='Silly HP p1505n'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-8617628985577694184</id><published>2009-01-18T16:28:00.003+01:00</published><updated>2009-01-18T22:22:04.325+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><category scheme='http://www.blogger.com/atom/ns#' term='anime'/><title type='text'>Paprika (2006)</title><content type='html'>I really had no idea what we were going to watch when we inserted the movie &lt;a href="http://en.wikipedia.org/wiki/Paprika_(2006_film)"&gt;Paprika&lt;/a&gt; into our player. For some reason I sort of expected an Eastern European detective story or something. Man was I in for a surprise :)&lt;/p&gt;
&lt;p&gt;
If I was a little sleepy when we sat down to watch the movie, that tiredness was jolted out of me with the opening scene- This was a really, &lt;i&gt;really&lt;/i&gt; well animated Anime!&lt;/p&gt;
&lt;p&gt;
About a near future where it is possible to enter another person's dreams, it quickly gets freaky. Quite disturbing. It reminds me of Philip K. Dick's books- psychadelic and deep on one end and at the same time rather easy to digest.&lt;/p&gt;
&lt;p&gt;
The music score, by 平沢 進 (Hirasawa Susumu) is totally awesome. Today, in the light of day, I listened to the soundtrack of the movie, and the Japanese electro-pop (which I normally do not like) really got to me- hypnotic, in some ways.&lt;/p&gt;
&lt;p&gt;
Finally, I did some searching on the google and Imdb, and discovered that the director- 今 敏 (Kon Satoshi) - did some of my other favourites. He directed  &lt;a href="http://en.wikipedia.org/wiki/Tokyo_Godfathers"&gt;Tokyo&amp;nbsp;Godfathers&lt;/a&gt; which we saw some months ago (About some homeless in Tokyo who discover a baby in a dumpster), and the first mini-movie in  &lt;a href="http://en.wikipedia.org/wiki/Memories_(film)"&gt;Memories&lt;/a&gt;, called 彼女の想いで (Kanojo no Omoide), called "Magnetic Rose" for some reason in the English translation. He also directed &lt;a href="http://en.wikipedia.org/wiki/Perfect_Blue"&gt;Perfect Blue&lt;/a&gt; which deals with another variant of insanity. &lt;/p&gt;
&lt;p&gt;
Anyway, Paprika was well worth watching. I normally don't suggest dubbing, but the story paces up at times and it's probably difficult to read (and digest) the subtitles. If you don't understand Japanese I won't get mad at you if you choose the dubbed version. I promise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-8617628985577694184?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/8617628985577694184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/01/paprika-2006.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8617628985577694184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/8617628985577694184'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/01/paprika-2006.html' title='Paprika (2006)'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-2450468084167247982</id><published>2009-01-15T23:02:00.002+01:00</published><updated>2009-01-15T23:21:58.226+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mutt'/><category scheme='http://www.blogger.com/atom/ns#' term='mail'/><title type='text'>bye-bye Muttng! Hello again Mutt!</title><content type='html'>For the last couply of years I've been an enthusiastic user
of &lt;a href="http://mutt-ng.berlios.de/"&gt;mutt-ng&lt;/a&gt;. Prior to using
mutt-ng, I used mutt- but was really irritated over some things:
&lt;ul&gt;
&lt;li&gt;Changing IMAP directories took forever- it had to re-read
    all headers in that directory, which takes... time.&lt;/li&gt;
&lt;li&gt;I found it a little irritating that I couldnt see a list of imap
    folders on the left, like in most GUI mail user agents (MUAs). &lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;Enter mutt-ng. Mutt-ng took lots of mutt patches which for some
  reason hadn't found its way into mutt. Other than that it was the
  same old app. My two issues with mutt (see above) were dealt
  with. Yay!&lt;/p&gt;

&lt;p&gt;Problem was, that since 2006 there hasn't really been any
  development in the project, and it made me wonder if mutt-ng had been
  perfected (ahem. No program is ever perfected right?), or if no-one
  used it anymore. If noone uses it... well, what DO they use then?
  Have they gone back to mutt, or have they jumped ship to other MUAs?&lt;/p&gt;

&lt;p&gt;The other day I decided to make a clean upgrade on my home computer
  to Ubuntu 8.10, and for some reason or the other forgot to
  re-compile mutt-ng (I checked mail by ssh-ing to one of my other
  machines). A few days ago I was idling thru the zillions of packages
  in apt, and found... &lt;i&gt;mutt-patched&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;For all I can see there is no real difference between mutt-ng and
  mutt-patched in that both support the sidebar as well as header
  caching. The main difference lies in that mutt-patched is supported
  enough to actually have made it into apt.&lt;/p&gt;

&lt;p&gt;Its nice to be back using mutt.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-2450468084167247982?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/2450468084167247982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2009/01/bye-bye-muttng-hello-again-mutt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2450468084167247982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/2450468084167247982'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2009/01/bye-bye-muttng-hello-again-mutt.html' title='bye-bye Muttng! Hello again Mutt!'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-4824664510778422081</id><published>2008-12-14T13:20:00.005+01:00</published><updated>2008-12-14T14:18:05.105+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>copying and pasting in emacs</title><content type='html'>I've used emacs for almost 15 years, and it's strange, but when I
wanted to copy and paste, I've always cut the text first, then pasted
it back, then finally pasted it where I wanted it to be.
&lt;/p&gt;
&lt;p&gt;
It's only recently that I noticed that M-w copied the text to the
clipboard. Silly, I know.
&lt;/p&gt;
&lt;p&gt;
Here's some commands I use regularly when editing text:
&lt;table&gt;
  &lt;tr&gt;
    &lt;th valign='bottom'&gt;key
    binding&lt;/th&gt;&lt;th valign='bottom'&gt;description&lt;/th&gt;&lt;th valign='bottom'&gt;emacs command&lt;/th&gt;
  &lt;/th&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-space&lt;/td&gt;&lt;td valign='top'&gt;Start selection of region. Everything selected is
      automatically copied to clipboard.&lt;/td&gt;&lt;td valign='top'&gt;set-mark-command&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-p, C-M-p&lt;/td&gt;&lt;td valign='top'&gt;Up one line, one block back,
    respectively&lt;/td&gt;&lt;td valign='top'&gt;previous-line, backward-list&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-n, C-M-n&lt;/td&gt;&lt;td valign='top'&gt;Down one line, one block forward,
    respectively&lt;/td&gt;&lt;td valign='top'&gt;next-line, forward-list&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-f, M-f&lt;/td&gt;&lt;td valign='top'&gt;Forward one letter, forward one word,
    respectively&lt;/td&gt;&lt;td valign='top'&gt;forward-char, forward-word&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-b, M-b&lt;/td&gt;&lt;td valign='top'&gt;Back one letter, back one word,
    respectively&lt;/td&gt;&lt;td valign='top'&gt;backward-char, backward-word&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-w&lt;/td&gt;&lt;td valign='top'&gt;Cut region to clipboard&lt;/td&gt;&lt;td valign='top'&gt;kill-region&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;M-w&lt;/td&gt;&lt;td valign='top'&gt;Copy region to clipboard&lt;/td&gt;&lt;td valign='top'&gt;kill-ring-save&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;C-y&lt;/td&gt;&lt;td valign='top'&gt;Paste most recent text from clipboard&lt;/td&gt;&lt;td valign='top'&gt;yank&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign='top'&gt;M-y&lt;/td&gt;&lt;td valign='top'&gt;Cycle through clipboard history (start with one
    C-y, then follow with multiple M-y)&lt;/td&gt;&lt;td valign='top'&gt;yank-pop&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-4824664510778422081?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/4824664510778422081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/copying-and-pasting-in-emacs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/4824664510778422081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/4824664510778422081'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/copying-and-pasting-in-emacs.html' title='copying and pasting in emacs'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-465404003661313294</id><published>2008-12-13T23:33:00.002+01:00</published><updated>2008-12-13T23:56:12.014+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Firefox plugin: Its all Text!</title><content type='html'>This is a firefox plugin I use all the time at work. For me its very
  useful- what does it do? Well, you know those textareas in web pages?
  Where you are supposed to write stuff, like um I dont know, blog
  posts, wiki entries, etc? They are a pain to write in. First off,
  they're too small, and then I miss all my shortcuts and macros from
  emacs.
&lt;/p&gt;
&lt;p&gt;
  Enter 'Its all Text!'. You install it, then you can tell it to make
  all editing come in a separate app. Since I use emacsclient (at
  work. At home I use gnuclient), I have an emacs server running on
  one of my desktops which the firefox plugin calls. An emacs window
  pops up, I get to type away, and when I hit C-c C-c. The text gets
  pushed into the textarea, and I'm done :)
&lt;/p&gt;
&lt;p&gt;
  This this much easier that bumbling about using g-client, but otoh
  its not a clean solution... Which to choose?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-465404003661313294?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/465404003661313294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/firefox-plugin-its-all-text.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/465404003661313294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/465404003661313294'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/firefox-plugin-its-all-text.html' title='Firefox plugin: Its all Text!'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-9143086849594887976</id><published>2008-12-13T23:31:00.006+01:00</published><updated>2008-12-13T23:55:43.938+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Ok, so here's how I got g-client to work</title><content type='html'>g-client is an emacs library which enables your emacs to access
blogger, google calendar, etc. I tried it in the previous post, and it
seemed to work quite well, albeit a bit unpolished.&lt;/p&gt;
&lt;p&gt;
First off, I downloaded &lt;a href='http://emacspeak.googlecode.com/files/g-client.tar.bz2'&gt;g-client&lt;/a&gt; from googlecode.com. Once I got it down, I followed the instructions over at &lt;a href='http://emacspeak.blogspot.com/2007/03/emacs-client-for-google-services.html'&gt;emacsspeak&lt;/a&gt;- that is, I unpacked it, ran &lt;code&gt;make&lt;/code&gt;, then tried to load the library into emacs.&lt;/p&gt;
&lt;p&gt;
  Beep! Nope, I got an error complaining that emacs couldn't find something called 'g-cus-load'. After some googling, I found that it was enough to create a file with that name (g-cus-load.el), which contains the following line:
&lt;pre&gt;
(provide 'g-cus-load)
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
  After this, I ran into my next problem- how to use it? The 'manual' over at emacsspeak is terse to say the least- not much of a manual. I'm a bit too tired to start reading new code, so instead I just tried running various commands starting with gblogger (M-x gblogger tab tab).
&lt;/p&gt;
&lt;p&gt;
  Question is, how to customize? The manual states that I'm supposed to use the &lt;code&gt;customize&lt;/code&gt; interface, but all I could find was an empty G group under Applications. Strange.
&lt;/p&gt;
&lt;p&gt;
  Anyhow, I'm writing in emacs right now, and its quite nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-9143086849594887976?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/9143086849594887976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/ok-so-here-how-i-did-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/9143086849594887976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/9143086849594887976'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/ok-so-here-how-i-did-it.html' title='Ok, so here&apos;s how I got g-client to work'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-1664489064947335821</id><published>2008-12-13T23:21:00.002+01:00</published><updated>2008-12-13T23:52:30.923+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>test from emacs</title><content type='html'>Ok, here goes. I'm testing posting to blogger from my trusty ol editor. So far, so good. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-1664489064947335821?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/1664489064947335821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/test-from-emacs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/1664489064947335821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/1664489064947335821'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/test-from-emacs.html' title='test from emacs'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8512538822850128037.post-1260963576773536084</id><published>2008-12-13T22:35:00.004+01:00</published><updated>2008-12-13T23:47:10.977+01:00</updated><title type='text'>Re-starting blog over on blogger</title><content type='html'>So... I've decided to re-start my little diary. Its been over a year
  since I stopped, but I realized that I really missed writing down my
  ideas and what not.
&lt;p&gt;

&lt;p&gt;
  Why did I decide to do it on Blogger and not nanoblogger, or vee?
  Well, I'm lazy. Damn lazy. I just can't be bothered to fiddle around
  for hours just getting the &lt;i&gt;environment&lt;/i&gt; right. Instead, I can
  focus on content, and perhaps a bit on layout.
&lt;/p&gt;

&lt;p&gt;
  Now, the question is if I'm going to try to migrate my old posts
  into Blogger, or if I'll skip it. Right now, I don't think I could
  be bothered. We'll see.
&lt;/p&gt;
&lt;p&gt;
  For now, I'll just supply a link to
  &lt;a href="http://blahonga.yanson.org/index_vee.html"&gt;my old blog&lt;/a&gt;,
  over at blahonga.yanson.org.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8512538822850128037-1260963576773536084?l=blahonga.yanson.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blahonga.yanson.org/feeds/1260963576773536084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blahonga.yanson.org/2008/12/re-starting-blog-over-on-blogger_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/1260963576773536084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8512538822850128037/posts/default/1260963576773536084'/><link rel='alternate' type='text/html' href='http://blahonga.yanson.org/2008/12/re-starting-blog-over-on-blogger_13.html' title='Re-starting blog over on blogger'/><author><name>fimblo</name><uri>http://www.blogger.com/profile/08070289905043527619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11533434183831718424'/></author><thr:total>0</thr:total></entry></feed>