<?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:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3062883415508658133</id><updated>2012-01-26T13:04:04.886Z</updated><category term='p9p'/><category term='udp'/><category term='lighttpd'/><category term='postgresql'/><category term='installation'/><category term='gentoo'/><category term='plan9port'/><category term='dial'/><category term='new'/><category term='ADSL'/><category term='pf'/><category term='storage'/><category term='wodim'/><category term='puzzle'/><category term='dvd'/><category term='eeepc'/><category term='kqemu'/><category term='inotify'/><category term='Gateway'/><category term='ppp'/><category term='plan9 boot'/><category term='mpeg'/><category term='utf8'/><category term='projection'/><category term='xcpu'/><category term='transcoding'/><category term='queues'/><category term='email'/><category term='g4'/><category term='distributedcomputing'/><category term='Apache'/><category term='10.4.11'/><category term='hg'/><category term='fossil'/><category term='inferno'/><category term='raid'/><category term='4th-compiler'/><category term='rant'/><category term='backup'/><category term='packages'/><category term='nasm'/><category term='jQuery'/><category term='isattymustdie'/><category term='java'/><category term='vblade'/><category term='httpd'/><category term='srv'/><category term='graphics'/><category term='rc'/><category term='apt'/><category term='utf-8'/><category term='cpio'/><category term='acme'/><category term='FreeBSD'/><category term='inventory'/><category term='drawterm'/><category term='bash'/><category term='dvdauthor'/><category term='networking'/><category term='pdf'/><category term='tcpserver'/><category term='c'/><category term='emulation'/><category term='compact flash'/><category term='asterisk'/><category term='initrd'/><category term='macmini'/><category term='dns'/><category term='global illumination renderer'/><category term='html'/><category term='tap'/><category term='errors'/><category term='ssl'/><category term='Bluetooth'/><category term='X100P.com'/><category term='chickenfoot'/><category term='til'/><category term='dhcp'/><category term='fbsplash'/><category term='udp broadcast'/><category term='nvidia'/><category term='compressor'/><category term='plan9. linux'/><category term='avr'/><category term='OpenBSD'/><category term='4th'/><category term='dv'/><category term='fifo'/><category term='gsoc'/><category term='u9fs'/><category term='tun'/><category term='javascript'/><category term='cluster'/><category term='courier'/><category term='nroff'/><category term='apple'/><category term='macosx'/><category term='linuxemu'/><category term='truecrypt'/><category term='64bit'/><category term='acpi'/><category term='wol'/><category term='postfix'/><category term='digitalvideo'/><category term='x86'/><category term='osx'/><category term='demo'/><category term='throwratio'/><category term='kqueue'/><category term='png'/><category term='mplayer'/><category term='gentoo. linux'/><category term='aoe vblade'/><category term='werc'/><category term='dnrd'/><category term='v86d'/><category term='diskless'/><category term='filesystems'/><category term='netboot'/><category term='python'/><category term='leopard'/><category term='markdown'/><category term='framebuffer'/><category term='selinuxsucks'/><category term='draw'/><category term='debian'/><category term='videowall'/><category term='iconv'/><category term='windows'/><category term='ape'/><category term='nfs'/><category term='firewall'/><category term='saslauth'/><category term='postscript'/><category term='openmp'/><category term='Limbo'/><category term='usability'/><category term='sarge'/><category term='dvdburning'/><category term='pxe'/><category term='speedtouch'/><category term='linux'/><category term='Loeliger'/><category term='mplayer. macports'/><category term='usb'/><category term='php'/><category term='programming'/><category term='venti'/><category term='vdpau'/><category term='plan9'/><category term='commandlinehistory'/><category term='syslog'/><category term='streaming'/><category term='pppoa'/><category term='voip'/><category term='flv'/><category term='multicore'/><category term='ssh'/><category term='vnc'/><category term='go'/><category term='repairs'/><category term='vde'/><category term='aoe'/><category term='asm'/><category term='broadcast'/><category term='dwarf fortress'/><category term='ssh2'/><category term='blogger'/><category term='alcatel'/><category term='imap'/><category term='porter-duff'/><category term='wake-on-lan'/><category term='samba'/><category term='lamp'/><category term='gcc'/><category term='qemu'/><category term='fail'/><category term='macports'/><category term='finalcut'/><category term='iptables'/><category term='mercurial'/><category term='9p'/><title type='text'>compjootery</title><subtitle type='html'>Record of some of the computer tech I deal with so that it's documented at least somewhere.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default?start-index=101&amp;max-results=100'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>157</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8887206058183289857</id><published>2011-12-24T13:54:00.000Z</published><updated>2011-12-26T18:38:28.977Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='dwarf fortress'/><title type='text'>Dwarf Fortress in a VM</title><content type='html'>&lt;p&gt;&lt;b&gt;My 2Ghz machine is too slow to run DF in a VM so I stopped&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Debian net install into a Qemu VM on FreeBSD&lt;/p&gt;&lt;p&gt;NB. Aptitude is an awful program for browsing packages.&lt;/p&gt;&lt;p&gt;Download Dwarf Fortress for Linux &amp; expand&lt;/p&gt;&lt;p&gt;./libs/Dwarf_Fortress: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory&lt;/p&gt;&lt;p&gt;which means &lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install libsdl1.2debian&lt;/b&gt;&lt;/p&gt;&lt;p&gt;./libs/Dwarf_Fortress: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install libgtk2.0-0&lt;/b&gt;&lt;/p&gt;&lt;p&gt;./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0: cannot open shared object file: No such file or directory&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install libsdl-image1.2&lt;/b&gt;&lt;/p&gt;&lt;p&gt;./libs/Dwarf_Fortress: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install libglu1-mesa&lt;/b&gt;&lt;/p&gt;&lt;p&gt;./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install libsdl-ttf2.0-0&lt;/b&gt;&lt;/p&gt;&lt;p&gt;and it runs without Sound&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install tightvncserver&lt;/b&gt;&lt;/p&gt;&lt;p&gt;then you'll need a window manager etc.&lt;/p&gt;&lt;p&gt;try and pick a simple one, oh look, &lt;/p&gt;&lt;p&gt;My choices but not very good, I had to edit config files to get it to work&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install 9wm &lt;/b&gt;&lt;/p&gt;&lt;p&gt;and a terminal&lt;/p&gt;&lt;p&gt;&lt;b&gt;apt-get install rxvt &lt;/b&gt;&lt;/p&gt;&lt;p&gt;Pah not so easy. Windows take forever to open, BASH takes ages to start.&lt;/p&gt;&lt;p&gt;So I found it runs much faster (ha)if you copy df_linux to /dev/shm. I imagine it is because reads from the host filesystem require a syscall whereas reading from guest memory is in host user space.&lt;/p&gt;&lt;p&gt;Also use VNC raw and run it over ssh compressed so that the host does the compression work, not the Qemu&lt;/p&gt;&lt;p&gt;Its doing worldgen atm, taking a while. But I reckon its going to be playable via the netbook over vnc.&lt;/p&gt;&lt;p&gt;Standard size worldgen took 2 hours. World size "Smaller", History "Short", No. Civs "Low", No. Sites "Medium", No. Beasts "Medium", Natural Savagery "medium", Mineral Occurence "Sparse" takes about 4 minutes!&lt;/p&gt;&lt;p&gt;I'm a bit concerned about the 8s keypress delay!&lt;/p&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8887206058183289857?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8887206058183289857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8887206058183289857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8887206058183289857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8887206058183289857'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/12/dwarf-fortress-in-vm.html' title='Dwarf Fortress in a VM'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5957753751310358032</id><published>2011-12-02T10:30:00.001Z</published><updated>2011-12-02T10:36:58.271Z</updated><title type='text'>Bookmarklet for Vworker</title><content type='html'>&lt;p&gt;You need to be signed in and on your Profile page.&lt;/p&gt;&lt;p&gt;The press this and it gets your rank from the HTML and changes the location to your page in the ranking list with 50 entries per page.&lt;/p&gt;javascript:{window.location =  "https://www.vworker.com/RentACoder/DotNet/misc/AllWorkerCompleteList.aspx?intLastRecordOnPage=50&amp;intFirstRecordOnPage=1&amp;txtMaxNumberOfEntriesPerPage=50&amp;intLastRecordInRecordset=43292&amp;cmdGoToPage=" + Math.ceil((/#[0-9]+,[0-9]+/.exec(document.getElementById('TABLE1').innerHTML)[0].replace('#', '').replace(',', '') / 50)).toString() + "&amp;lngMaxNumberOfEntriesPerPage=50"}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5957753751310358032?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5957753751310358032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5957753751310358032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5957753751310358032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5957753751310358032'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/12/bookmarklet-for-vworker.html' title='Bookmarklet for Vworker'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8944050192103345920</id><published>2011-11-19T18:13:00.001Z</published><updated>2011-11-19T22:22:50.509Z</updated><title type='text'>Linux From Scratch Part 2</title><content type='html'>Ok, after making a mistake I &lt;a href="http://www.maht0x0r.net/build_lfs_tools.bash.txt"&gt;wrote a script&lt;/a&gt; to build the build tools for me. (sorry about the .txt my web server likes octects)I guess this is what Stage1 is in Gentoo.Edit your optionsI've got a Quad core with 8Gb RAM :&gt;&lt;code&gt;export MAKEFLAGS="-j 5"export EXTRACT=/dev/shm&lt;/code&gt;The tools built for me in about 20 mins.My SBU :real 1m2.852suser 1m48.902ssys 0m44.976s&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8944050192103345920?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8944050192103345920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8944050192103345920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8944050192103345920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8944050192103345920'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/11/linux-from-scratch-part-2.html' title='Linux From Scratch Part 2'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-338686171846905126</id><published>2011-11-16T19:31:00.001Z</published><updated>2011-11-19T18:22:38.339Z</updated><title type='text'>Linux From Scratch Part 1</title><content type='html'>blogger happily deleted this massive postit was a script to download all the sources&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-338686171846905126?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/338686171846905126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=338686171846905126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/338686171846905126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/338686171846905126'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/11/linux-from-scratch-part-1.html' title='Linux From Scratch Part 1'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3430866246626159163</id><published>2011-11-11T20:46:00.001Z</published><updated>2011-11-15T15:58:53.619Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='lamp'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Compilin' SSL Apachey with PHP, MySQL client</title><content type='html'>I ended up writing a bunch o'scripts&lt;a href="http://www.maht0x0r.net/build_lamp.zip"&gt;http://www.maht0x0r.net/build_lamp.zip&lt;/a&gt;&lt;p&gt;A few scripts for building a small self-contained Apache2 / PHP Installation.&lt;/p&gt;PHP has Mysql + SSL and includes JSON but not XML&lt;p&gt;Scripts here for fetching the source files by version&lt;br&gt;Untarring them&lt;br&gt;and then building them all&lt;/p&gt;&lt;p&gt;Make a directory for putting it all under and then run 'em&lt;br&gt;e.g.&lt;br&gt;&lt;code&gt;mkdir -p /opts/LAMPcd /opts/LAMPunzip /tmp/build.zip[vi build/build.vars]  # this hard codes the version numbers, that's the point./build/fetch./build/build/opts/LAMP/apache2/bin/apachectl start&lt;/code&gt;&lt;ul&gt;&lt;li&gt;By default it checks for a running mysql to find the sock file when creating php.ini&lt;li&gt;docroot ends up being /opts/LAMP/www/public_html&lt;li&gt;php path is .:/opts/LAMP/www/php&lt;li&gt;default port is 801&lt;li&gt;default user:group is gopher:gopher&lt;/ul&gt;also has&lt;br&gt;rm.src for deleying the source trees&lt;br&gt;rm.tar for deleting the tarfiles&lt;br&gt;untar for re-extracting the tarfiles&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3430866246626159163?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3430866246626159163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3430866246626159163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3430866246626159163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3430866246626159163'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/11/compilin-ssl-apachey-with-php-mysql.html' title='Compilin&apos; SSL Apachey with PHP, MySQL client'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8058323695313227000</id><published>2011-09-30T16:37:00.000+01:00</published><updated>2011-09-30T18:01:46.768+01:00</updated><title type='text'>DKIM signing with Postfix</title><content type='html'>&lt;h3&gt;Scenario&lt;/h3&gt;&lt;p&gt;You use SMTP-AUTH (hopefully over TLS) on your phone to connect to a Postfix server which then sends your email over the public internet. You want to add some authority to the message somehow.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Enter &lt;a href="http://www.opendkim.org/"&gt;OpenDKIM&lt;/a&gt;&lt;/b&gt; - look there for ./make install etc.&lt;/p&gt;&lt;h4&gt;A DKIM Signature&lt;/h4&gt;&lt;pre&gt;DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maht0x0r.net; s=blogger; t=1317392525; &lt;br /&gt;        bh=AKfekrfl5wnhOUH0Zy1ZDQuS/dTepAwDyGPkx1cTdLk=;&lt;br /&gt;        h=Content-Type:To:Subject:MIME-Version:Content-Transfer-Encoding: From:Date:Message-ID; &lt;br /&gt;        b=pJL4iPtbmXl2G+58UrJR6SeKbcoWx4sYwqUXitFs/tKvolBnSiy53D3+Mf79pYZ2L   &lt;br /&gt;        5q35MwZcWEx94s4bFb88AYC44TdAhZx9hZuo/NbOvKRdUjDv028XRLJ0mOAgVR0jle  &lt;br /&gt;        bCXqykNnCdduIgyO3xKyEaw+xRhwxPf74g9P2mdY=&lt;/pre&gt;Before signing the values of d=maht0x0r.net (domain) s=blogger (section) and the private key chosen are under your control based on the sender's email address.&lt;p&gt;I've got OpenDKIM running as a service under &lt;a href="http://cr.yp.to/daemontools.html"&gt;daemontools&lt;/a&gt; which is what I use for long running servers - anyway you need it listening on it's socket&lt;/p&gt;&lt;code&gt;% cat /etc/opendkim.conf # the important bitsCanonicalization        relaxed/simpleKeyTable        file:/etc/postfix/ssl/opendkim/KeyTableSigningTable    refile:/etc/postfix/ssl/opendkim/SigningTableExternalIgnoreList refile:/etc/postfix/ssl/opendkim/trusted-hostsInternalHosts refile:/etc/postfix/ssl/opendkim/trusted-hostsSocket                  inet:8891@localhost&lt;/code&gt;&lt;b&gt;Make some keys&lt;/b&gt;&lt;code&gt;% &lt;a href="http://www.opendkim.org/opendkim-genkey.8.html"&gt;opendkim-genkey&lt;/a&gt; -d maht0x0r.net -s blogger% ls -l --rw------- M 0 root root 887 Sep 30 13:26 blogger.private--rw------- M 0 root root 320 Sep 30 13:26 blogger.txt% cat blogger.private # used to sign outgoing email-----BEGIN RSA PRIVATE KEY-----MIICXQIBAAKBgQDEfFH3nxvFnwck2oJCq7JojSPsfAvr93+N+M5cykwFruPgJXsWEIcNymwKyEABwS7kL78eg1SYggh/8RI1jZiXfLW+PQFZLrwqE9/L0ZzZhjrjYQjKWM182/Uaj6GWtOhariSLKmR6JYtRPFh/fiOr6YDDAt/puFSLCnUi3Ppj8QIDAQABAoGBAKj/BMEmaIyhK1PXXRJa+yhRvQQ57UcXqO5DgbrthFWfBwBTPHrN3FtQL31WnzbjIaHCL2/fJXPG4+inQDIvh33BJZa7I2h7ZDMIzEiYJ/3Y0VEPpW+3W4GTMj2IJgJWJokpCuJGqBcujhVPW2xmKAFtd27+Y+urxgt+gCrj+KrBAkEA8iNseAFbKBoNDf2krnH8rEyfRMWaLqI6hP8AtAYfVBiNW/2P0+6bBWoZ6YV/iDQwubtQsCkW3jrpFNZW6CVSPwJBAM+72SRKdTPYnplTEYkdPzyKmNV094AUw9XRVDvM1MVEgXXQBctnkPrms/TKvDq6w66INK0rVUmiNeKsohUUXc8CQQCuaUGqNx/YBNu+ZiMG3GgqG47lVIg4avZH8f4prfdG9eBskHnXKBlVjxVXFafFDgLC5d+64/3q2Pgm4DT9RlS1AkBi7hgkY11bup8Vb+0a+pXCFFNi3Nh94+W773wJGqx94fkxjUclLoZqJvKu8tofshA9D1re2ZM9hQXalNJ/7XobAkArHhx9+quDr6/jj/lDb8vbrcpEne2+8FivmpHmeEHJroIJtX5TyD4gfPxC45qQEL1/q88w2OhYCP915fMBtS+X-----END RSA PRIVATE KEY-----% cat blogger.txt # used by receivers to check your signateblogger._domainkey IN TXT "v=DKIM1; r=postmaster; g=*; k=rsa;        p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEfFH3nxvFnwck2oJCq7JojSPsfAvr93+N        +M5cykwFruPgJXsWEIcNymwKyEABwS7kL78eg1SYggh/8RI1jZiXfLW+PQFZLrwqE9/L0ZzZhjrjYQjKWM182        /Uaj6GWtOhariSLKmR6JYtRPFh/fiOr6YDDAt/puFSLCnUi3Ppj8QIDAQAB" ; ----- DKIM blogger for maht0x0r.net&lt;/code&gt;r=postmaster (DKIM errors to $r@$domain) # something like that :)Then tell opendkim about your keys, here you name them :This is where keyname is used to determine d, s and the private key &lt;code&gt;% cat /etc/postfix/ssl/opendkim/KeyTable# keyname  d s keyfilemaht	maht0x0r.net:blogger:/etc/postfix/ssl/opendkim/blogger.privatemaht0x0r maht0x0r.net:blogger:/etc/postfix/ssl/opendkim/maht0x0r.net.privatedefault example.com:flex:/etc/postfix/ssl/opendkim/smtp.private&lt;/code&gt;And in here you match email addresses to named keys&lt;code&gt; % cat /etc/postfix/ssl/opendkim/SigningTablemaht@maht0x0r.net	maht*@maht0x0r.net	maht0x0r*	default &lt;/code&gt;First match wins in the SigningTable, which took me a while to realise when I had * as the first entry.OpenDKIM by default will only sign mails posted from inside the network. But we can control this &lt;code&gt;# ExternalIgnoreList refile:/etc/postfix/ssl/opendkim/trusted-hosts# InternalHosts refile:/etc/postfix/ssl/opendkim/trusted-hosts% echo '*' &gt; /etc/postfix/ssl/opendkim/trusted-hosts&lt;/code&gt;That's right, we just sign for anyone but only SASL-Authed clients can be sending so that means only SASL-Auth'd clients get a signature.OK, then you need a DKIM entry in your DNS&lt;code&gt;% host -t txt blogger._domainkey.maht0x0r.netblogger._domainkey.maht0x0r.net descriptive text "v=DKIM1\; r=maht-dkim\; g=*\; k=rsa\;         p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEfFH3nxvFnwck2oJCq7JojSPsfAvr93+N+        M5cykwFruPgJXsWEIcNymwKyEABwS7kL78eg1SYggh/8RI1jZiXfLW+PQFZLrwqE9/L0ZzZhjrjYQjKWM182        /Uaj6GWtOhariSLKmR6JYtRPFh/fiOr6YDDAt/puFSLCnUi3Ppj8QIDAQAB"&lt;/code&gt;I tried to verify it with a few online DKIM testing suites, all failed.This is a header when I send it to google :&lt;code&gt;Authentication-Results: mx.google.com; spf=pass (google.com: domain of maht@maht0x0r.net          designates x.x.x.x as permitted sender) smtp.mail=maht@maht0x0r.net;          dkim=pass header.i=@maht0x0r.net&lt;/code&gt;I didn't use the keys above, obviously, so my DNS /public key is different, which you can verify :&lt;code&gt;host -t txt flex._domainkey.maht0x0r.netflex._domainkey.maht0x0r.net descriptive text "v=DKIM1\; r=maht-dkim\; g=*\; k=rsa\;         p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDeQqlOKodABflhh076+6yueVDiQAm5koXBEg        QG31F04Al01HeyYxM7HllBjvrDfuQei102SyZH298QDDXmk/4Wtb8zh2SZ5xammqSR89HkKmbqFaSHD        2iEAgiEeWGf7nL/lK2NM0QljP5aOUpjOW1SGfRiB1AtipAcKNPLm1NRIQIDAQAB"&lt;/code&gt;Next job is to find out how to sign it manually without using an OpenDKIM process forever listening.Then I can add my own headers *before* signing it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8058323695313227000?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8058323695313227000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8058323695313227000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8058323695313227000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8058323695313227000'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/09/dkim-signing-with-postfix.html' title='DKIM signing with Postfix'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4867311617395356463</id><published>2011-09-22T21:07:00.002+01:00</published><updated>2011-09-23T22:06:51.808+01:00</updated><title type='text'>SSL Encryption in PHP Without HTTPS</title><content type='html'>&lt;p&gt;This all started because the EU decided that one can't use cookies without authorisation, so how to hand state around a website without client side storage.&lt;/p&gt;&lt;p&gt;I investigated some things and played with SSL.&lt;/p&gt;&lt;p&gt;It works like this :&lt;/p&gt;&lt;p&gt;plain -&gt; encryption with public key -&gt; cipher&lt;/p&gt;&lt;p&gt;cipher -&gt; decryption with private key -&gt; plain&lt;/p&gt;&lt;p&gt;or&lt;/p&gt;&lt;p&gt;plain -&gt; encryption with private key -&gt; cipher&lt;/p&gt;&lt;p&gt;cipher -&gt; decryption with public key -&gt; plain&lt;/p&gt;&lt;p&gt;Using this mechanism one can envisage a system where two entities can communicate by first exchanging public keys and then encrypted data that only the recipient can decrypt.&lt;/p&gt;&lt;p&gt;First off we're going to need some keys. These are generated using the openssl command line tools.&lt;/p&gt;&lt;code&gt;% openssl genrsa -out private.pem 1024% openssl rsa -in private.pem -out public.pem -outform PEM -pubout&lt;/code&gt;&lt;p&gt;If you're feeling fruity you can keep them both in the same file, remembering not to send it when you mean to just send the public part !&lt;/p&gt;&lt;code&gt;% cat private.pem public.pem | tee sslkeys.pem-----BEGIN RSA PRIVATE KEY-----MIICWwIBAAKBgQDnv6zntTRDw9r0O2wJWrzyfyeVO/++9JaXAq6M60uKKNGK/Lhej4rrMYyN4l8arUBWJBHLaAn9VPHymXA9VdoXaPIGu+YS9fhraKUkz3eXcQhxgPXxxAkyzOMsyEbLt7E9rQ9r9cNZVJ7rQBwloY0WHjYsZGBoT2fZI8wzz1+jTwIDAQABAoGAVnoAxCmqygqgfnhZ9Rel3/swwxAze4b7VnhKuAzpEDHxFyL8jVSU6vR/VUZ+ZI73re0hsrws1hpHelZlOo35pgLZif230IgpNfZwYnvil4nTSa9oFXAr11ta/T0gNJwxc7HovZhtwWn9vE5abRMPiZ2HAXzL5gBXjT7DsaHuNVECQQD2Tftl08GdxtVhRNNEkHmoLHyXvfR8HLP7veGK9nGrZRhWVAqGEeKTiSw7YbMFr3Yss99o7m1fMlnPY9e3jsxJAkEA8N8Da2hlK+p2uNnAIukslRB4Z8VyqIWA7fNYB8u2PMO8Xsxi27NUMNzmk69Yz2JCpmn+TiPY/3SSmS81qw2C1wJBAMA2SyJEBqziJlMqKtUvCkG7td+VVd4laC/lFsYjXMGsuzljjHLkMjWArwwISnT9YPOxy39P0fqgiIXYHNgakEECP0HcuRKleQSJF+1znRXurEIWPtYhJzjtSFPINknraekznE5PlLh+UIcL4ACB8cbDF3ZphR/YrX0sYul//yzGhQJAaFvthOCajq0el+aa4xMCsrtNnvFSSXSLDbAZsK0HPcpFmVUe3tRX0dsTZ0ant35PMAEYMQhgxB9s9G+/Un/c/g==-----END RSA PRIVATE KEY----------BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnv6zntTRDw9r0O2wJWrzyfyeVO/++9JaXAq6M60uKKNGK/Lhej4rrMYyN4l8arUBWJBHLaAn9VPHymXA9VdoXaPIGu+YS9fhraKUkz3eXcQhxgPXxxAkyzOMsyEbLt7E9rQ9r9cNZVJ7rQBwloY0WHjYsZGBoT2fZI8wzz1+jTwIDAQAB-----END PUBLIC KEY-----&lt;/code&gt;&lt;p&gt; OBVIOUSLY don't use it for anything sensitive !&lt;/p&gt;&lt;p&gt;You can generate pem files that are passworded too, probably a good idea, when I find out how to do it, I'll post an update.The code below would then use &lt;code&gt;openssl_get_privatekey($pem, $passphrase);&lt;/code&gt;&lt;/p&gt;&lt;h2&gt;On to the PHP bit&lt;/h2&gt;&lt;p&gt;All very simple really :&lt;/p&gt;&lt;code&gt;&amp;lt;?phpfunction private_encrypt($pem, $plain) {	openssl_get_privatekey($pem);	openssl_private_encrypt($plain, $cipher, $pem);	return $cipher;}function private_decrypt($pem, $cipher) {	openssl_get_privatekey($pem);	openssl_private_decrypt($cipher, $plain, $pem);	return $plain;}function public_encrypt($pem, $plain) {	openssl_get_publickey($pem); 	openssl_public_encrypt($plain, $cipher, $pem);	return $cipher;}function public_decrypt($pem, $cipher) {	openssl_get_publickey($pem); 	openssl_public_decrypt($cipher, $plain, $pem);	return $plain;}?&amp;gt;&lt;/code&gt;&lt;p&gt;You can use either the combined sslkeys.pem or the appropriate public.pem / private.pem files for $pem&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Do not keep the private part or combined file in your webspace&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;$cipher is binary so if you want to send it over text channels you will need to base64_encode it or something&lt;/p&gt;&lt;p&gt;e.g.&lt;/p&gt;&lt;code&gt;&amp;lt;?phpfunction encode($plain) {	static $pem;	if(!$pem)		$pem = file_get_contents("/etc/ssl/sslkeys.pem");	return base64_encode(public_encrypt($pem, $plain));}function decode($cipher) {	static $pem;	if(!$pem)		$pem = file_get_contents("/etc/ssl/sslkeys.pem");	return private_decrypt($pem, base64_decode($cipher));}?&amp;gt;&lt;/code&gt;&lt;i&gt;the &lt;b&gt;static&lt;/b&gt; keyword means that the value of the variable is preserved between function calls&lt;/i&gt;&lt;h3&gt;What to use it for&lt;/h3&gt;&lt;p&gt;Well as it happens, I'm using it to talk to Paypal. You can sent a custom string from your Buy button and this will be sent back to you later. So I'm sending the buyer an encrypted transaction code, they send it to Paypal and then I get it back from Paypal. Like many things in the world of encryption it's easy to be fooled into thinking things are more secure than they are. But hey, at least no-one knows what I'm sending :)&lt;/p&gt;&lt;p&gt;Another thing that can be done is if I encrypt something with my private key, you can decrypt with my public key. By doing this you know only I (or someone who has stolen my private key :) has sent the message. If I encrypt it with your private key first then no-one else can read it except you.&lt;/p&gt;&lt;p&gt;I could even base64 it, upload it to pastebin, and post the URL - like so &lt;a href="http://pastebin.com/kSnWgzHs"&gt;http://pastebin.com/kSnWgzHs&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Then linking you and I together is &lt;i&gt;much, much&lt;/i&gt; harder. &lt;/p&gt;&lt;p&gt;&lt;b&gt;RIPA can lick my balls.&lt;/b&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4867311617395356463?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4867311617395356463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4867311617395356463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4867311617395356463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4867311617395356463'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/09/ssl-encryption-in-php-without-https.html' title='SSL Encryption in PHP Without HTTPS'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-6031859251202977682</id><published>2011-08-23T13:04:00.004+01:00</published><updated>2011-08-23T13:22:14.163+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='samba'/><category scheme='http://www.blogger.com/atom/ns#' term='go'/><title type='text'>Round and round the garden</title><content type='html'>Go was playing up on FreeBSD (or maybe I've learned enough to cure that now, not sure yet) so I decided to get a Qemu image of some Linux up and running.&lt;br /&gt;&lt;br /&gt;Debian was the one that finally worked.&lt;br /&gt;&lt;br /&gt;Now, I use Plan 9 as my working environment. I run a Qemu image of it on a FreeBSD machine in the Co-lo which I connect to with drawterm. &lt;br /&gt;I need to be able to run commands on the Debian from within the Plan 9, usually via win, so I can plumb the error messages (e.g. file.go:23).&lt;br /&gt;&lt;br /&gt;I made a diagram of what I ended up with.&lt;br /&gt;&lt;img src="http://www.maht0x0r.net/go/go-garden.gif" alt="diagram"&gt;&lt;br /&gt;&lt;br /&gt;So today I tried to compile some C.&lt;br /&gt;&lt;code&gt;cc1: error: file.c: Value too large for defined data type&lt;/code&gt;&lt;br /&gt;A fantastic error message if ever I saw one. &lt;br /&gt;naturally someone else has already had that error and consequently I discovered that GCC can't compile code if it resides on a Samba share because the inode numbers are too big.&lt;br /&gt;&lt;br /&gt;The solution is to remap the inode numbers in mount.&lt;br /&gt;&lt;br /&gt;So the mount command in the diagram is out of date, it is now&lt;br /&gt;&lt;br /&gt;&lt;code&gt;# mount -t smbfs //10.0.2.2/kam /mnt/kam2 \ &lt;br /&gt;nounix,noserverino,uid=1000,gid=1000,credential=/root/kam.password&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Also I had to use the IP address rather than the hostname, even with an entry in /etc/hosts. I probably need a WINS file somewhere, cba with that&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-6031859251202977682?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/6031859251202977682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=6031859251202977682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6031859251202977682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6031859251202977682'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/08/round-and-round-garden.html' title='Round and round the garden'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-34024813428689047</id><published>2011-08-19T11:10:00.006+01:00</published><updated>2011-08-19T12:23:34.202+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='puzzle'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Unlimited length path names, how do they work ?!</title><content type='html'>On  Linux&lt;br /&gt;I'm sending an email, it is reporting an error.&lt;br /&gt;I hit on the idea - I should include the pwd or else relative pathnames might be ambiguous.&lt;br /&gt;&lt;br /&gt;"Error in ./config file" is too late for the user to realise they should have included full pathnames.&lt;br /&gt;&lt;br /&gt;man 3 getcwd&lt;br /&gt;&lt;code&gt;char *getcwd(char *buf, size_t size);&lt;/code&gt;&lt;br /&gt;...&lt;br /&gt;If the current absolute pathname would require a buffer longer than size elements, NULL is returned, and errno is set to ERANGE; an application should check for this error, and allocate a larger buffer if necessary. &lt;br /&gt;&lt;br /&gt;Further on :&lt;br /&gt;&lt;br /&gt;Note that PATH_MAX need not be a compile-time constant; it may depend on the filesystem and may even be unlimited. &lt;br /&gt;&lt;br /&gt;It is also very easily wrong. It is only defined as the maximum for the filesystem directory entry, not the path, it could be returned as ./././././././././././././././././ etc.&lt;br /&gt;&lt;br /&gt;So we are limited by SIZE_MAX which is the upper bound on getcwd&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;char *&lt;br /&gt;pwd() {&lt;br /&gt;    size_t buffsize = PATH_MAX;&lt;br /&gt;    char *buff = malloc(buffsize);&lt;br /&gt;    if(!buff) return NULL;&lt;br /&gt;&lt;br /&gt;    while(!getcwd(&amp;buff, buffsize)) {&lt;br /&gt;        if(errno != ERANGE) &lt;br /&gt;            return NULL; // caller can deal with it&lt;br /&gt;&lt;br /&gt;        if(buffsize &lt; (SIZE_MAX / 2)) { // prevent overflow&lt;br /&gt;            buffsize = buffsize * 2;&lt;br /&gt;        } else if(buffsize == SIZE_MAX) {&lt;br /&gt;            fprintf(stderr, "getcwd failed, path too long max %d\n", buffsize);&lt;br /&gt;            return NULL;&lt;br /&gt;        } else {&lt;br /&gt;            buffsize = SIZE_MAX;  // getcwd limit&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        buff = realloc(buff, buffsize);&lt;br /&gt;        if(!buff) return NULL; // oom !&lt;br /&gt;    }&lt;br /&gt;    return buff;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Unlimited length path names, how do they work ?!&lt;br /&gt;&lt;br /&gt;There is another way :&lt;br /&gt;As an extension to the POSIX.1-2001 standard, Linux (libc4, libc5, glibc) getcwd() allocates the buffer dynamically using malloc() if buf is NULL on call. In this case, the allocated buffer has the length size unless size is zero, when buf is allocated as big as necessary.&lt;br /&gt;&lt;br /&gt;I wonder how they deal with unlimited length path names, one time I shall look. In the meatime how can one code for UNLIMITED LENGTH PATHS !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-34024813428689047?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/34024813428689047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=34024813428689047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/34024813428689047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/34024813428689047'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/08/unlimited-length-path-names-how-do-they.html' title='Unlimited length path names, how do they work ?!'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3190443644743099604</id><published>2011-03-28T14:24:00.004+01:00</published><updated>2011-09-30T16:39:49.966+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='videowall'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>UDP Synced MPlayer on Windows - not yet</title><content type='html'>Update - udp sync is now part of mplayerNow I *do* have a video wall to build. 28 screens which sounds 7x4 to me.&lt;br /&gt;&lt;br /&gt;But they want Windows !! Ok Mplayer for windows exists and there are howtos to &lt;a href="http://steature.wordpress.com/2005/02/17/howto-compile-mplayer-with-mingw/"&gt;compile MPlayer with mingw on Windows&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First ran the automated installer: &lt;a href="http://sourceforge.net/projects/mingw/files/"&gt;MinGW from sourceforge&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I clicked on Developer version, can see lots of gnu software defiling my system.&lt;br /&gt;&lt;br /&gt;First failed instruction is DirectX headers being 404&lt;br /&gt;&lt;br /&gt;http://www.mplayerhq.hu/MPlayer/releases/win32-beta/contrib/dx7headers.tgz&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ok, a bit more reading, mplayer shoul djust build on Cygwin so I've switched to that. First I'm trying to get my existing mplayer tree to compile, might work out :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Had to sdd gcc, make, nasm, libiconv, freetype2. freetype brought lots of friends to my cygwin party.&lt;br /&gt;&lt;br /&gt;had to get these http://natsuki.mplayerhq.hu/~reimar/{dinput,ddraw,dsound}.h&lt;br /&gt;&lt;br /&gt;but they are included in the source these days apparently&lt;br /&gt;&lt;br /&gt;had fun ewith bswap.h, cygwin defines the functiones therein and then everyone #includes libavutil/bswap.h and it treis to refine them. Wouldn't happen if they didn't abuse #IFDEFs.&lt;br /&gt;&lt;br /&gt;codec-cfg doesn't work on Windows, I had to copy etc/codecs.conf to Linux and make codecs.conf.h there /home/maht/mplayer/mplayer/codec-cfg codecs.conf &gt; codecs.conf.h&lt;br /&gt;then on Windows just make the Makefile cp it into place rather than run codec-cfg&lt;br /&gt;&lt;br /&gt;/usr/local/math.h log2(x) used float_t which confused matters, so I made it use float instead &lt;br /&gt;&lt;br /&gt;I got it to build but it won't run&lt;br /&gt;&lt;br /&gt; _feinitialise could not be located in the dynamic link library cygwin1.dll&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3190443644743099604?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3190443644743099604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3190443644743099604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3190443644743099604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3190443644743099604'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2011/03/udp-synced-mplayer-on-windows.html' title='UDP Synced MPlayer on Windows - not yet'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3559852740509985776</id><published>2010-08-17T16:26:00.003+01:00</published><updated>2010-08-17T16:29:09.198+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9port'/><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>Backing up Venti</title><content type='html'>This code cycles through the arenas and if it's not sealed, dump it to dvd formatted iso&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;path=(/usr/local/plan9/bin $path)&lt;br /&gt;cd /home/venti/dumps&lt;br /&gt;&lt;br /&gt;fn arenas {&lt;br /&gt;        wget -O - -q http://127.0.0.1:808/index | awk '&lt;br /&gt;        BEGIN { FS="    | |="}&lt;br /&gt;        /^arena/ { printf "%s", $2}&lt;br /&gt;        $2 == "score" { printf " %s", $3 }&lt;br /&gt;        $2 == "indexed:" { printf "\n" }&lt;br /&gt;        '&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fn extract {&lt;br /&gt;        venti/rdarena /home/venti/arenas $1 | gpg --homedir /home/maht/.gnupg -e -r maht@maht0x0r.net  &gt; $1/$2&lt;br /&gt;        mkisofs -udf -o $1.$2.iso $1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fn process_arenas {&lt;br /&gt;        ifs = '&lt;br /&gt;'&lt;br /&gt;        for(a in `{arenas}) {&lt;br /&gt;                ifs=' '&lt;br /&gt;                i = `{echo -n $a}&lt;br /&gt;                mkdir $i(1)&lt;br /&gt;                if(~ $#i 2) {&lt;br /&gt;                        rm -f $i(1) ^.unsealed.iso&lt;br /&gt;                        if(! test -e $i(1) ^. ^$i(2) ^.iso)&lt;br /&gt;                                extract $i(1) $i(2)&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;                if not {&lt;br /&gt;                        extract $i(1) unsealed&lt;br /&gt;                }&lt;br /&gt;                rm -rf $i(1)&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;process_arenas&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3559852740509985776?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3559852740509985776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3559852740509985776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3559852740509985776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3559852740509985776'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/08/backing-up-venti.html' title='Backing up Venti'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1393742401290116386</id><published>2010-08-11T17:14:00.005+01:00</published><updated>2010-09-01T17:35:58.113+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='rc'/><title type='text'>Importing BASH style config files into rc</title><content type='html'>So you're got some config in a bash style, something like this&lt;br /&gt;&lt;code&gt;% cat /usr/local/courier/etc/imapd&lt;br /&gt;ADDRESS=0&lt;br /&gt;PORT=143&lt;br /&gt;MAXDAEMONS=80&lt;br /&gt;MAXPERIP=25&lt;br /&gt;PIDFILE=/var/run/imapd.pid&lt;br /&gt;TCPDOPTS="-nodnslookup -noidentlookup"&lt;br /&gt;LOGGEROPTS="-name=imapd"&lt;br /&gt;IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"&lt;br /&gt;IMAP_KEYWORDS=1&lt;br /&gt;IMAP_ACL=1&lt;br /&gt;IMAP_CAPABILITY_ORIG="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CR&lt;br /&gt;AM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"&lt;br /&gt;IMAP_PROXY=0&lt;br /&gt;IMAP_PROXY_FOREIGN=0&lt;br /&gt;IMAP_IDLE_TIMEOUT=60&lt;br /&gt;IMAP_MAILBOX_SANITY_CHECK=1&lt;br /&gt;IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"&lt;br /&gt;IMAP_CAPABILITY_TLS_ORIG="$IMAP_CAPABILITY_ORIG AUTH=PLAIN"&lt;br /&gt;IMAP_DISABLETHREADSORT=0&lt;br /&gt;IMAP_CHECK_ALL_FOLDERS=0&lt;br /&gt;IMAP_OBSOLETE_CLIENT=0&lt;br /&gt;IMAP_UMASK=022&lt;br /&gt;IMAP_ULIMITD=65536&lt;br /&gt;IMAP_USELOCKS=1&lt;br /&gt;IMAP_SHAREDINDEXFILE=/usr/lib/courier-imap/etc/shared/index&lt;br /&gt;IMAP_ENHANCEDIDLE=0&lt;br /&gt;IMAP_TRASHFOLDERNAME=Trash&lt;br /&gt;IMAP_EMPTYTRASH=Trash:7&lt;br /&gt;IMAP_MOVE_EXPUNGE_TO_TRASH=0&lt;br /&gt;SENDMAIL=/usr/sbin/sendmail&lt;br /&gt;HEADERFROM=X-IMAP-Sender&lt;br /&gt;IMAPDSTART=YES&lt;br /&gt;MAILDIRPATH=Maildir&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and you want to import it into rc&lt;br /&gt;&lt;br /&gt;I give you&lt;br /&gt;&lt;br /&gt;&lt;code&gt;fn import_bash {&lt;br /&gt;    . &lt;{ 9 sed -e 's/"//g' -e 's/=/=(''/'  -e 's/(.)$/&amp;'')/' \&lt;br /&gt;               -e 's/''(\$[^ ]+) /\1 ''/' -e 's/''(\$[^ ]+) ''/\1/' \&lt;br /&gt;         | awk ' /OPTS/ &amp;&amp; / / { gsub(/ /, "'' ''") } { print } ' }&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;the bit inside the . &lt;{} turns the bash into&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ADDRESS=('0')&lt;br /&gt;PORT=('143')&lt;br /&gt;MAXDAEMONS=('80')&lt;br /&gt;MAXPERIP=('25')&lt;br /&gt;PIDFILE=('/var/run/imapd.pid')&lt;br /&gt;TCPDOPTS=('-nodnslookup' '-noidentlookup')&lt;br /&gt;LOGGEROPTS=('-name=imapd')&lt;br /&gt;IMAP_CAPABILITY=('IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE')&lt;br /&gt;IMAP_KEYWORDS=('1')&lt;br /&gt;IMAP_ACL=('1')&lt;br /&gt;IMAP_CAPABILITY_ORIG=('IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=C&lt;br /&gt;RAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE')&lt;br /&gt;IMAP_PROXY=('0')&lt;br /&gt;IMAP_PROXY_FOREIGN=('0')&lt;br /&gt;IMAP_IDLE_TIMEOUT=('60')&lt;br /&gt;IMAP_MAILBOX_SANITY_CHECK=('1')&lt;br /&gt;IMAP_CAPABILITY_TLS=($IMAP_CAPABILITY 'AUTH=PLAIN')&lt;br /&gt;IMAP_CAPABILITY_TLS_ORIG=($IMAP_CAPABILITY_ORIG 'AUTH=PLAIN')&lt;br /&gt;IMAP_DISABLETHREADSORT=('0')&lt;br /&gt;IMAP_CHECK_ALL_FOLDERS=('0')&lt;br /&gt;IMAP_OBSOLETE_CLIENT=('0')&lt;br /&gt;IMAP_UMASK=('022')&lt;br /&gt;IMAP_ULIMITD=('65536')&lt;br /&gt;IMAP_USELOCKS=('1')&lt;br /&gt;IMAP_SHAREDINDEXFILE=('/usr/lib/courier-imap/etc/shared/index')&lt;br /&gt;IMAP_ENHANCEDIDLE=('0')&lt;br /&gt;IMAP_TRASHFOLDERNAME=('Trash')&lt;br /&gt;IMAP_EMPTYTRASH=('Trash:7')&lt;br /&gt;IMAP_MOVE_EXPUNGE_TO_TRASH=('0')&lt;br /&gt;SENDMAIL=('/usr/sbin/sendmail')&lt;br /&gt;HEADERFROM=('X-IMAP-Sender')&lt;br /&gt;IMAPDSTART=('YES')&lt;br /&gt;MAILDIRPATH=('Maildir')&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The tricky part was the OPTS, they need to be passed individually not as one string.&lt;br /&gt;Sadly that means keeping an eye on when such things are needed and changing the awk guard appropriately.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1393742401290116386?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1393742401290116386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1393742401290116386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1393742401290116386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1393742401290116386'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/08/importing-bash-style-config-files-into.html' title='Importing BASH style config files into rc'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5284642540674569207</id><published>2010-08-02T15:37:00.001+01:00</published><updated>2010-08-02T15:40:10.416+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='framebuffer'/><category scheme='http://www.blogger.com/atom/ns#' term='v86d'/><title type='text'>UvesaFB</title><content type='html'>just a mirror of&lt;br /&gt;&lt;br /&gt;http://dev.gentoo.org/~spock/projects/uvesafb/&lt;br /&gt;&lt;br /&gt;in case it ever disappears&lt;br /&gt;&lt;br /&gt;projects::uvesafb&lt;br /&gt;&lt;br /&gt;uvesafb is a generic framebuffer driver for Linux systems and the direct successor of vesafb-tng. Its main features are:&lt;br /&gt;&lt;br /&gt;    * works on non-x86 systems,&lt;br /&gt;    * the Video BIOS code is run in userspace by a helper application,&lt;br /&gt;    * can be compiled as a module,&lt;br /&gt;    * adjustable refresh rates with VBE 3.0-compliant graphic cards.&lt;br /&gt;&lt;br /&gt;uvesafb has been available as a part of the mainline Linux kernel since 2.6.24.&lt;br /&gt;uvesafb::v86d&lt;br /&gt;&lt;br /&gt;v86d is the userspace helper that runs x86 code in an emulated environment. uvesafb will not work without v86d. v86d currently supports the x86 and amd64 (x86-64) architectures.&lt;br /&gt;Latest version &lt;a href="http://dev.gentoo.org/~spock/projects/uvesafb/archive/v86d-0.1.9.tar.bz2"&gt;v86d-0.1.9.tar.bz2&lt;/a&gt;&lt;br /&gt;GIT repository &lt;a href="http://repo.or.cz/w/v86d.git"&gt;v86d.git&lt;/a&gt;&lt;br /&gt;uvesafb::installation instructions&lt;br /&gt;&lt;br /&gt;uvesafb is included in gentoo-sources &gt;= 2.6.23 and from 2.6.24 onwards also in the mainline kernel. If you happen to be using any of these, you don't have to patch your kernel manually. Otherwise, just download the patch using the link above and run cd /usr/src/linux ; cat uvesafb-0.1-rc3-2.6.23-rc3.patch | patch -p1&lt;br /&gt;&lt;br /&gt;The guide below assumes you're using Gentoo Linux. If you happen do be using another distro, replace all emerge steps with unpack ; ./configure ; make ; make install or similar.&lt;br /&gt;&lt;br /&gt;   1. cd /usr/src/linux&lt;br /&gt;   2. configure the kernel; in the "Device Drivers" section select:&lt;br /&gt;      Connector - unified userspace &lt;-&gt; kernelspace linker and&lt;br /&gt;      Graphics support ---&gt; Support for frame buffer devices ---&gt; Userspace VESA VGA graphics support&lt;br /&gt;      (that's CONFIG_CONNECTOR=y and CONFIG_FB_UVESA=y)&lt;br /&gt;   3. build the kernel: make&lt;br /&gt;   4. remerge klibc: emerge klibc&lt;br /&gt;      note: This step is necessary because klibc has to be compiled against a kernel tree that includes uvesafb. You only need to do this once, i.e. you won't have to remerge klibc every time you install a new kernel or a new kernel module.&lt;br /&gt;   5. install v86d: emerge v86d&lt;br /&gt;   6. reconfigure your kernel; in the "General Setup" section select:&lt;br /&gt;      Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;      and use /usr/share/v86d/initramfs in Initramfs source file(s).&lt;br /&gt;      (that's CONFIG_INITRAMFS_SOURCE="/usr/share/v86d/initramfs")&lt;br /&gt;   7. rebuild the kernel: make, and install it&lt;br /&gt;   8. add video=uvesafb:1024x768-32,mtrr:3,ywrap (or similar) to your kernel command line&lt;br /&gt;   9. reboot and enjoy uvesafb :)&lt;br /&gt;&lt;br /&gt;NOTE: The older versions of klibc seem to have problems with the new unified arches in the kernel (2.6.24). To avoid these issues, use klibc-1.5.8 or newer. Thanks to David Raison for pointing this out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5284642540674569207?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5284642540674569207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5284642540674569207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5284642540674569207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5284642540674569207'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/08/uvesafb.html' title='UvesaFB'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2684842670524040374</id><published>2010-07-19T13:16:00.006+01:00</published><updated>2011-03-29T18:18:30.766+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='videowall'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Network synchronized playback using UDP</title><content type='html'>UPDATE 2011 - &lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/networksync.html"&gt;MPlayer udp-sync&lt;/a&gt; is now part of the main trunk.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Someone contacted me on how to do this and I realised I still hadn't written it up.&lt;br /&gt;&lt;br /&gt;I tried to recreate how I made the player using svn's checkout by date feature but I failed to find the magic.&lt;br /&gt;&lt;br /&gt;Instead &lt;a href="http://www.maht0x0r.net/mplayer-udp-patched.tar.bz2"&gt;here's a link&lt;/a&gt; to the patched source code (15M)&lt;br /&gt;&lt;br /&gt;And here's the patches on their own &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/mplayer-udp-patch-17.diff"&gt;mplayer-udp-patch-17.diff&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.maht0x0r.net/udp.diff"&gt;udp.diff&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Seems I don't have the unpatched code. The date of the patch is 17 Feb 2010.&lt;br /&gt;&lt;br /&gt;which should checkout with : &lt;br /&gt;&lt;br /&gt;svn checkout svn://svn.mplayerhq.hu/mplayer/trunk -r "{2010-02-17}" mplayer&lt;br /&gt;&lt;br /&gt;but it failed to build when I tried&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2684842670524040374?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2684842670524040374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2684842670524040374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2684842670524040374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2684842670524040374'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/07/network-synchronized-playback-using-udp.html' title='Network synchronized playback using UDP'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1663718726079805274</id><published>2010-05-28T20:33:00.002+01:00</published><updated>2010-05-28T20:39:08.103+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='repairs'/><category scheme='http://www.blogger.com/atom/ns#' term='g4'/><title type='text'>G4 PowerBook screen replacement</title><content type='html'>screen model B152EW01&lt;br /&gt;&lt;br /&gt;Simon turned up with a spares or repairs he's ebayed and we got to work. We couldn't find any instructions so we just took all the screws out!!&lt;br /&gt;&lt;br /&gt;The lid is glued to the body which makes it a bit scruffy when you put it back together but all worked out ok, no hassles really except working out what to do. Even though the outer shells looked the same, the two laptops didn't have exactly the same motherboard but the screen luckily had the same connections.&lt;br /&gt;&lt;br /&gt;Sadly there were the dreaded vertical stripes when it came on but that might be damage on the MB from when it got smashed. It's still muc better than literally half the screen being lcd juice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1663718726079805274?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1663718726079805274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1663718726079805274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1663718726079805274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1663718726079805274'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/05/g4-powerbook-screen-replacement.html' title='G4 PowerBook screen replacement'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7435673411972129936</id><published>2010-05-24T10:59:00.002+01:00</published><updated>2010-05-24T11:01:49.131+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Fuck you jQuery</title><content type='html'>&gt; jQuery is a fixed part of RoundCube which allows you to make use of the very comfortable jQuery functions when writing plugin scripts.&lt;br /&gt;&lt;br /&gt;Great, now I have to learn TWO frameworks at once.&lt;br /&gt;&lt;br /&gt;Here's a tip, esp. for YOU Resig : If Javascript is too hard for you, perhaps you should pick up a broom and get a job you can do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7435673411972129936?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7435673411972129936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7435673411972129936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7435673411972129936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7435673411972129936'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/05/fuck-you-jquery.html' title='Fuck you jQuery'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-6800719523841868209</id><published>2010-05-19T19:29:00.006+01:00</published><updated>2010-05-19T20:49:38.105+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wol'/><category scheme='http://www.blogger.com/atom/ns#' term='acpi'/><category scheme='http://www.blogger.com/atom/ns#' term='macmini'/><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='wake-on-lan'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mac-Mini ACPI wake-on-lan</title><content type='html'>tl;dr : use ACPI, if you want wake-on-lan you can only suspend to ram&lt;br /&gt;&lt;br /&gt;# uname -a&lt;br /&gt;Linux mini1 2.6.32-gentoo-r7 #13 SMP Wed May 19 18:11:25 BST 2010 i686 Genuine Intel(R) CPU 1300 @ 1.66GHz GenuineIntel GNU/Linux&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/mac_mini.kernel.config.txt"&gt;.config&lt;/a&gt; &lt;a href="http://www.maht0x0r.net/mac_mini.make.conf.txt"&gt;make.conf&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;APM&lt;/h2&gt;It won't have it : &lt;br /&gt;&lt;code&gt;CONFIG_APM=y&lt;/code&gt;&lt;br /&gt;and yet&lt;br /&gt;&lt;code&gt;mini# apmd&lt;br /&gt;No APM support in kernel&lt;/code&gt;&lt;br /&gt;&lt;h2&gt;ACPI&lt;/h2&gt;&lt;code&gt;&lt;pre&gt;mini# acpitool -e&lt;br /&gt;... snip ...&lt;br /&gt;   Device       S-state   Status   Sysfs node&lt;br /&gt;  ---------------------------------------&lt;br /&gt;  1. PXS1         S4     disabled   pci:0000:01:00.0&lt;br /&gt;  2. PXS2         S4     disabled   pci:0000:02:00.0&lt;br /&gt;&lt;br /&gt;mini# ethtool eth0&lt;br /&gt;Settings for eth0:&lt;br /&gt;... snip ...&lt;br /&gt;        Supports Wake-on: pg&lt;br /&gt;        Wake-on: d&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;So by default wake-on-lan is disabled (quite right too), thus :&lt;br /&gt;(and *sigh* I have to show you the GPL! - is it really fucking worth it, the notice is longer than the code they gave me) :&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;mini# cat /etc/init.d/wol&lt;br /&gt;#!/sbin/runscript&lt;br /&gt;# Copyright 1999-2010 Gentoo Foundation&lt;br /&gt;# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;&lt;br /&gt;depend() {&lt;br /&gt;        need net&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;start() {&lt;br /&gt;        acpitool -w | grep -q enabled || acpitool -W 2&lt;br /&gt;        # -W 2 stupidly toggles enabled/disabled&lt;br /&gt;        ethtool -s eth0 wol g&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;restart() {&lt;br /&gt;        start&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;so now acpitool -[Ss] both work, I made a swap for storing disk based and it restores just fine, except mplayer waits until a media change before resuming to play on screen (the sound might work, I have it on mute). That's not good enough for this application, it might be an hour. I read some stuff on't'net earlier about dumping video registers and the like and ended up using sys-power/hibernate-script. It didn't do any better so I went for a quick and dirty : &lt;b&gt;kill `{pgrep mplayer}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Or rather I installed daemontools and made mplayer a service (I use SLiM to auto-login to X but I realise now I could have done it with daemontools (I didn't have it installed at the time). Oh well, I learned about xdm. &lt;br /&gt;&lt;br /&gt;Hibernate lets you run scripts on resume so I just have it kill mplayer and unclutter (which removes the cursor).&lt;br /&gt;&lt;br /&gt;When the Mac-mini is in suspend-to-disk I can't get it to hear Wake-On-Lan magic packets, I have to use the power button to get it to resume. It works just fine with suspend-to-ram (the power led slowly pulses so you know it's on).&lt;br /&gt;&lt;br /&gt;TuxOnIce looks like it might help but I can't be arsed with it no more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-6800719523841868209?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/6800719523841868209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=6800719523841868209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6800719523841868209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6800719523841868209'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/05/mac-mini-acpi-wake-on-lan.html' title='Mac-Mini ACPI wake-on-lan'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3209217292060066431</id><published>2010-05-16T17:24:00.003+01:00</published><updated>2010-05-16T22:24:58.932+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Loeliger'/><category scheme='http://www.blogger.com/atom/ns#' term='x86'/><category scheme='http://www.blogger.com/atom/ns#' term='til'/><category scheme='http://www.blogger.com/atom/ns#' term='asm'/><category scheme='http://www.blogger.com/atom/ns#' term='nasm'/><title type='text'>Loeliger's TIL</title><content type='html'>I first implemented &lt;a href="http://retrocode.blogspot.com/2010/03/threaded-interpretive-languages-by-r-g.html"&gt;Loeliger's TIL&lt;/a&gt; (&lt;a href="http://www.google.co.uk/search?q=ISBN-10%3A+007038360X"&gt;ISBN-10: 007038360X&lt;/a&gt;) in AVR machine code though as with most FORTH type projects, writing the interpreter is as far as anyone goes. My interest in SIMD has given me an excuse to write it in x86 assembler. Unfortunately I'm going to have to do it on Linux, though it's like choosing which nugget to pick out of the cat litter tray. Alarmingly I read what is effectively the &lt;a href="http://www.kernel.org/doc/man-pages/online/pages/man2/syscalls.2.html"&gt;Linux manual&lt;/a&gt;. Nearly 400 syscalls. What a diabolical monster!!&lt;br /&gt;&lt;br /&gt;Anyway Loeliger. One of my favourite readings.&lt;br /&gt;Here's a template I made for the inner loop. It contains no actual mnemonics because the idea is that to port it to a new platform, one just %defines the required bits, just leaving the platform dictionary to write.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;COLON:&lt;br /&gt;        PUSH_I_2_RS             ; PSH I -&gt; RS&lt;br /&gt;        WA_2_I                  ; WA -&gt; I&lt;br /&gt;        JMP_NEXT                ; jmp NEXT&lt;br /&gt;SEMI :&lt;br /&gt;        my_ca                   ; Code Address of SEMI&lt;br /&gt;        POP_RS_2_I              ; POP RS -&gt; I&lt;br /&gt;NEXT:&lt;br /&gt;        DEREF_I_2_WA            ; @I -&gt; WA&lt;br /&gt;        I_2_NEXT_I              ; I = I + 2&lt;br /&gt;RUN:&lt;br /&gt;        DEREF_WA_2_CA           ; @WA -&gt; CA&lt;br /&gt;        WA_2_NEXT_WA            ; WA = WA + 2&lt;br /&gt;        CA_2_PC                 ; CA -&gt; PC ; implicit   JMP CA&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I've done the %defines and %macros for x86 now.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/tilm"&gt;work in progress&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've got some nifty macros going there, NASM seems easy to use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3209217292060066431?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3209217292060066431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3209217292060066431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3209217292060066431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3209217292060066431'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/05/loeligers-til.html' title='Loeliger&apos;s TIL'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8792230220721626902</id><published>2010-05-15T19:32:00.002+01:00</published><updated>2010-05-15T22:53:38.520+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macmini'/><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Mac-Mini Gentoo revisited</title><content type='html'>I got the Mac-Mini back. This time round I skipped the whole "Install 10.5 and use boot camp to make a partition" and went straight for the Gentoo i386 disk.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;mini1 ~ # fdisk /dev/sda&lt;br /&gt;&lt;br /&gt;WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.&lt;br /&gt;&lt;br /&gt;... snip ...&lt;br /&gt;&lt;br /&gt;mini1 ~ # parted /dev/sda&lt;br /&gt;GNU Parted 1.9.0&lt;br /&gt;Using /dev/sda&lt;br /&gt;Welcome to GNU Parted! Type 'help' to view a list of commands.&lt;br /&gt;                                                                &lt;br /&gt;(parted) unit b                                                           &lt;br /&gt;(parted) p                                                                &lt;br /&gt;Model: ATA FUJITSU MHV2060B (scsi)&lt;br /&gt;Disk /dev/sda: 60011642880B&lt;br /&gt;Sector size (logical/physical): 512B/512B&lt;br /&gt;Partition Table: gpt&lt;br /&gt;&lt;br /&gt;Number  Start         End           Size          File system  Name                  Flags&lt;br /&gt; 1      20480B        209735679B    209715200B    fat32        EFI system partition  boot&lt;br /&gt; 2      209735680B    1000000511B   790264832B    ext2&lt;br /&gt; 3      1000000512B   10000000511B  9000000000B   ext3&lt;br /&gt; 4      10000000512B  60011625983B  50011625472B  ext3&lt;br /&gt;&lt;br /&gt;(parted)&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then I booted using the &lt;a href="http://refit.sourceforge.net/"&gt;rEFIt&lt;/a&gt; iso disk, it fiddled with the MBR and now it boots.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;# cat /etc/fstab&lt;br /&gt;/dev/sda2               /boot           ext2            noauto,noatime  1 2&lt;br /&gt;/dev/sda3               /               ext3            noatime         0 1&lt;br /&gt;/dev/sda4               /mnt/Store      ext3            noatime         0 1&lt;br /&gt;/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0&lt;br /&gt;&lt;br /&gt;# cat /boot/grub/menu.lst&lt;br /&gt;title Gentoo Linux&lt;br /&gt;root (hd0,1)&lt;br /&gt;kernel /boot/kernel root=/dev/sda3&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Wheeee all done, got X, got ALSA, got mplayer&lt;br /&gt;&lt;br /&gt;I have to make it do i915 as a module for Xorg, had to add mesa for the dri to work.&lt;br /&gt;&lt;br /&gt;But work it does !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8792230220721626902?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8792230220721626902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8792230220721626902' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8792230220721626902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8792230220721626902'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/05/mac-mini-gentoo-revisited.html' title='Mac-Mini Gentoo revisited'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7328829949100152545</id><published>2010-05-10T11:58:00.005+01:00</published><updated>2010-05-10T15:46:05.265+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='chickenfoot'/><title type='text'>Keep on Clucking with Chickenfoot</title><content type='html'>Websites with black backgrounds do my eyes in, so here's a &lt;a href="http://groups.csail.mit.edu/uid/chickenfoot/"&gt;Chickenfoot&lt;/a&gt; script to set the background and color for all elements on the current page to Plan9 like calm.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;var s = document.getElementsByTagName("*")&lt;br /&gt;for(a in s) {&lt;br /&gt;  s[a].style.background = "#FFD"&lt;br /&gt;  if(s[a].nodeName == "A") { // HREFs&lt;br /&gt;    s[a].style.color = "#00F"&lt;br /&gt;    s[a].style.textDecoration = "none"&lt;br /&gt;  } else {&lt;br /&gt;    s[a].style.color = "#111"&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And here's a bit of helper code to inspect collections :&lt;br /&gt;(in Chickenfoot the last evaluation is printed on the console)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;function inspect(e) {&lt;br /&gt;  var b = ""&lt;br /&gt;  for(k in e) {&lt;br /&gt;    b += k + " = " + e[k] + "\n"&lt;br /&gt;  }&lt;br /&gt;  return b&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// use it like this :&lt;br /&gt;&lt;br /&gt;var c = ""&lt;br /&gt;var s = document.getElementsByTagName("*")&lt;br /&gt;for(a in s)&lt;br /&gt;  c += inspect(s[a])&lt;br /&gt;c&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This simple script sat on right click has made my day, and it's only midday!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7328829949100152545?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7328829949100152545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7328829949100152545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7328829949100152545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7328829949100152545'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/05/keep-on-clucking-with-chickenfoot.html' title='Keep on Clucking with Chickenfoot'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5390414338639058531</id><published>2010-04-30T15:38:00.006+01:00</published><updated>2011-03-29T16:10:51.583+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='videowall'/><category scheme='http://www.blogger.com/atom/ns#' term='vdpau'/><category scheme='http://www.blogger.com/atom/ns#' term='nvidia'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mplayer using Nvidia Vdpau</title><content type='html'>I did a &lt;a href="http://twitpic.com/1jg5ms"&gt;side by side projection&lt;/a&gt; last night. Two 1280x768 projectors pretending to be 1280x1024 (I can probably drive them dot for dot but I didn't have enough tinker time).&lt;br /&gt;&lt;br /&gt;Instead of the MatroxDualHeadToGo I used mplayer with Jason Holt's udp-patch.&lt;br /&gt;&lt;br /&gt;The playback machine has two Nvidia 8600GTs and I used one for each projector.&lt;br /&gt;&lt;br /&gt;The mp4s were only 25Mb each, even so I played them from RAMdisk&lt;br /&gt;&lt;br /&gt;&lt;code&gt;# ls -l /dev/shm/LR&lt;br /&gt;total 47164&lt;br /&gt;-rw-r--r-- 1 maht maht 22602673 Apr 29 12:16 L.mp4&lt;br /&gt;-rw-r--r-- 1 maht maht 25579796 Apr 29 12:16 R.mp4&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;With Vdpau&lt;/b&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND&lt;br /&gt;3884 maht      20   0  220m  45m  17m R   24  0.6  32:23.67 mpu&lt;br /&gt;3886 maht      20   0  221m  45m  17m R   23  0.6  31:07.02 mpu&lt;br /&gt; &lt;br /&gt;# cat /proc/3884/cmdline  | tr '\0' ' '&lt;br /&gt;mpu -vo vdpau -fs -zoom -fixed-vo -udp-master -loop 0 -input file=/dev/null /dev/shm/LR/R.mp4&lt;br /&gt;&lt;br /&gt;# cat /proc/3886/cmdline  | tr '\0' ' '&lt;br /&gt;mpu -vo vdpau -framedrop -fs -zoom -fixed-vo -udp-slave -loop -0 -input file=/dev/null /dev/shm/LR/L.mp4&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Without Vdpau&lt;/b&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;DISPLAY=:0.1 mpu -vo xv -framedrop -fs -zoom -fixed-vo -udp-slave -loop -0 -input 'file=/dev/null' /dev/shm/LR/L.mp4 &amp;&lt;br /&gt;DISPLAY=:0.0 mpu -vo xv -fs -zoom -fixed-vo -udp-master -loop 0 -input 'file=/dev/null' /dev/shm/LR/R.mp4&lt;br /&gt;&lt;br /&gt;  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND&lt;br /&gt; 4252 maht      20   0  221m  47m  20m R   31  0.6   0:16.00 mpu&lt;br /&gt; 4253 maht      20   0  221m  47m  20m R   30  0.6   0:14.82 mpu&lt;br /&gt; 3860 root      20   0  114m  40m  26m R   15  0.5   0:16.31 X&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So for this low bandwidth mp4 using vdpau saved me 25 %CPU points on the quad core, or even 1 whole CPU if you think about how it will get scheduled with &amp;gt; 2 cores. Looks tasty for the dual core player.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5390414338639058531?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5390414338639058531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5390414338639058531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5390414338639058531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5390414338639058531'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/mplayer-using-nvidia-vdpau.html' title='Mplayer using Nvidia Vdpau'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5568617251358034368</id><published>2010-04-28T08:49:00.004+01:00</published><updated>2010-04-28T11:48:35.040+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='go'/><title type='text'>Exhausting FDs in Go-lang</title><content type='html'>Looks like the garbage collector is lazy when clearing away unused Fds so always call fd.Close()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5568617251358034368?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5568617251358034368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5568617251358034368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5568617251358034368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5568617251358034368'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/dont-do-this-in-go-lang.html' title='Exhausting FDs in Go-lang'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7902746669403245196</id><published>2010-04-21T15:18:00.000+01:00</published><updated>2010-04-21T20:12:23.103+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='go'/><title type='text'>Installing Go on Fresh Gentoo</title><content type='html'>Gentooed up the Quad Core.&lt;br /&gt;On a fresh install, let's see what needs to be added for Go&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;# emerge mercurial&lt;br /&gt;# emerge ed&lt;br /&gt;# emerge syslog-ng  # yes folks, Go has a dependency on syslog&lt;br /&gt;# /etc/init.d/syslog-ng start # don't forget like I did&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7902746669403245196?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7902746669403245196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7902746669403245196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7902746669403245196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7902746669403245196'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/installing-go-on-fresh-gentoo.html' title='Installing Go on Fresh Gentoo'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4731138662255342696</id><published>2010-04-21T11:02:00.000+01:00</published><updated>2010-04-21T11:04:12.998+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aoe'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>AoE client for Windows</title><content type='html'>StarWind's gone AoE client Free&lt;br /&gt;&lt;br /&gt;You're supposed to reg &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.starwindsoftware.com/"&gt;http://www.starwindsoftware.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Shame about the *AWFUL* UI&lt;br /&gt;&lt;br /&gt;proper belongs in the Hall of Shame&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4731138662255342696?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4731138662255342696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4731138662255342696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4731138662255342696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4731138662255342696'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/aoe-client-for-windows.html' title='AoE client for Windows'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7849485626143556659</id><published>2010-04-20T17:20:00.004+01:00</published><updated>2010-04-20T17:29:06.283+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='png'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='go'/><title type='text'>Image Processing with Go</title><content type='html'>The usual story of aphid meets programming language is to see what it's like at image processing.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/go/file.go"&gt;file.go&lt;/a&gt; from the &lt;a href="http://golang.org/doc/go_tutorial.html"&gt;Go Tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;package main&lt;br /&gt;&lt;br /&gt;import (&lt;br /&gt;        "fmt"&lt;br /&gt;        "image"&lt;br /&gt;        png "image/png"&lt;br /&gt;        "./file"&lt;br /&gt;        "os"&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;var errn = 0&lt;br /&gt;func abort(e os.Error) {&lt;br /&gt;        errn++&lt;br /&gt;        if e != nil {&lt;br /&gt;                fmt.Printf("ERR %s\n", e)&lt;br /&gt;                os.Exit(errn)&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;func main() {&lt;br /&gt;        fd, err := file.Open("in.png", 0, 0)&lt;br /&gt;        abort(err)&lt;br /&gt;        var img image.Image&lt;br /&gt;        img, err = png.Decode(fd)&lt;br /&gt;        fd.Close()&lt;br /&gt;        abort(err)&lt;br /&gt;        w, h := img.Width(), img.Height()&lt;br /&gt;        opng := image.NewNRGBA(w, h)&lt;br /&gt;        var c image.Color&lt;br /&gt;        for y := 0; y &lt; h; y++ {&lt;br /&gt;        for x := 0; x &lt; w; x++ {&lt;br /&gt;                c = img.At(x, y)&lt;br /&gt;                opng.Set(x, y, c)&lt;br /&gt;        }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        fd, err = file.Open("create.png", os.O_RDWR | os.O_CREATE, 0644)&lt;br /&gt;        abort(err)&lt;br /&gt;        err = png.Encode(fd, opng)&lt;br /&gt;        abort(err)&lt;br /&gt;        fd.Close()&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;% cd /dev/shm; cp $home/1920x1440.png in.png; time /tmp/8.out&lt;br /&gt;real    0m9.810s&lt;br /&gt;user    0m12.425s&lt;br /&gt;sys     0m0.072s&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;around 1s per 2000 pixels&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7849485626143556659?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7849485626143556659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7849485626143556659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7849485626143556659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7849485626143556659'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/image-processing-with-go.html' title='Image Processing with Go'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5290660487553855750</id><published>2010-04-20T15:00:00.011+01:00</published><updated>2010-04-20T16:18:36.824+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='multicore'/><category scheme='http://www.blogger.com/atom/ns#' term='rc'/><title type='text'>Multicore Shell Scripting</title><content type='html'>Processing lots of files at once in a process level embarassingly parallel way is v. handy. I've been meaning to get round to doing this shell script spawner that will use a fixed number of processes launching, by default, one process for each CPU core the OS reports.&lt;br /&gt;&lt;br /&gt;It reads one line at a time and executes it until N are running then it waits until they have all finished and then spawns N more.&lt;br /&gt;&lt;br /&gt;It's the most horrible way of doing it from an I/O point of view, hotspot bonanza!!&lt;br /&gt;&lt;br /&gt;So maybe it's best to echo 'sleep 2; gm mogrify -resize 5000x3000 foo.jpg bar.png'&lt;br /&gt;I don't know, we'll see&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;fn os_cpus { # platform dependent, number of cpus, counting from 1&lt;br /&gt;        # Linux&lt;br /&gt;        grep '^processor' /proc/cpuinfo |&lt;br /&gt;                tail -n 1 |&lt;br /&gt;                sed 's/[^0-9]//g' |&lt;br /&gt;                awk '/./ {print $0 + 1; exit} {print "1"}'&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fn cpus {&lt;br /&gt;        if(~ $#1 0)&lt;br /&gt;                os_cpus # default&lt;br /&gt;        if not&lt;br /&gt;                echo $1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;cpuN = `{cpus $1}&lt;br /&gt;while() {&lt;br /&gt;        for(i in `{seq 1 $cpuN}) {&lt;br /&gt;                if(cmd = `{read}) { # brace required :) clever rc parser&lt;br /&gt;                        $cmd &amp;&lt;br /&gt;                }&lt;br /&gt;                if not&lt;br /&gt;                        kill $pid&lt;br /&gt;        }&lt;br /&gt;        wait&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I  just ran this&lt;br /&gt;&lt;br /&gt;&lt;code&gt;{ for(f in f*png) echo gm convert $f -interlace None i^$f } | conquer&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Worked a treat&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5290660487553855750?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5290660487553855750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5290660487553855750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5290660487553855750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5290660487553855750'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/multicore-shell-scripting.html' title='Multicore Shell Scripting'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1053141706910601934</id><published>2010-04-18T15:41:00.010+01:00</published><updated>2010-04-19T15:13:24.148+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macmini'/><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><title type='text'>Mac-Mini is booting Gentoo Linux</title><content type='html'>&lt;a href="http://sowerbutts.com/linux-mac-mini/"&gt;used these notes&lt;/a&gt;&lt;br /&gt;Install 10.5 to the whole disk&lt;br /&gt;run bootcamp from Applications/Utilities and make a Windows partition&lt;br /&gt;install &lt;a href="http://refit.sourceforge.net/"&gt;rEFIt&lt;/a&gt;&lt;br /&gt;reboot, reboot again&lt;br /&gt;boot &lt;a href="http://www.gentoo.org/main/en/where.xml"&gt;gentoo x86&lt;/a&gt;, use parted to make root in the fat32 partition bootcamp made&lt;br /&gt;reboot - run rEFIt partition utility to remake MBR&lt;br /&gt;boot gentoo, make file system &lt;br /&gt;&lt;br /&gt;parted output&lt;br /&gt;&lt;pre&gt;Partition Table: gpt&lt;br /&gt;&lt;br /&gt;Number  Start   End     Size    File system  Name                  Flags&lt;br /&gt; 1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot&lt;br /&gt; 2      210MB   23.7GB  23.5GB  hfs+         Untitled&lt;br /&gt; 3      23.7GB  60.0GB  36.3GB  ext2                               boot&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;.........  carry on with &lt;a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1"&gt;install&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I used the make.conf from &lt;a href="http://www.gentoo-wiki.info/Apple_Mac_Mini_-_Intel"&gt;this useful page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/gentoo/mac_mini.config"&gt;mac_mini kernel config&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Compiling away .....&lt;br /&gt; come one, compilaroo&lt;br /&gt;&lt;br /&gt;grub-install --no-floppy /dev/sda3&lt;br /&gt;&lt;br /&gt;whee I now have Gentoo Linux booting on the mac mini&lt;br /&gt;&lt;br /&gt;it's currently in VESA 1920x1440x32  &lt;br /&gt;&lt;br /&gt;added "directfb" to the use flags&lt;br /&gt;&lt;br /&gt;emerge mplayer&lt;br /&gt;&lt;br /&gt;I'm on 17 of 103 packages .....&lt;br /&gt;80 of 103 ... come on giddy up&lt;br /&gt;&lt;br /&gt;mplayer doesn't work using directfb 'initialization error' - maybe return to that later - intel 954gm is the device&lt;br /&gt;&lt;br /&gt;works fine in fbdev mode but that doesn't do -fs -zoom properly. -xy 1024:768 works but goes a bit stuttery&lt;br /&gt;fbdev2 doesn't work with -fixed-vo&lt;br /&gt;&lt;br /&gt;so emerge xorg-x11&lt;br /&gt;&lt;br /&gt;ideally I want to be in 1920x1440x32 and scale everything up to fs, fingers crossed that X11 will win !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.......&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fail - X11 couldn't find its driver and I had to give up the MacMini&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;X -config /root/xorg.conf.new &lt;br /&gt;&lt;br /&gt;X.Org X Server 1.7.6&lt;br /&gt;Release Date: 2010-03-17&lt;br /&gt;X Protocol Version 11, Revision 0&lt;br /&gt;Build Operating System: Linux 2.6.32-gentoo-r7 i686 &lt;br /&gt;Current Operating System: Linux mini1 2.6.32-gentoo-r7 #3 SMP Mon Apr 19 11:31:59 BST 2010 i686&lt;br /&gt;Kernel command line: root=/dev/sda3 vga=0x318 video=uvesafb:1024x768-24@72,mtrr:3,ywrap&lt;br /&gt;Build Date: 19 April 2010  12:47:20PM&lt;br /&gt; &lt;br /&gt;Current version of pixman: 0.17.2&lt;br /&gt;        Before reporting problems, check http://wiki.x.org&lt;br /&gt;        to make sure that you have the latest version.&lt;br /&gt;Markers: (--) probed, (**) from config file, (==) default setting,&lt;br /&gt;        (++) from command line, (!!) notice, (II) informational,&lt;br /&gt;        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.&lt;br /&gt;(==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 19 12:54:28 2010&lt;br /&gt;(++) Using config file: "/root/xorg.conf.new"&lt;br /&gt;FATAL: Module i915 not found.&lt;br /&gt;xf86TokenToOptinfo: table is NULL&lt;br /&gt;xf86TokenToOptinfo: table is NULL&lt;br /&gt;error setting MTRR (base = 0x80000000, size = 0x10000000, type = 1) Inappropriate ioctl for device (25)&lt;br /&gt;(EE) AIGLX error: dlopen of /usr/lib/dri/i915_dri.so failed (/usr/lib/dri/i915_dri.so: cannot open shared object file: No such file or directory)&lt;br /&gt;(EE) AIGLX: reverting to software rendering&lt;br /&gt;error setting MTRR (base = 0x80000000, size = 0x10000000, type = 1) Inappropriate ioctl for device (25)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;it's right, there's not much in /usr/lib/dri/&lt;br /&gt;&lt;br /&gt;maybe that MTRR thing is significant, I need to boot with a LiveCD and find oot, Sabayon Linux 5.2 is rather nice, that looked great (but no shell on the media centre version I booted) &lt;br /&gt;&lt;br /&gt;so, until next time ........&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1053141706910601934?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1053141706910601934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1053141706910601934' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1053141706910601934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1053141706910601934'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/mac-mini-is-booting-gentoo-linux.html' title='Mac-Mini is booting Gentoo Linux'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-984827660357790073</id><published>2010-04-13T19:32:00.004+01:00</published><updated>2010-04-13T21:23:55.372+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mplayer. macports'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>MPlayer OSX Revisited - failed</title><content type='html'>The MPlayer OSX Extended tells you all you need to know about GUI oriented OSes. You can't launch it from the command line properly you have to tell it what to open with a series of pulleys.&lt;br /&gt;&lt;br /&gt;So I'm trying to compile it using &lt;a href="http://tracker.sttz.ch/projects/mplayerosx/wiki/CompileMPlayerShared"&gt;these instructions&lt;/a&gt;. I already tried using ./configure &amp;&amp; make but that failed with _ff_eval2 missing symbol.&lt;br /&gt;&lt;br /&gt;For extra points I have to avoid upgrading to 10.5 as there might be no going back.&lt;br /&gt;&lt;br /&gt;I'm also a bit hungry, the chip shop is closed. Curse that Rocco and his real life, doesn't he know we researchers of the deep rely on his potato chipping and frying skills.&lt;br /&gt;&lt;br /&gt;WTF does subversion need sqlite3 for !. Do they really need to express their data access in SQL ! We're always one step away from being Crystal Reports in the end.&lt;br /&gt;&lt;br /&gt;Needed an extra : port install libtool. nah, did a MacPorts upgrade : &lt;code&gt;sudo port -d selfupdate&lt;/code&gt;&lt;br /&gt;and then port installed all the pre-requisites again! ages.&lt;br /&gt;&lt;br /&gt;Try not to ever do this yourself without a big book to read while it takes forever with no guarantee of success, even if it works I know it won't do what I want. BUt what I will have is working source code, that's golden.&lt;br /&gt;&lt;br /&gt;game over, updated subversion source doesn't compile&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-984827660357790073?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/984827660357790073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=984827660357790073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/984827660357790073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/984827660357790073'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/mplayer-osx-revisited.html' title='MPlayer OSX Revisited - failed'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4235875941396136912</id><published>2010-04-13T13:24:00.002+01:00</published><updated>2010-04-13T13:47:27.213+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='framebuffer'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mplayer framebuffer</title><content type='html'>Mplayer in the framebuffer seems to be best with DirectFB, &lt;br /&gt;&lt;br /&gt;mplayer -quiet -vo directfb:buffermode=triple -zoom -fs -aspect 16:9 NSC_TV_ad_30s.avi&lt;br /&gt;&lt;br /&gt;DirectFB also gives us buffermode={single, double, triple}&lt;br /&gt;fieldparity={top, bottom, disabled}&lt;br /&gt;layer=N&lt;br /&gt;dfbopts=&lt;list&gt;&lt;br /&gt;&lt;br /&gt;stuff that works&lt;br /&gt;&lt;br /&gt;-flip -x n -y n -xy n,m (set width, height to n,m) -vf rotate -vf scale -vf mirror&lt;br /&gt;&lt;br /&gt;scale resamples the stream before outputting it -xy just hardware scales it&lt;br /&gt;&lt;br /&gt;v happy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4235875941396136912?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4235875941396136912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4235875941396136912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4235875941396136912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4235875941396136912'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/mplayer-framebuffer.html' title='Mplayer framebuffer'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8031916541850908424</id><published>2010-04-12T18:43:00.004+01:00</published><updated>2010-04-12T20:08:22.515+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aoe'/><title type='text'>Why I love AoE</title><content type='html'>I'm using a 2GB flash card to boot from but as I build the system it uses /var/tmp as a place to build all the intermediate files.&lt;br /&gt;&lt;br /&gt;We can get two wins for the price of one.&lt;br /&gt;First off make a new vblade&lt;br /&gt;&lt;br /&gt;&lt;code&gt;daph:/# cd /dev/shm/&lt;br /&gt;daph:/dev/shm# qemu-img create -f raw var_tmp 2G&lt;br /&gt;Formatting 'var_tmp', fmt=raw, size=2097152 kB&lt;br /&gt;daph:/dev/shm# ls -l var_tmp&lt;br /&gt;-rw-r--r-- 1 root root 2147483648 2010-04-12 18:55 var_tmp&lt;br /&gt;daph:/dev/shm# du -h var_tmp &lt;br /&gt;0       var_tmp&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This gives us a maximum size of 2G but until we use it, it's size is actually 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By using &lt;code&gt;# vblade 2 3 eth0 /dev/shm/var_tmp&lt;br /&gt;pid 15913: e2.3, 4194304 sectors O_RDWR&lt;/code&gt;&lt;br /&gt;run &lt;code&gt;#  fdisk /dev/etherd/e2.3&lt;/code&gt;&lt;br /&gt;and create 1 primary partition covering the disk (or however you want!) &lt;a href="http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&amp;amp;chap=4"&gt;surely you know how&lt;/a&gt;&lt;br /&gt;In my case &lt;code&gt;# mke2fs -T small /dev/etherd/e2.3p1&lt;/code&gt;&lt;br /&gt;then mount it and importantly bind our memory based /tmp/var in place &lt;br /&gt;&lt;code&gt;mount /dev/etherd/e2.3p1 /mnt/boof&lt;br /&gt;mkdir -p /mnt/boof/var/tmp&lt;br /&gt;mount --bind /mnt/boof/var/tmp /var/tmp&lt;br /&gt;emerge something&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and emerge will use the vblade for tmp storage&lt;br /&gt;&lt;br /&gt;of course Linux laughs in your face because binds are root level so once it's done, it's done, you can't pop to another window and keep looking in /var/tmp on your local disk, that's gone until you unbind it.&lt;br /&gt;&lt;br /&gt;Of course you don't need to be using shm for the vblade you can use disk files or partitions. With a few machines donating RAM you're probably able to saturate your Gbit, with this new machine I'll finally be able to make some measurements.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% time dd if=/dev/zero of=/dev/null count=2000000 bs=512&lt;br /&gt;1024000000 bytes (1.0 GB) copied, 1.22008 s, 839 MB/s &lt;br /&gt;%  time dd if=/dev/zero of=/mnt/boof/zeros count=2000000 bs=512&lt;br /&gt;1024000000 bytes (1.0 GB) copied, 80.0547 s, 12.8 MB/s&lt;br /&gt;% time dd if=/mnt/boof/zeros of=/dev/null  count=2000000 bs=512&lt;br /&gt;1024000000 bytes (1.0 GB) copied, 1.66719 s, 614 MB/s&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This last one is pretty astonishing, I think it needs testing without zeros or something&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8031916541850908424?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8031916541850908424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8031916541850908424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8031916541850908424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8031916541850908424'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/why-i-love-aoe.html' title='Why I love AoE'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2691491451438561320</id><published>2010-04-12T16:58:00.006+01:00</published><updated>2010-04-12T19:56:48.783+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='fbsplash'/><title type='text'>Framebuffer fun</title><content type='html'>Getting the framebuffer splash page going was a fun day.&lt;br /&gt;&lt;br /&gt;There's some &lt;a href="http://en.gentoo-wiki.com/wiki/Fbsplash"&gt;not so secret sauce&lt;/a&gt; - that's the definitive one for me April 2010&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% emerge splashutils&lt;br /&gt;% emerge -av splash-themes-gentoo&lt;br /&gt;% splash_geninitramfs --verbose --res 1280x1024 --generate /boot/splash gentoo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;it uses /etc/splash/gentoo as the source Dir for the files&lt;br /&gt;&lt;br /&gt;&lt;code&gt;title Gentoo Vesa&lt;br /&gt;root (hd0,0)&lt;br /&gt;kernel /boot/vmlinuz root/dev/sda2 vga=0x31b video=nvidiafb:1280x1024-32@72,tty:12 splash=silent,theme:gentoo console=tty1&lt;br /&gt;initrd (hd0,0)/boot/splash&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;various places claim you need 16bit vga but that's no longer true&lt;br /&gt;&lt;br /&gt;make sure the bits in the kernel conf are set &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/gentoo/config.fb1"&gt;my fb1 config&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;next stage I guess is making custom ones&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2691491451438561320?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2691491451438561320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2691491451438561320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2691491451438561320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2691491451438561320'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/framebuffer-fun.html' title='Framebuffer fun'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1062007841171680351</id><published>2010-04-12T12:02:00.005+01:00</published><updated>2010-04-12T18:07:57.418+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compact flash'/><title type='text'>CF Write Speed</title><content type='html'>I'm writing a whole partition at once and getting an interesting phenomena. The write speed is varying from 4.3-3.3MB/s which strikes me as quite a range 23% on a solid state disk. Ok It's a across a LAN but it's 1Gbit and only me on it.&lt;br /&gt;&lt;br /&gt;Final figure was : 1883Mb 3.7MB/s 8m32s&lt;br /&gt;&lt;br /&gt;Just to tickle me every time, the damn partition I backed up wasn't cleanly unmounted and I have to e2fsck the darn thing when I restore it thinking the install will be over before I need to do it again, the curse of the positive outlook.&lt;br /&gt;&lt;br /&gt;Backing up is a bit quicker &lt;code&gt;&lt;br /&gt;dd if=/dev/sda | ssh 10.0.0.1 'cat &gt; gentoo.sda'&lt;br /&gt;...&lt;br /&gt;2017419264 bytes (2.0 GB) copied, 181.301 s, 11.1MB/s&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I did the whole partition this time so I can boot it in Qemu&lt;br /&gt;&lt;code&gt;% time ssh 10.0.0.1 'cat gentoo.sda' &gt; /dev/sda&lt;br /&gt;real 9m1.404s&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1062007841171680351?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1062007841171680351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1062007841171680351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1062007841171680351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1062007841171680351'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/cf-write-speed.html' title='CF Write Speed'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1808820816639444894</id><published>2010-04-11T15:42:00.003+01:00</published><updated>2010-04-12T22:23:04.841+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gentoo. linux'/><title type='text'>I'm now a Gentoon</title><content type='html'>I spent 5 hours on Friday installing Gentoo to my new playback PC&lt;br /&gt;&lt;a href="http://www.asrock.com/mb/overview.asp?Model=K10N78FullHD-hSLI%20R3.0"&gt;ASRock K10N78FullHD-hSLI&lt;/a&gt; motherboard with 2 GB DDR2 800Mhz RAM and Athlon X2 245 Dual Core 2.9 GHz 2MBL2 65W.&lt;br /&gt;&lt;br /&gt;I'm booting it from a 2Gb Compact Flash card in a SATA &amp;lt;&amp;gt; CF device.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;boof ~ # cat /etc/make.conf &lt;br /&gt;ACCEPT_KEYWORDS="amd64"&lt;br /&gt;CHOST="x86_64-pc-linux-gnu"&lt;br /&gt;CFLAGS="-march=athlon64 -O2 -pipe"&lt;br /&gt;CXXFLAGS="${CFLAGS}"&lt;br /&gt;MAKEOPTS="-j3"&lt;br /&gt;GENTOO_MIRRORS="ftp://gentoo.virginmedia.com/sites/gentoo http://gentoo.virginmedia.com/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ "&lt;br /&gt;SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"&lt;br /&gt;USE="-hal -dbus -kde -qt3 -qt4 -gnome fbcon -apache2 -aqua -cairo directfb dri gimp -gnustep -handbook -innodb -kontact mmx -mono -mssql -mysql -oci8 openmp -oracle postgres scanner smp sse sse2 ssl vnc x264 -xemacs xvid"&lt;br /&gt;FEATURES="userfetch parallel-fetch"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I dd'd the sda2 partition to use as a vblade but it complains that it has no partition table so I'm going to build it from scratch&lt;br /&gt;&lt;br /&gt;read speed from the CF is pretty good&lt;br /&gt;&lt;br /&gt;I'm using AOE for /var and /usr/{portage, src} &lt;br /&gt;&lt;br /&gt;I've just done ACCEPT_KEYWORDS="~amd64" emerge plan9port&lt;br /&gt;and it's dragging in the whole of X, which could well be a good thing&lt;br /&gt;&lt;br /&gt;The vblade I'm using I made with qemu-img create so it uses sparse files, It has ballooned up to 1.1G. I can roll this back as I backed up sda{1,2} before doing it and have already rolled back once when I got caught out by umount.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;warning casting double to int : I hope these people know what  they are doing. I love Go's attitude : any errors - no build&lt;br /&gt;&lt;br /&gt;bah, an error in libXtst and I'm SOL&lt;br /&gt;&lt;br /&gt;reset from that, went back to text install pre plan9port, that obviously wants to go all XOrg on me. It locked up and the CF corrupted.&lt;br /&gt;&lt;br /&gt;Got the framebuffer going, emerge cdrkit is wodim and friends, dvdauthor brought in imagemagick&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1808820816639444894?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1808820816639444894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1808820816639444894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1808820816639444894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1808820816639444894'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/im-now-gentoon.html' title='I&apos;m now a Gentoon'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5213534128607078379</id><published>2010-04-09T16:00:00.002+01:00</published><updated>2010-04-09T16:05:17.643+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fossil'/><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>Adding venti to an existing Fossil</title><content type='html'>Pretty simple but I had to look it up.&lt;br /&gt;&lt;br /&gt;Here's where I started&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cpu% fossil/conf /dev/sdC0/fossil&lt;br /&gt;fsys main config /dev/sdC0/fossil&lt;br /&gt;fsys main open -V -c 3000&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and to change it&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cpu% fossil/conf -w /dev/sdC0/fossil &amp;lt;{&lt;br /&gt;echo fsys main config /dev/sdC0/fossil&lt;br /&gt;echo fsys main open -c 3000&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I just love &amp;lt;{}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5213534128607078379?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5213534128607078379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5213534128607078379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5213534128607078379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5213534128607078379'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/04/adding-venti-to-existing-fossil.html' title='Adding venti to an existing Fossil'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4104436204841234822</id><published>2010-03-26T00:40:00.013Z</published><updated>2010-04-15T16:30:41.273+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openmp'/><category scheme='http://www.blogger.com/atom/ns#' term='go'/><category scheme='http://www.blogger.com/atom/ns#' term='global illumination renderer'/><title type='text'>Go Slow</title><content type='html'>Cores up to your ears, so stop writing single threaded code! You can even grab multi machine programming, you'll hardly know the difference and there are some things that can really benefit from it. Imagine image editors grabbing spare cycles from the machines on the LAN as required. It's here today and it's called &lt;a href="http://www.golong.com/"&gt;Go&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In this entry I'm going to take someone's &lt;a href="http://github.com/ShadowIce/smallpt.go"&gt;existing Go implementation&lt;/a&gt; of the &lt;a href="http://kevinbeason.com/smallpt/"&gt;smallpt global illumination renderer&lt;/a&gt;. I hope to demonstrate the easy multi-threaded nature of CSP based techniques, even spanning machines!&lt;br /&gt;&lt;br /&gt;The single threaded Go version gives me : &lt;br /&gt;&lt;code&gt;% time ./smallpt 8&lt;br /&gt;Rendering (8 spp) 100.00&lt;br /&gt;721.50 user 5.08 system 12:06.84 elapsed 99%CPU&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Single threaded C++ with -O3&lt;br /&gt;&lt;code&gt;% time ./small-sthread 8&lt;br /&gt;Rendering (8 spp) 100.00%&lt;br /&gt;61.76u 0.27s 62.04r     ./small-sthread 8&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;OpenMP Multi threaded Code, 2 cores + HT&lt;br /&gt;&lt;code&gt;% time ./small-omp 8&lt;br /&gt;Rendering (8 spp) 100.00%&lt;br /&gt;88.55u 0.90s 24.83r     ./small-omp 8&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Oh dear, that's amazingly piss poor. An order of magnitude to find!&lt;br /&gt;&lt;br /&gt;OK I added an I/O thread to gather the pixels&lt;br /&gt;&lt;code&gt;time ./smallpt.io 8&lt;br /&gt;Rendering (8 spp) 100.00&lt;br /&gt;849.65 user 54.19 system 14:02.77 elapsed 107%CPU&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And not suprisingly I added 50s of Syscalls, some 10% overhead but at least they seem to have ended up on 1 CPU.&lt;br /&gt;&lt;br /&gt;Ultimate overload : 1 thread per pixel.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;crashed&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;with a threadpool of 4 on a machine with 2 HT CPUS&lt;br /&gt;&lt;code&gt;time ./smallpt 8&lt;br /&gt;Submitting (8 spp) 100.00&lt;br /&gt;1106.38 user 369.83 system 15:47.15 elapsed 155% CPU&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This used more CPU time but the running time was much the same. All the SMP gain is used up by the overhead.&lt;br /&gt;&lt;br /&gt;I manually inlined the function calls - getting rid of the Vec methods&lt;br /&gt;&lt;code&gt;% time ./smallpt.un 8&lt;br /&gt;Rendering (8 spp) 100.00&lt;br /&gt;273.82 user 5.62 system 4:40.05 elapsed 99% CPU&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;shit, now I fixed it it is 4x slower !&lt;br /&gt;&lt;br /&gt;One interesting question I have is, do Go routines without a CPU operate in non pre-empting co-op mode like Limbo? So if I spawn my Go routine to do slow I/O will it be interleaved or sit there doing nothing while the heavy CPU work co-ops ?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/go/smallpt_gr.go"&gt;Go Routined&lt;/a&gt; version&lt;br /&gt;&lt;code&gt;time ./smallpt_gr.go 8&lt;br /&gt;1012.35 user 454.21 system 16:21.66 elapsed 149% CPU&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/go/vector.go"&gt;Libbed out vector&lt;/a&gt; you'll need&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4104436204841234822?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4104436204841234822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4104436204841234822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4104436204841234822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4104436204841234822'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/03/go-slow.html' title='Go Slow'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2797833496751356666</id><published>2010-03-04T10:54:00.003Z</published><updated>2010-03-04T11:16:35.529Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>My arenas are too big</title><content type='html'>I thought having 4gb arenas would be a good match for dumping to DVD but it's not because you have to read the arenas out in one go, there's no  offsetting and although arenas only grow, the daily gpg encrypted version of the unsealed areana has different output depending on the length as well as the contents. Offsite copying is also maximized in this manner.&lt;br /&gt;&lt;br /&gt;The ideal solution is to match the arena size to the daily growth and adjust when adding new arenas. I've not added new arenas to my venti yet so maybe there's even a way of automating it.&lt;br /&gt;&lt;br /&gt;I'm going to go for 200Mb arenas. Gpg manages some compression so we might get 4 arenas on a CD or 25 on a DVD.&lt;br /&gt;&lt;br /&gt;So apart from the occasional massive burst of Gb files, the daily "email &amp; logs" reports will be maxed out at 200Mb instead of the just under 1.2Gb I've got atm. Uploading that offsite is just too much.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2797833496751356666?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2797833496751356666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2797833496751356666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2797833496751356666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2797833496751356666'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/03/my-arenas-are-too-big.html' title='My arenas are too big'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3793391196441137040</id><published>2010-02-27T15:02:00.007Z</published><updated>2010-02-27T18:26:36.081Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='udp'/><category scheme='http://www.blogger.com/atom/ns#' term='udp broadcast'/><category scheme='http://www.blogger.com/atom/ns#' term='broadcast'/><title type='text'>UDP broadcast</title><content type='html'>I found the UDP listener &lt;a href="http://www.abc.se/~m6695/udp.html"&gt;here&lt;/a&gt;. He calls it a server but in my context it is what it is, a listener. I'm sure &lt;a href="mailto:gunnar.gunnarsson@abc.se"&gt;Gunnar Gunnarsson&lt;/a&gt; won't mind me adapting it. &lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.maht0x0r.net/udp/listener.c"&gt;listener&lt;/a&gt; spits out "IP\tmessage\n". It gets the messages from a the &lt;a href="http://www.maht0x0r.net/udp/caster.c"&gt;broadcaster&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What happens next is up to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3793391196441137040?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3793391196441137040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3793391196441137040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3793391196441137040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3793391196441137040'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/02/udp-broadcast.html' title='UDP broadcast'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2320062907123929090</id><published>2010-02-16T13:02:00.003Z</published><updated>2010-02-16T16:43:31.027Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='videowall'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mplayer video wall</title><content type='html'>I found a mplayer syncing patch which will be amazing if it works!&lt;br /&gt;&lt;br /&gt;http://persephone.cps.unizar.es/~spd/cmplayer/&lt;br /&gt;&lt;br /&gt;If it works I'll look into the code and see how it applies to more recent versions, there's not much, it only patches these files (though the patch file is 5k)&lt;br /&gt;        Makefile&lt;br /&gt;        mplayer.c&lt;br /&gt;        parser-mpcmd.c&lt;br /&gt;&lt;br /&gt;It worked fine against &lt;a href="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2"&gt;rc2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With this configure&lt;br /&gt;&lt;code&gt;./configure --enable-largefiles --enable-menu&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;but fails when I use checkout by date on the next version&lt;br /&gt;(cave-mplayer source code (v. 0.3) for MPlayer SVN (Fri Jun 13 2008))&lt;br /&gt;&lt;br /&gt;With this configure&lt;br /&gt;&lt;code&gt;./configure --enable-menu&lt;/code&gt;&lt;br /&gt;&lt;code&gt;% svn checkout -r {2008-06-13} svn://svn.mplayerhq.hu/mplayer/trunk mplayer&lt;br /&gt;% gzip -dc cave-mplayer-0.3.1.tgz | tar  xvf -&lt;br /&gt;% cd mplayer&lt;br /&gt;% patch &lt; cave-mplayer/cave-mplayer.patch&lt;/code&gt; worked a treat&lt;br /&gt;&lt;code&gt;% make&lt;br /&gt;... snip&lt;br /&gt;In file included from ./libavutil/avutil.h:76,&lt;br /&gt;                 from ./libswscale/swscale.h:30,&lt;br /&gt;                 from libvo/vo_yuv4mpeg.c:43:&lt;br /&gt;./libavutil/pixfmt.h:32:32: error: libavutil/avconfig.h: No such file or directory&lt;br /&gt;&lt;br /&gt;and I can't fix the bleeder. So I'm going to try newer / older dates randomly !&lt;br /&gt;&lt;br /&gt;13 July 2008 also broken&lt;br /&gt;Jan 01 2009 also broken, same shit&lt;br /&gt;Trying Jan 01 2010 to see if  Diego's patch from 19th Jan is the only fix. Yep same shit.&lt;br /&gt;Fuck me these people can't even keep a build working!&lt;br /&gt;&lt;br /&gt;I tried to fix it but was falling down a big hole with glass on the sides&lt;br /&gt;&lt;br /&gt;rc2 it is&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2320062907123929090?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2320062907123929090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2320062907123929090' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2320062907123929090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2320062907123929090'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/02/mplayer-video-wall.html' title='Mplayer video wall'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1803963148424520952</id><published>2010-02-14T15:22:00.008Z</published><updated>2010-02-14T20:29:06.884Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='leopard'/><category scheme='http://www.blogger.com/atom/ns#' term='finalcut'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='compressor'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Installing OSX Leopard again</title><content type='html'>Last time I tried to install Leopard I found some version clashes with Final Cut &amp; Compressor - namely PPC compressor doesn't work and one needs Universal Compressor (according to some forums). After the heartache of DVD authoring not working I shall try again.&lt;br /&gt;&lt;br /&gt;Step 1.&lt;br /&gt;Install Leopard from DVD&lt;br /&gt;&lt;br /&gt;Great start, it's kept the volume name. Scratch01 isn't too great! See you in Calculating... minutes (it said 1 hour, turned out to be 20 mins).&lt;br /&gt;&lt;br /&gt;Installed the optional dev tools, X11, gcc et al.&lt;br /&gt;&lt;br /&gt;Upon reboot it asked me to fix quartermaster's permissions, it didn't complain on the next reboot&lt;br /&gt;&lt;br /&gt;Installed Final Cut Pro Upgrade, including LiveType and Comrpessor&lt;br /&gt;&lt;br /&gt;Comrpessor still doesn't work - no suprise there, but now I discover we don't even have iDvd&lt;br /&gt;&lt;br /&gt;Downloaded Pacifist from http://www.charlessoft.com/  to look for packages I've missed&lt;br /&gt;DVD Studio doesn't install from the DVD Studio Content disk even though it's universal, FCP refuses because it's a set of Intel disks, agghhh, someone's snaffled our Universal!&lt;br /&gt;&lt;br /&gt;It needs DSPGroup, XSKey, SharedComponents, ProCoreA, ProRuntime&lt;br /&gt;&lt;br /&gt;And, of course, a valid serial number.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1803963148424520952?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1803963148424520952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1803963148424520952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1803963148424520952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1803963148424520952'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/02/installing-osx-leopard-again.html' title='Installing OSX Leopard again'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1501566247395687714</id><published>2010-02-07T14:30:00.002Z</published><updated>2010-02-07T15:41:00.171Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='apt'/><category scheme='http://www.blogger.com/atom/ns#' term='eeepc'/><title type='text'>EeePC Repositories</title><content type='html'>So I can keep track between wipes&lt;br /&gt;see also&lt;br /&gt;http://wiki.eeeuser.com/addingxandrosrepos&lt;br /&gt;&lt;br /&gt;deb http://update.eeepc.asus.com/1.6 common main&lt;br /&gt;deb http://update.eeepc.asus.com/1.6 p901 main&lt;br /&gt;deb http://update.eeepc.asus.com/1.6 en main&lt;br /&gt;&lt;br /&gt;# Original Asus 701 repos, do not change the reference to the 701!&lt;br /&gt;deb http://update.eeepc.asus.com/p701/ p701 main&lt;br /&gt;deb http://update.eeepc.asus.com/p701/en/ p701 main&lt;br /&gt;&lt;br /&gt;# Community repos, good for conky. Do not change the reference to the 701&lt;br /&gt;deb http://download.tuxfamily.org/eeepcrepos/ p701 main etch&lt;br /&gt;&lt;br /&gt;# Xandros repos&lt;br /&gt;deb http://xnv4.xandros.com/xs2.0/upkg-srv2/ etch main contrib non-free&lt;br /&gt;deb http://www.geekconnection.org/ xandros4 main&lt;br /&gt;deb http://xnv4.xandros.com/4.0/pkg/ xandros4.0-xn main contrib non-free&lt;br /&gt;&lt;br /&gt;# XEPC repo, specifically compiled for the eee!&lt;br /&gt;deb http://updates.xepc.org/ p701 main&lt;br /&gt;# XEPC alternative repo, if main repo down&lt;br /&gt;# deb http://download.tuxfamily.org/xepcrepo/ p701 main&lt;br /&gt;&lt;br /&gt;# Debian repos now listed as etch and oldstable which are both currently identic&lt;br /&gt;al. &lt;br /&gt;deb http://www.debian-multimedia.org/ oldstable main &lt;br /&gt;deb ftp://ftp.uk.debian.org/debian/ etch main contrib non-free&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;after an apt-get update&lt;br /&gt;&lt;br /&gt;apt-get install xandros-archive-keyring&lt;br /&gt;&lt;br /&gt;I'm doing an apt-get upgrade, and it's going to take an hour. I might be headed for Wipeout!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1501566247395687714?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1501566247395687714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1501566247395687714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1501566247395687714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1501566247395687714'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/02/eeepc-repositories.html' title='EeePC Repositories'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7791299100181409567</id><published>2010-02-07T14:27:00.002Z</published><updated>2010-02-07T14:53:08.791Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='drawterm'/><title type='text'>compiling drawterm</title><content type='html'>Debian packages required :&lt;br /&gt;&lt;code&gt;% sudo apt-get install build-essential libx11-dev libxt-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;libx11-dev gets you X11/Xlib.h and friends&lt;br /&gt;libxt-dev gets you X11/IntrinsicP.h and co&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7791299100181409567?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7791299100181409567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7791299100181409567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7791299100181409567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7791299100181409567'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/02/compiling-drawterm.html' title='compiling drawterm'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1285661135990777074</id><published>2010-02-06T20:44:00.003Z</published><updated>2010-02-09T19:53:12.634Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='inferno'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>Venti a plenti</title><content type='html'>I had to put a few small things in place before it would work.&lt;br /&gt;&lt;br /&gt;First off is a script to run, this must live somewhere Inferno can find, I used &lt;code&gt;% cat /usr/maht/backup&lt;br /&gt;bind '#Uc:' /n/local&lt;br /&gt;vacput -a tcp!10.0.0.1!17034 '/n/local/Documents and Settings/maht/My Documents' &gt;&gt; /usr/maht/my.documents.vac&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;When you run that and try and unvac it on Lunix first time you'll have some fun because 'My Documents' is dr-xr-x-- so it creates the directory and then sigfaults because it can;t write into it!&lt;br /&gt;&lt;br /&gt;So I had to run Inferno and&lt;code&gt;chmod 775 '/n/local/Documents and Settings/maht/My Documents/' &lt;br /&gt;chmod 775 '/n/local/Documents and Settings/maht/My Documents/My Pictures' &lt;br /&gt;chmod 775 '/n/local/Documents and Settings/maht/My Documents/My Music' &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Next job is to make a Scheduled Task. I did it as Administrator but gave it the credentials of a normal user.&lt;br /&gt;&lt;br /&gt;It's effectively a shortcut with the command line "C:\inferno\Nt\386\bin\emu.exe /dis/sh.dis /usr/maht/backup"&lt;br /&gt;&lt;br /&gt;I don't know how fast it's copying, hopefully I'll be able to work it out after it's finished running tonight.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1285661135990777074?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1285661135990777074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1285661135990777074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1285661135990777074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1285661135990777074'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/02/venti-plenti.html' title='Venti a plenti'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1753184781565728455</id><published>2010-01-27T16:51:00.006Z</published><updated>2010-01-27T21:49:37.465Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='p9p'/><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>Venti on Linux via p9p</title><content type='html'>The plan is to backup arenas to DVD&lt;br /&gt;DVD-Rs store 4707319808 bytes&lt;br /&gt;Four arenas should be enough to start with&lt;br /&gt;&lt;br /&gt;(when I posted this mycrotiv shoed me his &lt;a href="http://sphericalharmony.com/plan9/makeventi"&gt;venti setup script&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% echo '4 * 4707319808 / 1024' | hoc&lt;br /&gt;18387968&lt;br /&gt;% time dd if=/dev/zero of=arenas bs=1024 count=18387968 # stupid linux dd and its =&lt;br /&gt;real    14m0.207s&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://swtch.com/plan9port/man/man8/venti.html"&gt;venti(8)&lt;/a&gt; recommends an index size that is 5% of the active data log.&lt;br /&gt;&lt;br /&gt;It doesn't describe the difference between the active data log and any other sort so I'll assume 5% of the arena size which in this case is &lt;br /&gt;&lt;code&gt;% echo '0.05 * 4 * 4707319808 / 1024' | hoc&lt;br /&gt;919398.4&lt;br /&gt;% dd if=/dev/zero of=isect bs=1024 count=919399&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Seeing as I'm using it for backup all sorts of shizzle, I'm going to include the bloom filter.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;The bloom filter thus has two parameters: nhash (maximum 32) and the total bitmap size (maximum 512MB, 232 bits). nhash × nblock &lt;= 0.7 × b, where nblock is the expected number of blocks stored on the server and b is the bitmap size in bits.&lt;/i&gt;&lt;br /&gt;&lt;code&gt;b = 232, nash = 32 &lt;br /&gt;32 × nblock &lt;= 0.7 × 232&lt;br /&gt;nblock &lt;= 0.7 × 232 / 32&lt;br /&gt;nblock &lt;= 5.075&lt;/code&gt;&lt;br /&gt;so I guess nblock = 5, anyway says the maximum size is 512Mb&lt;br /&gt;&lt;code&gt;% echo '512 * 1024' | hoc&lt;br /&gt;524288&lt;br /&gt;% dd if=/dev/zero of=bloom bs=1024 count=524288&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That's the storage reserved now for formatting&lt;br /&gt;&lt;br /&gt;I'm going to round down the actual arena size a bit&lt;br /&gt;&lt;code&gt;% time venti/fmtareanas -a 4705000000 -Z arenas0. /home/venti/arenas # I dd'd in zero&lt;br /&gt;fmtarenas /home/venti/arenas: 5 arenas, 18,828,484,608 bytes storage, 524,288 bytes for index map&lt;br /&gt;real    0m1.312s&lt;br /&gt;% time venti/fmtisect -Z isect0. /home/venti/isect&lt;br /&gt;fmtisect /home/venti/isect: 114,827 buckets of 215 entries, 524,288 bytes for index map&lt;br /&gt;real    0m0.513s&lt;br /&gt;% time venti/fmtbloom -N 32 /home/venti/bloom&lt;br /&gt;fmtbloom: using 512MB, 32 hashes/score, best up to 95,443,717 blocks&lt;br /&gt;real    0m26.742s&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Ok that looks like the formatting is done, set up venti.conf&lt;br /&gt;&lt;code&gt;% cat venti.conf&lt;br /&gt;index main&lt;br /&gt;isect /home/venti/isect&lt;br /&gt;arenas /home/venti/arenas&lt;br /&gt;bloom /home/venti/bloom&lt;br /&gt;httpdaddr tcp!127.0.0.1!808&lt;br /&gt;% time /usr/local/plan9/bin/venti/fmtindex venti.conf&lt;br /&gt;fmtindex: 5 arenas, 114,827 index buckets, 18,828,402,688 bytes storage&lt;br /&gt;real    0m0.483s&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;hmm, ok , lets run this sucker&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% /usr/local/plan9/bin/venti/venti&lt;br /&gt;2010/0127 21:12:22 venti: conf...httpd tcp!127.0.0.1!808...init...icache 0 bytes = 1,000 entries; 4 scache&lt;br /&gt;sync...announce tcp!*!venti...serving.&lt;br /&gt;% wget -q -O - http://127.0.0.1:808/storage&lt;br /&gt;index=main&lt;br /&gt;total arenas=5 active=0&lt;br /&gt;total space=18,828,402,688 used=0&lt;br /&gt;clumps=0 compressed clumps=0 data=0 compressed data=0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;as usual, despressingly straight forward, I didn't even need a loopback&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1753184781565728455?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1753184781565728455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1753184781565728455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1753184781565728455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1753184781565728455'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/01/venti-on-linux-via-p9p.html' title='Venti on Linux via p9p'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8458274519476101441</id><published>2010-01-08T17:24:00.012Z</published><updated>2010-01-12T20:38:42.329Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>Restoring Venti from dumped arenas using Qemu</title><content type='html'>I've been using &lt;a href="http://plan9.bell-labs.com/sources/contrib/maht/rc/vbackup"&gt;this script&lt;/a&gt; to dump my venti arenas from my laptop to RAID.&lt;br /&gt;&lt;br /&gt;When I'm on the LAN I run this by hand as bootes&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#!/bin/rc&lt;br /&gt;test -e /n/daph/home || 9fs daph&lt;br /&gt;bk = /n/daph/home/bootes/t23/arenas&lt;br /&gt;if(! test -e $bk)&lt;br /&gt; mkdir -p $bk&lt;br /&gt;if(! test -e $bk)&lt;br /&gt; status = $mk ^missing &amp;&amp; exit&lt;br /&gt;/usr/maht/bin/rc/vbackup /dev/sdC0 $bk&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and I kept saying to myself - "I must do a test restore".&lt;br /&gt;&lt;br /&gt;Naturally fate intervened and my HD decided that I didn't want to read my isect partiton after all and my hand was forced.&lt;br /&gt;&lt;br /&gt;So after a couple of false starts trying to do it with the bootable CD I fired up Qemu with a blank 3G image - my arenas are 1.6Gb - bit of headroom, and installed fossil+venti.&lt;br /&gt;&lt;br /&gt;I turned it into a cpu/auth with &lt;a href="http://plan9.bell-labs.com/sources/contrib/maht/rc/make_cpuauth"&gt;my script&lt;/a&gt; to make logging into it a bit easier&lt;br /&gt;&lt;br /&gt;and then as bootes &lt;code&gt; &lt;br /&gt;% 9fs daph; cd /n/daph/arenas/&lt;br /&gt;% venti/wrarena sdC0.arenas00&lt;br /&gt;% venti/wrarena sdC0.arenas01&lt;br /&gt;% time venti/wrarena sdC0.arenas02&lt;br /&gt;1.67u 46.65s 496.71r  &lt;br /&gt;% ls -l sdC0.arenas02&lt;br /&gt;--rw-rw-rw- M 85 bootes bootes 536870912 Dec 16 06:46 sdC0.arenas02&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;which seems easy enough, 1Mb sec&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;boot the laptop from the CDrom, edit plan9.ini to use my qemu is its venti (using -redir tcp:17034::17034 &lt;br /&gt;&lt;br /&gt;had to add &lt;code&gt;&lt;br /&gt;venti=/dev/sdC0/arenas tcp!*!17034&lt;/code&gt;&lt;br /&gt; to qemu's plan9.ini&lt;br /&gt;&lt;br /&gt;balls the qemu is sending a reset instead of data - I think there's a problem in there somewhere after a few different tries, fossil/flfmt dies when using my qemu venti as a host too&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;OK so with the Venti install I added a new disk - recover&lt;br /&gt;&lt;br /&gt;My invocation for qemu venti now looks like this :&lt;br /&gt;&lt;code&gt;qemu.exe -L . -m 1024 -hda venti -hdb recover -localtime -M pc -redir tcp:3131::3131  -vnc :8 -snapshot -redir tcp:5356::5356 -redir tcp:17010::17010 -redir tcp:567::567 -redir tcp:17007::17007 -redir tcp:17034::17034&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;to get my data I did this as bootes&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;disk/mbr -m /386/mbr /dev/sdC1/data&lt;br /&gt;disk/fdisk -baw /dev/sdC1/data&lt;br /&gt;disk/prep -bw -a fossil /dev/sdC1/plan9&lt;br /&gt;fossil/flfmt -v 22d...ff3 /dev/sdC1/fossil   # 22d...ff3 is the score from fossil/last&lt;br /&gt;fossil/conf -w /dev/sdC1/fossil &amp;lt;&amp;lt;EOF&lt;br /&gt;fsys main config /dev/sdC1/fossil&lt;br /&gt;fsys main open -AWP&lt;br /&gt;fsys main&lt;br /&gt;srv -p ricons&lt;br /&gt;srv rico&lt;br /&gt;EOF&lt;br /&gt;fossil/fossil -f /dev/sdC1/fossil&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;drawtermed in again as me&lt;br /&gt;&lt;code&gt;mount /srv/rico /n/rico&lt;br /&gt;cd /n/rico/usr/maht&lt;br /&gt;tar cp . &amp;gt; /n/daph/home/maht/plan9_usr_maht.tar&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You beauty!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8458274519476101441?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8458274519476101441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8458274519476101441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8458274519476101441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8458274519476101441'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2010/01/restoring-venti-from-dumped-arenas.html' title='Restoring Venti from dumped arenas using Qemu'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2361033796826916098</id><published>2009-12-09T14:34:00.003Z</published><updated>2009-12-09T14:39:31.767Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='nroff'/><category scheme='http://www.blogger.com/atom/ns#' term='acme'/><title type='text'>Acme tag for when editing man pages</title><content type='html'>I've been writing more man pages recently that aren't in the usual Manpath and instead of building a new plumbing rule I made a tag&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% cat /acme/bin/Man&lt;br /&gt;#!/bin/rc&lt;br /&gt;&lt;br /&gt;if(~ $#* 0) {&lt;br /&gt;    tags=`{cat /mnt/acme/$winid/tag}&lt;br /&gt;    f = $tags(1)&lt;br /&gt;}&lt;br /&gt;if not&lt;br /&gt;    f = $1&lt;br /&gt;&lt;br /&gt;nroff -man $f&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2361033796826916098?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2361033796826916098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2361033796826916098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2361033796826916098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2361033796826916098'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/12/acme-tag-for-when-editing-man-pages.html' title='Acme tag for when editing man pages'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2653837888877428886</id><published>2009-12-08T13:07:00.003Z</published><updated>2009-12-08T13:16:05.796Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='rc'/><title type='text'>cd with cd - feature</title><content type='html'>On Lunix cd as an extra feature namely cd -&lt;br /&gt;which takes you to the previous directory&lt;br /&gt;&lt;br /&gt;I've got quite into this as I jump about, freebsd had pushcd and popcd which was also fun.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;fn cd {&lt;br /&gt; cdnextlastdir = `{pwd}&lt;br /&gt; {&lt;br /&gt;  if(~ $#* 0)&lt;br /&gt;   builtin cd&lt;br /&gt;  if not if(~ $1 -)&lt;br /&gt;    builtin cd $cdlastdir&lt;br /&gt;   if not&lt;br /&gt;    builtin cd $1&lt;br /&gt; } &amp;&amp; cdlastdir = $cdnextlastdir&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I've got it in lib/profile&lt;br /&gt;&lt;br /&gt;EXAMPLE&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;t23% cd&lt;br /&gt;t23% pwd&lt;br /&gt;/usr/maht&lt;br /&gt;t23% cd /&lt;br /&gt;t23% pwd&lt;br /&gt;/&lt;br /&gt;t23% cd -&lt;br /&gt;t23% pwd&lt;br /&gt;/usr/maht&lt;br /&gt;t23% cd ouihouihiuh&lt;br /&gt;Can't cd ouihouihiuh: 'ouihouihiuh' file does not exist&lt;br /&gt;t23% cd -&lt;br /&gt;t23% pwd&lt;br /&gt;/&lt;br /&gt;t23% cd -&lt;br /&gt;t23% pwd&lt;br /&gt;/usr/maht&lt;br /&gt;t23% &lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2653837888877428886?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2653837888877428886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2653837888877428886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2653837888877428886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2653837888877428886'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/12/cd-with-cd-feature.html' title='cd with cd - feature'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-850366180227733363</id><published>2009-12-06T13:43:00.004Z</published><updated>2009-12-06T13:55:34.942Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='4th-compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>4th-compiler error reporting</title><content type='html'>Compiling; Word 444: Undefined name&lt;br /&gt;&lt;br /&gt;is a bogus error message. The only way to match that word number is to compile the code !!&lt;br /&gt;So I edited the compiler :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;4th-3.5d3-unix/sources/comp_4th.c:/^Object-&gt;ErrNo = M4NONAME;/&lt;br /&gt;s/$/printf("WORD %s", p);/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;so it spits out the duff word&lt;br /&gt;&lt;code&gt;Compiling; Word 444: Undefined name&lt;br /&gt;WORD dup4&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;which I suppose is ok for a start but I can do better than that but let's not get sidetracked&lt;br /&gt;&lt;br /&gt;as an aside, programming in Lunix code is like going back in time. I mean FILE* !! gimme a break.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-850366180227733363?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/850366180227733363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=850366180227733363' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/850366180227733363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/850366180227733363'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/12/4th-compiler-error-reporting.html' title='4th-compiler error reporting'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8507684286379153080</id><published>2009-12-04T22:02:00.003Z</published><updated>2009-12-04T22:50:03.431Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='4th-compiler'/><title type='text'>4th-compiler word list</title><content type='html'>comp_4th.c &amp; exec_4th.c &lt;br /&gt;is where the action happens&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8507684286379153080?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8507684286379153080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8507684286379153080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8507684286379153080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8507684286379153080'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/12/4th-compiler-word-list.html' title='4th-compiler word list'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3150049003919393608</id><published>2009-12-04T00:25:00.004Z</published><updated>2009-12-04T22:02:31.924Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dial'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='draw'/><category scheme='http://www.blogger.com/atom/ns#' term='4th-compiler'/><title type='text'>4th-compiler opening plan9 devices</title><content type='html'>This didn't work, no surprise.&lt;br /&gt;Refill introduces an integer.&lt;br /&gt;and USE nuked the stack, so I'm investigating that&lt;br /&gt;&lt;br /&gt;First is dial&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/library/computing/4th/dial-minimalcomments.4th"&gt;With minimal comments&lt;/a&gt;. I stripped my notes out to see how terse it is without them.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/library/computing/4th/dial.4th"&gt;With comments&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Dial looks ready to test tomorrow so lets hope this post doesn;t last long.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And I also started &lt;a href="http://www.maht0x0r.net/library/computing/4th/draw.4th"&gt;draw&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3150049003919393608?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3150049003919393608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3150049003919393608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3150049003919393608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3150049003919393608'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/12/4th-compiler-opening-plan9-devices.html' title='4th-compiler opening plan9 devices'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-6385343803642130920</id><published>2009-11-30T18:32:00.002Z</published><updated>2009-11-30T18:43:49.201Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='isattymustdie'/><category scheme='http://www.blogger.com/atom/ns#' term='4th'/><title type='text'>4th isatty</title><content type='html'>Just encountered my first isatty annoyance. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% cat t&lt;br /&gt;6 string buff&lt;br /&gt;buff 5 accept . buff count type cr&lt;br /&gt;buff 5 accept . buff count type cr&lt;br /&gt;% echo ABCDEFabcdef | 4th cqx t&lt;br /&gt;5 ABCDEF&lt;br /&gt;-1&lt;br /&gt;% # wtf?&lt;br /&gt;% cat s&lt;br /&gt;s" /fd/0" input open error? abort" no stdin!"&lt;br /&gt;to fd0&lt;br /&gt;fd0 use&lt;br /&gt;6 string buff&lt;br /&gt;buff 5 accept . buff count type cr&lt;br /&gt;buff 5 accept . buff count type cr&lt;br /&gt;% echo ABCDEFabcdef | 4th cqx s&lt;br /&gt;5 ABCDEF&lt;br /&gt;5 abcdef&lt;br /&gt;% # more like it&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-6385343803642130920?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/6385343803642130920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=6385343803642130920' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6385343803642130920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6385343803642130920'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/11/4th-isatty.html' title='4th isatty'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1416026492602494908</id><published>2009-11-30T15:49:00.002Z</published><updated>2009-11-30T15:55:39.622Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Limbo'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='4th-compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='4th'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='acme'/><title type='text'>Acme helpers</title><content type='html'>&lt;a href="http://plan9.bell-labs.com/sources/contrib/maht/acme/bin/"&gt;4t, C, Limbo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Tags for compiling the current window in the appropriate language&lt;br /&gt;&lt;br /&gt;4t is 4th, capital 4 was a bit tricky&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1416026492602494908?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1416026492602494908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1416026492602494908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1416026492602494908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1416026492602494908'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/11/acme-helpers.html' title='Acme helpers'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-427174761880364130</id><published>2009-11-25T13:23:00.003Z</published><updated>2009-11-25T17:35:30.876Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='FreeBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>FreeBSD Qemu Apache 1.3</title><content type='html'>I need to keep a legacy web server running. Got to Linux and there's no Apache 1.3.x in the Debian package manager. I want to replicate what I have on FreeBSD so .....&lt;br /&gt;&lt;br /&gt;FreeBSD with ports installed on Qemu [x] easy. - backup your qimage as you go :)&lt;br /&gt;&lt;br /&gt;in root's .cshrc &lt;br /&gt;&lt;code&gt;# setenv PACKAGESITE ftp://ftp.uk.freebsd.org/pub/FreeBSD/ports/packages/All/&lt;br /&gt;# pkg_add -r apache-1.3.41_1&lt;br /&gt;# cat &gt;&gt; /etc/rc.conf&lt;br /&gt;apache_enable="YES"&lt;br /&gt;^D&lt;br /&gt;# echo 127.0.0.1  `hostname` &gt;&gt; /etc/hosts&lt;/code&gt;&lt;br /&gt;This doesn't work :&lt;br /&gt;&lt;code&gt;# cd /usr/ports/lang/php4; make install&lt;/code&gt;&lt;br /&gt;because strstr is checked using SIGALARM and that locks up QEMU!&lt;br /&gt;&lt;code&gt;# pkg_add -r php4-4.4.9&lt;/code&gt;&lt;br /&gt;Doesn't add mod_php4 or these modules :&lt;code&gt;&lt;br /&gt;# pkg_add -r php4-pcre-4.4.9&lt;br /&gt;# pkg_add -r php4-pgsql-4.4.9_1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So a bit of bodging is required&lt;br /&gt;&lt;code&gt;# cd /usr/local/libexec/apache&lt;br /&gt;# scp maht@steponnopets.net:/usr/local/libexec/apache/libphp4.so .&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and the other Apache modules I need&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# pkg_add -r mod_gzip-1.3.26.1a&lt;br /&gt;# pkg_add -r mod_auth_pgsql-0.9.12_4&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;et viola, index.php is excecuted&lt;br /&gt;&lt;br /&gt;I copied the confs from steponnopets&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-427174761880364130?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/427174761880364130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=427174761880364130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/427174761880364130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/427174761880364130'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/11/freebsd-qemu-apache-13.html' title='FreeBSD Qemu Apache 1.3'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-825144976519622252</id><published>2009-11-20T16:02:00.002Z</published><updated>2010-01-01T11:42:45.001Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='avr'/><title type='text'>AVR assembler</title><content type='html'>I've been working on some rc code to spit out the mnemonics used in AVR Studio. My intention was to use RC as a smarter pre-processor than the #define and .macro directives included therein.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.maht0x0r.net/library/computing/avr/til/"&gt;http://www.maht0x0r.net/library/computing/avr/til/&lt;/a&gt; is where I'm at.&lt;br /&gt;&lt;br /&gt;I've not included a way to map names onto registers yet, which I'll have to do next.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-825144976519622252?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/825144976519622252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=825144976519622252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/825144976519622252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/825144976519622252'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/11/avr-assembler.html' title='AVR assembler'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1486163861124052446</id><published>2009-09-30T12:09:00.002+01:00</published><updated>2009-09-30T13:36:44.567+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pxe'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><title type='text'>PXE booting QEMU in Debian</title><content type='html'>The PXE booting in Debian QEMU is broken&lt;br /&gt;&lt;br /&gt;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=412010&lt;br /&gt;&lt;br /&gt;You need the pxe-* files from http://trac.kju-app.org/browser/trunk/qemu/qemu/pc-bios?rev=106&lt;br /&gt;&lt;br /&gt;and put them in /usr/share/qemu&lt;br /&gt;&lt;br /&gt;That's all well and good but it uses QEMU's DHCP values for the TFTP server etc. so you need *another* qemu running as the TFTP server and that's not what I want.&lt;br /&gt;&lt;br /&gt;So, next step is trying gpxe, so it's off to http://rom-o-matic.net/gpxe/ and got the all-drivers version.&lt;br /&gt;&lt;br /&gt;Dammit, I can get 9pxeload working but not bootp so I get boot from ether0 but it can't see 10.0.0.9 from 10.0.2.2&lt;br /&gt;&lt;br /&gt;bah&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1486163861124052446?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1486163861124052446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1486163861124052446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1486163861124052446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1486163861124052446'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/09/pxe-booting-qemu-in-debian.html' title='PXE booting QEMU in Debian'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-447014672476805382</id><published>2009-09-21T15:44:00.004+01:00</published><updated>2009-09-21T17:02:37.531+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><category scheme='http://www.blogger.com/atom/ns#' term='markdown'/><title type='text'>markdown to pdf</title><content type='html'>&lt;a href="http://johnmacfarlane.net/pandoc/"&gt;pandoc&lt;/a&gt; seems interesting. The debian package didn't satisfy its dependencies though.&lt;br /&gt;&lt;br /&gt;first up is texlive-latex-base, only 138Mb!&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% markdown2pdfrkdown2pdf ./werc.cat-v.org/docs/web_server_setup/lighttpd.md&lt;br /&gt;markdown2pdf: pdfLaTeX failed with error code 1&lt;br /&gt;markdown2pdf: error context:&lt;br /&gt;! LaTeX Error: File `ucs.sty' not found.&lt;br /&gt;&lt;br /&gt;! Emergency stop.&lt;br /&gt;&lt;read *&gt; &lt;br /&gt;         &lt;br /&gt;!  ==&gt; Fatal error occurred, no output PDF file produced!&lt;br /&gt;markdown2pdf: Please install the 'unicode' package from CTAN:&lt;br /&gt;  http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;ffs, thats no help, check the page out, it assumes one knows what's going on.&lt;br /&gt;&lt;br /&gt;ok, on to htmldoc&lt;br /&gt;&lt;br /&gt;sigh, another program that ignores pipes by default HELLO THIS IS UNIX&lt;br /&gt;&lt;br /&gt;&lt;code&gt;markdown.pl ./werc.cat-v.org/docs/web_server_setup/lighttpd.md| htmldoc --book --footer . -f output.pdf -&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;works good enough, some font embedding issues but not fatal, though to get it in a pipeline you need to give it an output file with .pdf at the end, IDIOTS&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;markdown.pl $1 | htmldoc --book --footer . -f /tmp/md2pdf.$pid.pdf -&lt;br /&gt;cat /tmp/md2pdf.$pid.pdf&lt;br /&gt;rm -f /tmp/md2pdf.$pid.pdf&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-447014672476805382?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/447014672476805382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=447014672476805382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/447014672476805382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/447014672476805382'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/09/markdown-to-pdf.html' title='markdown to pdf'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8416433485650310617</id><published>2009-09-15T22:18:00.006+01:00</published><updated>2009-09-20T00:45:35.338+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='dnrd'/><category scheme='http://www.blogger.com/atom/ns#' term='dns'/><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><title type='text'>DNDR dns caching proxy</title><content type='html'>Although that sounds dangerously like a DNS server I just couldn't face bind/named.&lt;br /&gt;&lt;br /&gt;Curiously it's not an OpenBSD binary package, I wonder if there's a reason for that.&lt;br /&gt;&lt;br /&gt;http://sourceforge.net/projects/dnrd/&lt;br /&gt;untar it then&lt;br /&gt;&lt;code&gt; ./configure &amp;&amp; make &amp;&amp; make install&lt;br /&gt;adduser dnrd&lt;br /&gt;mkdir /usr/local/etc/dnrd&lt;br /&gt;mv /usr/local/share/man/man8/dnrd.8 /usr/share/man/man8/dnrd.8&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;It will proxy DNS from the IP you specifiy on the command line with -s (required) and also serve out entries on a hosts like file : /usr/local/etc/dnrd/master&lt;br /&gt;so for me it's&lt;br /&gt;&lt;code&gt;/usr/local/sbin/dnrd -b -s 85.189.102.5 -s 85.189.39.5&lt;/code&gt;&lt;br /&gt;The -b tells it to round robin the -s entries&lt;br /&gt;ooh why haven't I got round to doing it before, it's fabbo, another one to go in the box marked "essential".&lt;br /&gt;&lt;br /&gt;Curiously the master file is only used when -d [1-4] is specified (it doesn't daemonize)&lt;br /&gt;Then because loads of debug is spewing out I ended up installing rc-1.6-readline. I really need to get p9p sorted out.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;pkg_add ftp://ftp.plig.net/pub/OpenBSD/snapshots/packages/i386/rc-1.6-readline.tgz&lt;/code&gt;&lt;br /&gt; In the meantime at least I can write sane code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8416433485650310617?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8416433485650310617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8416433485650310617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8416433485650310617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8416433485650310617'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/09/dndr-dns-caching-proxy.html' title='DNDR dns caching proxy'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-832259517448453199</id><published>2009-09-13T10:47:00.005+01:00</published><updated>2009-09-14T10:12:02.956+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><category scheme='http://www.blogger.com/atom/ns#' term='syslog'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>OpenBSD firewall</title><content type='html'>Installed 4.6 on my EPIA 5000 fanless &amp; the HD I have in it is too noisy so I want to run it read only.&lt;br /&gt;I've already posted about &lt;a href="http://maht0x0r.blogspot.com/2009/08/das-brickenn-vas-goot.html"&gt;/etc/pf.conf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've enabled syslogd on momo to accept udp syslog posts (syslogd -u) which uses UDP 514&lt;br /&gt;&lt;br /&gt;Then in the firewall (goo) I've changed /etc/syslog.conf to send all syslog messages to @momo&lt;br /&gt;&lt;br /&gt;Easy peasy.&lt;br /&gt;&lt;br /&gt;Next is to mount the filesystems read only which I found &lt;a href="http://bsd.dischaos.com/2008/10/06/running-openbsd-in-read-only-mode/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;change fstab to something like this :&lt;br /&gt;&lt;code&gt;/dev/wd0a / ffs ro,noatime 1 1&lt;br /&gt;swap /tmp mfs rw,noatime,nodev,nosuid,-s=20000 0 0&lt;br /&gt;swap /var mfs rw,noatime,nodev,nosuid,-s=40000 0 0&lt;br /&gt;swap /dev mfs rw,noatime,nosuid,noexec,-s=20000 0 0&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;do this patch&lt;br /&gt;&lt;code&gt;cp /etc/rc /etc/rc.orig &amp;&amp; echo '/fastboot.*XXX&lt;br /&gt;a&lt;br /&gt;mtree -qdef /etc/mtree/4.4BSD.dist -p / -u&lt;br /&gt;cp /root/MAKEDEV /dev; cd /dev; sh MAKEDEV all&lt;br /&gt;.&lt;br /&gt;w&lt;br /&gt;q' | ed /etc/rc&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to make changes later &lt;br /&gt;&lt;code&gt;mount -u -o rw /&lt;/code&gt; unless, like me, your CF card reader has a RO jumper !! lucky me&lt;br /&gt;&lt;code&gt;mount -u -o ro /&lt;/code&gt; to make it ro again.&lt;br /&gt;I got rid of /usr/ports and ended up with about 500Mb of disk used, so I'm well under the 1Gb target. And I've got stuff on there from where I was putting Mercurial on.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Filesystem     Size    Used   Avail Capacity  Mounted on&lt;br /&gt;/dev/wd0a      158M   32.9M    117M    22%    /&lt;br /&gt;/dev/wd0g      3.5G    3.4M    3.3G     0%    /home&lt;br /&gt;/dev/wd0f      3.5G    490M    2.9G    14%    /usr&lt;br /&gt;mfs:30180      9.3M   37.0K    8.8M     0%    /dev&lt;br /&gt;mfs:17306      9.3M   21.0K    8.8M     0%    /tmp&lt;br /&gt;mfs:28721     18.8M    1.2M   16.7M     7%    /var&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-832259517448453199?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/832259517448453199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=832259517448453199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/832259517448453199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/832259517448453199'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/09/openbsd-firewall.html' title='OpenBSD firewall'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1471097760459228035</id><published>2009-08-31T13:19:00.002+01:00</published><updated>2009-09-21T16:54:44.850+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><title type='text'>mouting a cd in Plan 9</title><content type='html'>#!/bin/rc&lt;br /&gt;cdfs&lt;br /&gt;rm -f /srv/cd.d000&lt;br /&gt;9660srv -f /mnt/d000 cd.d000&lt;br /&gt;chmod +r /srv/cd.d000&lt;br /&gt;chmod +w /srv/cd.d000&lt;br /&gt;mount  /srv/cd.d000 /n/cd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1471097760459228035?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1471097760459228035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1471097760459228035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1471097760459228035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1471097760459228035'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/mouting-cd-in-plan-9.html' title='mouting a cd in Plan 9'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3830145919944538160</id><published>2009-08-31T00:08:00.002+01:00</published><updated>2009-09-21T16:55:11.996+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='inferno'/><title type='text'>Inferno on OpenBSD 4.6</title><content type='html'>got mercurial once I got the ports worked out.&lt;br /&gt;&lt;br /&gt;ack, all went horribly wrong, no X source, what a todoo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3830145919944538160?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3830145919944538160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3830145919944538160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3830145919944538160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3830145919944538160'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/inferno-on-openbsd-46.html' title='Inferno on OpenBSD 4.6'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4537055173047583820</id><published>2009-08-30T23:52:00.004+01:00</published><updated>2009-08-31T00:05:03.333+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='packages'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenBSD'/><title type='text'>OpenBSD 4.6 packages</title><content type='html'>It all started with &lt;br /&gt;&lt;code&gt;# cd /usr/ports/*/mercurial&lt;br /&gt;# make&lt;br /&gt;===&gt;  mercurial-1.3.1 depends on: python-&gt;=2.5,&lt;2.6 - not found&lt;br /&gt;===&gt;  Verifying install for python-&gt;=2.5,&lt;2.6 in lang/python/2.5&lt;br /&gt;===&gt;  python-2.5.4p2 uses X11, but /usr/X11R6 not found.&lt;br /&gt;===&gt; Returning to build of mercurial-1.3.1&lt;br /&gt;===&gt;  mercurial-1.3.1 depends on: python-&gt;=2.5,&lt;2.6 - not found&lt;br /&gt;===&gt;  Verifying install for python-&gt;=2.5,&lt;2.6 in lang/python/2.5&lt;br /&gt;===&gt;  python-2.5.4p2 uses X11, but /usr/X11R6 not found.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;er, wtf&lt;br /&gt;&lt;br /&gt;Seems the package system has &lt;a href="http://www.nabble.com/python-now-requires-X11-installed-td23510535.html"&gt;undergone some changes&lt;/a&gt; while I've been away.&lt;br /&gt;&lt;br /&gt;so the upshot is you need a PKG_PATH set and take binary installs. Ah, the Plan9 way comes to OpenBSD, well done Theo!&lt;br /&gt;&lt;br /&gt;The only problem is that you're left to your own devices to find a package store you can trust!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.openbsd.org/ftp.html"&gt;Does it really need so many mirrors&lt;/a&gt;. You'd have thought it would find one for you out of the box, perhaps it does, it's not like I've read any documentation.&lt;br /&gt;&lt;br /&gt;anyway ratfans, here's mine.&lt;br /&gt;&lt;br /&gt;PKG_PATH=ftp://ftp.plig.net/pub/OpenBSD/snapshots/packages/i386&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4537055173047583820?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4537055173047583820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4537055173047583820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4537055173047583820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4537055173047583820'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/openbsd-46-packages.html' title='OpenBSD 4.6 packages'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1897607133532697941</id><published>2009-08-27T13:54:00.003+01:00</published><updated>2009-08-27T14:07:08.450+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='srv'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh2'/><category scheme='http://www.blogger.com/atom/ns#' term='rc'/><category scheme='http://www.blogger.com/atom/ns#' term='tcpserver'/><title type='text'>Reverse shell with tcpserver</title><content type='html'>I've got an ssh server that is v2 only&lt;br /&gt;&lt;br /&gt;on it I run&lt;br /&gt;&lt;code&gt;ssh2srv % tcpserver -v  127.0.0.1 9999 srvrc&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;srvrc is&lt;br /&gt;&lt;code&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;/usr/local/plan9/bin/rc &lt;&gt;[2=1]&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;on a local Lunix box I run&lt;br /&gt;&lt;code&gt;ssh2client % ssh -N -L 192.168.9.2:5999:localhost:9999 ssh2only&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;then finally on plan9 I run&lt;br /&gt;&lt;code&gt;p9 % srv tcp!192.168.9.2!5999 rc&lt;br /&gt;p9 % con -C /srv/rc&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and I get&lt;br /&gt;&lt;br /&gt;&lt;code&gt;post...&lt;br /&gt;%&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and I have my prompt.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1897607133532697941?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1897607133532697941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1897607133532697941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1897607133532697941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1897607133532697941'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/reverse-shell-with-tcpserver.html' title='Reverse shell with tcpserver'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1135078553839833332</id><published>2009-08-27T12:36:00.001+01:00</published><updated>2010-01-01T11:39:53.990Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><title type='text'>Lunix is your dad.</title><content type='html'>"Unix never says please.'" said the cheese.&lt;br /&gt;&lt;br /&gt;Some Lunix apps bleat if you make some system files group writeable, some even refuse to run. They email me every week to let me know.&lt;br /&gt;&lt;br /&gt;These apps trust neither their ecosystem or their administrators.&lt;br /&gt;&lt;br /&gt;Now sit back and wait for "anatomy of my pwnage".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1135078553839833332?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1135078553839833332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1135078553839833332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1135078553839833332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1135078553839833332'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/lunix-is-your-dad.html' title='Lunix is your dad.'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-653061577306952401</id><published>2009-08-26T15:29:00.001+01:00</published><updated>2009-08-26T23:46:15.552+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>BASH CAN FUCK RIGHT OFF</title><content type='html'>When once more one is bitten by a=oh and a = oh being different it is time to stop pretending Bash is a usable product.&lt;br /&gt;&lt;br /&gt;That's without thinking abut the runtime penalty of all that shit like history and fucking command line completion that are there to defend you from your badly planned filesystem layout.&lt;br /&gt;&lt;br /&gt;A per computer view of the filesystem, shit, you may as well drop to single user.&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Even hours later my invective hasn't lessened. I've been using it all day. I say using, more like flinging faeces at the plexiglass through which no-one is looking.&lt;br /&gt;&lt;br /&gt;Always battling, never a joy.&lt;br /&gt;&lt;br /&gt;Emacs or vi is like Beatles or Rolling Stones ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-653061577306952401?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/653061577306952401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=653061577306952401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/653061577306952401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/653061577306952401'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/bash-can-fuck-right-off.html' title='BASH CAN FUCK RIGHT OFF'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8054422141609729109</id><published>2009-08-25T01:00:00.003+01:00</published><updated>2009-08-26T15:37:49.354+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='commandlinehistory'/><title type='text'>Plan9 Command Line History</title><content type='html'>or rather&lt;br /&gt;&lt;br /&gt;"If you would learn to think more clearly Mr. Edison, you wouldn't have to sweat so much"&lt;br /&gt;&lt;br /&gt;Command line history rewards sloppy preparation.&lt;br /&gt;&lt;br /&gt;fn f { echo do shit; whatis f }; f&lt;br /&gt;&lt;br /&gt;losers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8054422141609729109?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8054422141609729109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8054422141609729109' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8054422141609729109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8054422141609729109'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/plan9-command-line-history.html' title='Plan9 Command Line History'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-722353575604802634</id><published>2009-08-24T23:00:00.005+01:00</published><updated>2009-08-25T00:42:31.379+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='speedtouch'/><title type='text'>Alcatel / Thompson SpeedTouch 330 on OpenBSD</title><content type='html'>I've got the green one.&lt;br /&gt;&lt;br /&gt;The actual process was a damn sight easier than that blinking instructions suggested.&lt;br /&gt;&lt;br /&gt;Get yourself OpenBSD4.6 &amp; install it&lt;br /&gt;&lt;br /&gt;Get your source from http://speedtouch.sourceforge.net/&lt;br /&gt; I used vers 1.3.1 which hasn't seen an update for years which is good.&lt;br /&gt;&lt;br /&gt;The Thompson drivers have moved to http://www.thomson.net/GlobalEnglish/Deliver/In-Home-Digital-Distribution/Telco-ISP/dsl-modems-gateways/residential_wired/other_supported_products/thomson_st330/Pages/default.aspx&lt;br /&gt;&lt;br /&gt;Though I got mine pre-packaged from here&lt;br /&gt;http://speedtouch.hysplace.co.uk/latest/Kqd6_3.012&lt;br /&gt;&lt;br /&gt;I chopped all of the usb startup out of  speedtouch-start :&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# Goal: Start the connection&lt;br /&gt;&lt;br /&gt;# Ensure to have a working PATH&lt;br /&gt;export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"&lt;br /&gt;&lt;br /&gt;# check for root privileges&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# FIRMWARE_LOADER_FILE&lt;br /&gt;# FIRMWARE_FILE&lt;br /&gt;# PPPD_PEER&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;if [ -f /etc/speedtouch/speedtouch.conf ]; then&lt;br /&gt;  . /etc/speedtouch/speedtouch.conf&lt;br /&gt;fi&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;the rest was the same&lt;br /&gt;&lt;br /&gt;speedtouch.conf is&lt;br /&gt;&lt;code&gt;&lt;br /&gt;FIRMWARE_LOADER_FILE="/etc/speedtouch/Kqd6_3.012"&lt;br /&gt;FIRMWARE_FILE="/etc/speedtouch/Kqd6_3.012"&lt;br /&gt;MODEM_RUN_OPTIONS=""&lt;br /&gt;PPPD_PEER=speedtouch-pppoa&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;/etc/ppp/chap-secrets isn't :&gt;&lt;br /&gt;&lt;code&gt;"alphas@example.dsl" "*" "W00t"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;/etc/ppp/ppp.conf&lt;br /&gt;these are supposed to be indented with just the ones with a colon in column zero, like a c label&lt;br /&gt;&lt;code&gt;&lt;br /&gt;default:&lt;br /&gt;        ident user-ppp&lt;br /&gt;        set log Phase Chat IPCP CCP tun command&lt;br /&gt;        set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;&lt;br /&gt;adsl:&lt;br /&gt;        set authname alphas@example.dsl&lt;br /&gt;        set authkey W00t&lt;br /&gt;        set device !"/usr/local/sbin/pppoa2 -vpi 0 -vci 38 -v 1"  # find your own, this is BT UK on griffin adsl&lt;br /&gt;        accept chap&lt;br /&gt;        set speed sync&lt;br /&gt;        set timeout 0&lt;br /&gt;        set redial 15 10000&lt;br /&gt;        set dial ""&lt;br /&gt;        add default HISADDR&lt;br /&gt;        enable dns&lt;br /&gt;&lt;br /&gt;Connection:&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;/etc/rc.local&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/usr/local/bin/speedtouch-start&lt;br /&gt;ppp -nat -ddial adsl&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;/etc/sysctl.conf&lt;br /&gt;&lt;code&gt;net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of IPv4 packets&lt;br /&gt;net.inet6.ip6.forwarding=1      # 1=Permit forwarding (routing) of IPv6 packets&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-722353575604802634?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/722353575604802634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=722353575604802634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/722353575604802634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/722353575604802634'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/alcatel-thompson-speedtouch-330-on.html' title='Alcatel / Thompson SpeedTouch 330 on OpenBSD'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2010865452776488758</id><published>2009-08-24T19:29:00.007+01:00</published><updated>2009-08-25T00:36:44.141+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='pf'/><title type='text'>Das Brickenn vas Goot</title><content type='html'>EPIA as a router, got the OpenBSD 4.5 disk, got it installed once I reset the partitions as the default it gave me for an 8gb can't install the ports on itself!&lt;br /&gt;&lt;br /&gt;First thing I have to do is add packet forwarding &lt;br /&gt;&lt;br /&gt;&lt;code&gt;# echo "net.inet.ip.forwarding=1" &gt;&gt;  /etc/sysctl.conf&lt;br /&gt;# echo "net.inet6.ip6.forwarding=1" &gt;&gt;  /etc/sysctl.conf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I guess I should play with IPv6 some time, anyway lets go nattin&lt;br /&gt;/etc/pf.conf&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ext_if  = "tun0 "&lt;br /&gt;int_if  = "vr0"&lt;br /&gt;int_net  = "vr0:network"&lt;br /&gt;lan_net = "192.168.9.0/24"&lt;br /&gt;&lt;br /&gt;momos = "{ 993 25 22 }"&lt;br /&gt;pigs = "{ 80 222 }"&lt;br /&gt;&lt;br /&gt;# nat on $int_if to any -&gt; $(ext) - ppp is natting for me&lt;br /&gt;# even though my IP is fixed, it's still assigned by dhcp&lt;br /&gt;&lt;br /&gt;table &lt;firewall&gt; const { self }&lt;br /&gt;set skip on lo0&lt;br /&gt;# it doesn't like the next line&lt;br /&gt;# scrub in all&lt;br /&gt;block all&lt;br /&gt;block in quick from urpf-failed&lt;br /&gt;pass in  on $int_if from $lan_net to any&lt;br /&gt;pass out on $int_if from any to $lan_net&lt;br /&gt;pass out on $ext_if proto { tcp udp icmp } all modulate state&lt;br /&gt;pass in on $ext_if proto tcp from any to ! &lt;firewall&gt; port ssh synproxy state&lt;br /&gt;rdr log on $ext_if proto tcp from any to any port $momos -&gt; 192.168.9.14&lt;br /&gt;pass in on $ext_if proto tcp from any to any port $momos&lt;br /&gt;rdr log on $ext_if proto tcp from any to any port $pigs -&gt; 192.168.9.6&lt;br /&gt;pass in on $ext_if proto tcp from any to any port $pigs&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2010865452776488758?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2010865452776488758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2010865452776488758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2010865452776488758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2010865452776488758'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/das-brickenn-vas-goot.html' title='Das Brickenn vas Goot'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-175478546950460931</id><published>2009-08-23T22:48:00.004+01:00</published><updated>2010-01-12T20:32:05.990Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='venti'/><title type='text'>dumping venti arenas</title><content type='html'>It's about time I dumped my venti arenas.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://plan9.bell-labs.com/sources/contrib/maht/rc/vbackup"&gt;Here's the script&lt;/a&gt; I'm using to read the arenas.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;#!/bin/rc&lt;br /&gt;&lt;br /&gt;! test -w /dev/sdC0/arenas &amp;&amp; status='not hostowner' &amp;&amp; exit&lt;br /&gt;&lt;br /&gt;rfork e&lt;br /&gt;&lt;br /&gt;echo `{date -n} `{fossil/last $1/fossil} &gt;&gt; vacs&lt;br /&gt;&lt;br /&gt;# sort this bit out to cd to the backup dir&lt;br /&gt;9fs momo&lt;br /&gt;cd /n/momo/home/t23/arenas&lt;br /&gt;# in backup dir&lt;br /&gt;&lt;br /&gt;fn do{&lt;br /&gt; b=`{echo $1 | sed -e  's!/dev/!!g' -e  's!/arenas!!g'}&lt;br /&gt; b=$b(1)&lt;br /&gt; if(~ $#3 0)&lt;br /&gt;  venti/rdarena $1 $2 &gt; $b.$2&lt;br /&gt; if not &lt;br /&gt;  if(! test -e $b.$3)&lt;br /&gt;   venti/rdarena $1 $2 &gt; $b.$2.$3 &amp;&amp; rm -f $b&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fossil/last &gt;&gt; vacs&lt;br /&gt;&lt;br /&gt;hget http://127.1:8000/index | &lt;br /&gt;awk '&lt;br /&gt;/^arena=/ { arena=substr($1, 7); score=""}&lt;br /&gt;/^ arena=/ { dev=$3 }&lt;br /&gt;/^ score=/ { score=substr($1, 7) }&lt;br /&gt;/^ written:/ { print "do " dev " " arena " " score }&lt;br /&gt;' |rc&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;which is adapted from Russ' restore script.&lt;br /&gt;I added the hostowner check and I' not sure it works so note that&lt;br /&gt;&lt;br /&gt;next up I have to work out if the final score is checkable outside venti, i.e it could be the hash of the whole arena.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-175478546950460931?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/175478546950460931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=175478546950460931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/175478546950460931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/175478546950460931'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/dumping-venti-arenas.html' title='dumping venti arenas'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8416185811240086546</id><published>2009-08-19T21:57:00.001+01:00</published><updated>2009-08-19T22:04:59.577+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><title type='text'>blogger fs new tool</title><content type='html'>&lt;code&gt;&lt;br /&gt;% cat /bin/blg&lt;br /&gt;#!/bin/rc&lt;br /&gt;&lt;br /&gt;echo -n 'Title: '&lt;br /&gt;title = `{read}&lt;br /&gt;echo -n 'Tags: '&lt;br /&gt;tags = `{read}&lt;br /&gt;echo -n 'Draft: '&lt;br /&gt;draft = `{read}&lt;br /&gt;if(~ $draft Yes) draft = 'Draft: yes&lt;br /&gt;'&lt;br /&gt;{&lt;br /&gt;	echo 'Title: ' $"title&lt;br /&gt;	echo 'Tags: ' $"tags&lt;br /&gt;	echo -n $draft&lt;br /&gt;	cat&lt;br /&gt;} &gt; /n/blogger/new&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The slight use advantage of the FS for this is that you can export it once you have authenticated and hand it to a service.&lt;br /&gt;&lt;br /&gt;Off the top of my head you could run fossil/last and save it as a draft post on blogger.&lt;br /&gt;&lt;br /&gt;It also means you can use blogger as a storage system for your CP&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8416185811240086546?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8416185811240086546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8416185811240086546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8416185811240086546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8416185811240086546'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/blogger-fs-new-tool.html' title='blogger fs new tool'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2961340043440625986</id><published>2009-08-18T23:39:00.001+01:00</published><updated>2009-08-18T23:39:19.091+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='new'/><title type='text'>New Post</title><content type='html'>Text for new post&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2961340043440625986?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2961340043440625986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2961340043440625986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2961340043440625986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2961340043440625986'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/new-post_18.html' title='New Post'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8854503290209705140</id><published>2009-08-18T23:37:00.001+01:00</published><updated>2009-08-18T23:37:29.418+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='distributedcomputing'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><title type='text'>write only group blog</title><content type='html'>quad% import t23 /srv/ /n/bsrv&lt;br /&gt;quad% mount /n/bsrv/blogger /n/blogger&lt;br /&gt;quad% { echo 'Title: New Post'; echo 'Text for new post' } &gt; /n/blogger/new&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8854503290209705140?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8854503290209705140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8854503290209705140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8854503290209705140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8854503290209705140'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/write-only-group-blog.html' title='write only group blog'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2556064264976365220</id><published>2009-08-18T23:18:00.001+01:00</published><updated>2009-08-18T23:20:54.054+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystems'/><title type='text'>bloggerfs in action</title><content type='html'>How plan9 people do stuff&lt;br /&gt;&lt;br /&gt;Set up your blogger account with factotum (typing your password at the prompt)&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% g=maht.lawless@googlemail.com&lt;br /&gt;% auth/factotum -g 'proto=pass server=www.google.com user='$g' !password?'&lt;br /&gt;&lt;br /&gt;!Adding key: proto=pass server=www.google.com user=maht.lawless@googlemail.com&lt;br /&gt;password: &lt;br /&gt;!&lt;br /&gt;&lt;br /&gt;% blogger/blogs $g&lt;br /&gt;3062883415508658133	compjootery&lt;br /&gt;% blogger/actionfs $g  3062883415508658133&lt;br /&gt;% { echo 'Title: Date demo'; echo 'Tags: demo, blogger' ; date} &gt; /n/blogger/new&lt;br /&gt;% cat /n/blogger/posts&lt;br /&gt;3931523848251033590 Date demo&lt;br /&gt;% cat /n/blogger/3931523848251033590&lt;br /&gt;Title: Date demo&lt;br /&gt;Tags: blogger, demo&lt;br /&gt;Tue Aug 18 21:01:07 GMT 2009&lt;br /&gt;% { echo 'Title: Date demo'; echo 'Tags: demo, blogger' ; date} &gt; /n/blogger/3931523848251033590&lt;br /&gt;% cat /n/blogger/3931523848251033590&lt;br /&gt;Title: Date demo&lt;br /&gt;Tags: blogger, demo&lt;br /&gt;Tue Aug 18 21:01:25 GMT 2009&lt;br /&gt;%&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2556064264976365220?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2556064264976365220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2556064264976365220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2556064264976365220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2556064264976365220'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/blogger-fs-in-action.html' title='bloggerfs in action'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1760554037489808316</id><published>2009-08-18T19:42:00.001+01:00</published><updated>2009-08-18T19:47:42.644+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><title type='text'>Fixed some bugs in bloggerfs</title><content type='html'>blogger/read | blogger/update now works as it should&lt;br /&gt;This entry is posted with it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1760554037489808316?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1760554037489808316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1760554037489808316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1760554037489808316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1760554037489808316'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/fixed-some-bugs-in-bloggerfs.html' title='Fixed some bugs in bloggerfs'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4148934491146310822</id><published>2009-08-18T19:16:00.001+01:00</published><updated>2009-08-18T19:36:35.212+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><title type='text'>Sounds come to my plan9 terminal</title><content type='html'>The Edirol UA-3D works great for dfm &lt;br /&gt;&lt;code&gt;hget `{hget http://dfm.nu/dfm_1.m3u | grep http} | madplay -&lt;/code&gt;&lt;br /&gt;Here's the stats&lt;br /&gt;&lt;code&gt;quad% usb/audio -V&lt;br /&gt;Audio output unit 1&lt;br /&gt;Dev can record from Line connector&lt;br /&gt;Audio input unit 13&lt;br /&gt;Dev can play to USB Streaming&lt;br /&gt;Audio Selector Unit 11&lt;br /&gt;Audio Feature Unit 9 for Playback&lt;br /&gt;	mute control on master channel&lt;br /&gt;	volume control on channel 1&lt;br /&gt;	volume control on channel 2&lt;br /&gt;Interface 1: mono, 16 bits, discrete frequencies are: 32000 44100 48000&lt;br /&gt;Interface 1: stereo, 16 bits, discrete frequencies are: 32000 44100 48000&lt;br /&gt;Interface 2: mono, 16 bits, discrete frequencies are: 32000 44100 48000&lt;br /&gt;Interface 2: stereo, 16 bits, discrete frequencies are: 32000 44100 48000&lt;br /&gt;usb/audio: playback on ep 2&lt;br /&gt;usb/audio: record on ep 2&lt;br /&gt;usb/audio: buttons on ep 1&lt;br /&gt;Setting default play parameters: 44100 Hz, 2 channels at 16 bits&lt;br /&gt;Setting default record parameters: 44100 Hz, 2 channels at 16 bits&lt;br /&gt;Warning, can't configure record for 44100 Hz, configuring for 48000 Hz instead&lt;br /&gt;Playback speed control, value 44100&lt;br /&gt;Playback mute control, value 0&lt;br /&gt;Playback volume control, min -5888, max 2048, step 256, values[1] -2048  [2] -2048  &lt;br /&gt;Playback channels control, min 1, max 2, value 2&lt;br /&gt;Playback resolution control, min 16, max 16, value 16&lt;br /&gt;Record speed control, value 48000&lt;br /&gt;Record channels control, min 1, max 2, value 2&lt;br /&gt;Record resolution control, min 16, max 16, value 16&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Here's the stats for the Creative Soundblaster USB&lt;br /&gt;Note the : Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Audio output unit 1&lt;br /&gt;Dev can record from Microphone&lt;br /&gt;Dev can record from Line connector&lt;br /&gt;Dev can record from S/PDIF&lt;br /&gt;Audio input unit 7&lt;br /&gt;Dev can play to USB Streaming&lt;br /&gt;Audio Selector Unit 8&lt;br /&gt;Audio Feature Unit 9, not known what for&lt;br /&gt;	mute control on master channel&lt;br /&gt;	volume control on channel 1&lt;br /&gt;	volume control on channel 2&lt;br /&gt;Audio Feature Unit 10 for Record&lt;br /&gt;	mute control on master channel&lt;br /&gt;	volume control on master channel&lt;br /&gt;	agc control on master channel&lt;br /&gt;Audio Feature Unit 11 for Record&lt;br /&gt;Second feature unit (10, 11) on record&lt;br /&gt;	mute control on master channel&lt;br /&gt;	volume control on channel 1&lt;br /&gt;	volume control on channel 2&lt;br /&gt;Audio Feature Unit 12 for Record&lt;br /&gt;Second feature unit (11, 12) on record&lt;br /&gt;	mute control on master channel&lt;br /&gt;Audio Feature Unit 13 for Record&lt;br /&gt;Second feature unit (12, 13) on record&lt;br /&gt;	mute control on master channel&lt;br /&gt;	volume control on master channel&lt;br /&gt;Audio Feature Unit 14 for Record&lt;br /&gt;Second feature unit (13, 14) on record&lt;br /&gt;	mute control on master channel&lt;br /&gt;	volume control on channel 1&lt;br /&gt;	volume control on channel 2&lt;br /&gt;Audio Mixer Unit 15&lt;br /&gt;	Mixer 15 for I &amp; O &lt;br /&gt;	Mixer 15 for I &amp; O &lt;br /&gt;Interface 1: stereo, 16 bits, discrete frequencies are: 48000&lt;br /&gt;Interface 2: stereo, 16 bits, discrete frequencies are: 48000 44100&lt;br /&gt;usb/audio: playback on ep 1&lt;br /&gt;usb/audio: record on ep 1&lt;br /&gt;Setting default play parameters: 44100 Hz, 2 channels at 16 bits&lt;br /&gt;Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead&lt;br /&gt;Setting default record parameters: 44100 Hz, 2 channels at 16 bits&lt;br /&gt;Warning, can't configure record for 44100 Hz, configuring for 48000 Hz instead&lt;br /&gt;Playback speed control, min 48000, max 48000, value 48000&lt;br /&gt;Playback channels control, min 2, max 2, value 2&lt;br /&gt;Playback resolution control, min 16, max 16, value 16&lt;br /&gt;Record speed control, min 48000, max 44100, value 48000&lt;br /&gt;Record mute control, value 1&lt;br /&gt;Record volume control, min 0, max 12240, step 48, values[1] 9168  [2] 9168  &lt;br /&gt;Record agc control&lt;br /&gt;Record channels control, min 2, max 2, value 2&lt;br /&gt;Record resolution control, min 16, max 16, value 16&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4148934491146310822?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4148934491146310822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4148934491146310822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4148934491146310822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4148934491146310822'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/sounds-come-to-my-plan9-terminal.html' title='Sounds come to my plan9 terminal'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2617071709331314849</id><published>2009-08-16T19:35:00.001+01:00</published><updated>2009-08-16T20:25:08.261+01:00</updated><title type='text'>And acme posts</title><content type='html'>I'm going to upload what I have so far and leave the rest to fate.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2617071709331314849?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2617071709331314849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2617071709331314849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2617071709331314849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2617071709331314849'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/and-acme-posts.html' title='And acme posts'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3931523848251033590</id><published>2009-08-16T17:57:00.001+01:00</published><updated>2009-08-18T23:29:31.671+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='demo'/><title type='text'>Date demo</title><content type='html'>Tue Aug 18 22:29:27 GMT 2009&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3931523848251033590?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3931523848251033590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3931523848251033590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3931523848251033590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3931523848251033590'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/command-line-insert.html' title='Date demo'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3166121854788439102</id><published>2009-08-16T10:45:00.001+01:00</published><updated>2009-08-16T17:38:27.882+01:00</updated><title type='text'>post from bloggerfs</title><content type='html'>A new darn post&lt;br /&gt;&lt;br /&gt;Now with editing in Acme&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3166121854788439102?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3166121854788439102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3166121854788439102' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3166121854788439102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3166121854788439102'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/post-from-bloggerfs.html' title='post from bloggerfs'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7168887970146694343</id><published>2009-08-16T09:07:00.001+01:00</published><updated>2009-08-16T09:07:54.977+01:00</updated><title type='text'>Hello from plan9 python</title><content type='html'>bloggerfs incoming&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7168887970146694343?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7168887970146694343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7168887970146694343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7168887970146694343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7168887970146694343'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/hello-from-plan9-python.html' title='Hello from plan9 python'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5692837089389092544</id><published>2009-08-14T15:33:00.005+01:00</published><updated>2009-08-16T00:42:20.233+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mercurial'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ape'/><category scheme='http://www.blogger.com/atom/ns#' term='hg'/><title type='text'>HG Unwells?</title><content type='html'>(while making this and feeding back, the packages are being changed so its worth checking&lt;br /&gt;&lt;br /&gt;--rw-rw-r-- M 149 bichued sys 5510112 Oct 17 2008 python-2.5.1-ape.tgz&lt;br /&gt;quad% md5sum python-2.5.1-ape.tgz&lt;br /&gt;ac73a8b4fcb38b966e81fe8ad3aa50e1 python-2.5.1-ape.tgz&lt;br /&gt;% &lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;ok, somehow bichued is involved, that dastardly hacker&lt;br /&gt;&lt;br /&gt;http://plan9.bell-labs.com/sources/contrib/bichued/python/&lt;br /&gt;&lt;br /&gt;He's got hg, python the darn lot going on in there&lt;br /&gt;&lt;br /&gt;The excitement is killing me as it copies. I wonder if I'll ever write copy-with-progress, everything is just waiting for it.&lt;br /&gt;&lt;br /&gt;Oh I added python to linuxemu already, ver 2.3.5, handy little box I suppose. &lt;br /&gt;&lt;br /&gt;The instructions for it are in /n/sources/contrib/bichued/python-2.5.1-ape.tgz&lt;br /&gt;cat Readme.Plan9&lt;br /&gt;&lt;br /&gt;got some contribs to install (ooh first time I have fgb/contrib tools, I am honoured)&lt;br /&gt;&lt;br /&gt;the order in the list of contribs is wrong&lt;br /&gt;lcms depends on tiff&lt;br /&gt;and png depends on z&lt;br /&gt;tiff &amp; xml depend on z&lt;br /&gt;&lt;br /&gt;openssl is a monster&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;k now I need to patch ape&lt;br /&gt;&lt;code&gt;ramfs&lt;br /&gt;bind -ac /tmp /n/sources/patch/ape-chmod-dirbit&lt;br /&gt;patch/apply ape-chmod-dirbit&lt;br /&gt;bind -ac /tmp /n/sources/patch/applied/ape-ftruncate&lt;br /&gt;patch/apply applied/ape-ftruncate&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I got some perm errors on the last one but the update seems to have worked&lt;br /&gt;&lt;br /&gt;The mkfiles need adjustment for python-2.5.1-ape, I got away with this :&lt;br /&gt;&lt;cdoe&gt;% cd python-2.5.1-ape&lt;br /&gt;% grep 'CFLAGS=' `{walk | grep mkfile}&lt;br /&gt;Extra/mkfile:CFLAGS=-c -I.. -I../Include -DT$objtype -DNDEBUG -D_SUSV2_SOURCE&lt;br /&gt;Modules/mkfile:CFLAGS=-c -I. -I.. -I../Include -DT$objtype -DNDEBUG -DPLAN9 -D_SUSV2_SOURCE &lt;br /&gt;Objects/mkfile:CFLAGS=-c -I.. -I../Include -DT$objtype -DPy_BUILD_CORE -DNDEBUG&lt;br /&gt;Parser/mkfile:CFLAGS=-c -I.. -I../Include -DT$objtype -DPy_BUILD_CORE -DNDEBUG&lt;br /&gt;Python/mkfile:CFLAGS=-c -I.. -I../Include -DT$objtype -DPy_BUILD_CORE -DNDEBUG&lt;br /&gt;mkfile:CFLAGS=-FVwN&lt;br /&gt;mkfile:CFLAGS=-c -I. -IInclude -DT$objtype -DPy_BUILD_CORE -DNDEBUG -D_SUSV2_SOURCE&lt;br /&gt;% mk install&lt;br /&gt;...&lt;br /&gt;% python&lt;br /&gt;Python 2.5.1 (r251:54863, Aug 15 2009, 21:45:20) [C] on plan9&lt;br /&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;br /&gt;&gt;&gt;&gt; &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;now for hg&lt;br /&gt;&lt;br /&gt;&lt;code&gt;bind python-2.5.1-ape /n/python&lt;br /&gt;; bind -a /n /tmp&lt;br /&gt;; cd hg-1.0.2&lt;br /&gt;; mk install&lt;br /&gt;&lt;br /&gt;; hg -v&lt;br /&gt;Mercurial Distributed SCM (version 1.0.2)&lt;/code&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5692837089389092544?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5692837089389092544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5692837089389092544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5692837089389092544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5692837089389092544'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/hg-unwells.html' title='HG Unwells?'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2462979668888307087</id><published>2009-08-13T23:14:00.007+01:00</published><updated>2009-08-14T02:00:50.496+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sarge'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='linuxemu'/><category scheme='http://www.blogger.com/atom/ns#' term='emulation'/><title type='text'>Adventures in Linuxemu</title><content type='html'>Installation is exactly as cinap says&lt;br /&gt;&lt;br /&gt;But the apt sources have moved&lt;br /&gt;&lt;code&gt;deb http://archive.debian.org/debian sarge main&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now apt-update worked&lt;br /&gt;&lt;br /&gt;&lt;code&gt;apt-get install host&lt;/code&gt;&lt;br /&gt;got me a working host&lt;br /&gt;&lt;br /&gt;&lt;code&gt;apt-get install python&lt;/code&gt;&lt;br /&gt;would have got me python2.3 but I cancelled it&lt;br /&gt;&lt;br /&gt;Upgrading to etch is not possible because etch requires the "dswap" instruction&lt;br /&gt;&lt;br /&gt;adding privoxy to test sockets&lt;br /&gt;&lt;br /&gt;&lt;code&gt;apt-get -y install privoxy&lt;/code&gt;&lt;br /&gt;it's also installing adduser &amp; cron&lt;br /&gt;&lt;br /&gt;adduser is failing to lock /etc/passwd so wont add new users&lt;br /&gt;&lt;br /&gt;trying apt-get -y install ssh&lt;br /&gt;it asks you if you want to disable ssh 1 buy i can only say yes!&lt;br /&gt;&lt;br /&gt;worse than that, it ignores the -y&lt;br /&gt;&lt;br /&gt;So I went for proftpd and it's hauled in the army - 6M expanding to 25M - no questions asked!&lt;br /&gt;&lt;br /&gt;Same option problem so I mashed the keys and it worked but I don't know what I chose, inetd or standalone&lt;br /&gt;&lt;br /&gt;dammit, that wants user ftp, didnt think of that&lt;br /&gt;&lt;br /&gt;should have tried nc instead&lt;br /&gt;&lt;br /&gt;anyway gone for vnc4server which drags in X !&lt;br /&gt;&lt;br /&gt;can't open display&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2462979668888307087?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2462979668888307087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2462979668888307087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2462979668888307087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2462979668888307087'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/adventures-in-linuxemu.html' title='Adventures in Linuxemu'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2077316973843527373</id><published>2009-08-12T18:38:00.002+01:00</published><updated>2009-08-12T23:07:32.172+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netboot'/><category scheme='http://www.blogger.com/atom/ns#' term='pxe'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><title type='text'>Net booting Plan9</title><content type='html'>This *should* be easy, eventually it was!&lt;br /&gt;&lt;br /&gt;NVidia Bootagent doesn't like it but IBM Boot Agent v.1.2.2 is a worker&lt;br /&gt;&lt;br /&gt;/cfg/pxf/ is being picked up&lt;br /&gt;it needed a ether= ip= in /lib/ndb/local&lt;br /&gt;&lt;br /&gt;after working out the pxe file I ended up with :&lt;br /&gt;&lt;br /&gt;ether0=igbe&lt;br /&gt;monitor=vesa&lt;br /&gt;vgasize=800x600x8&lt;br /&gt;mouseport=ps2intellimouse&lt;br /&gt;user=maht&lt;br /&gt;bootfile=ether0!/386/9pc&lt;br /&gt;bootargs=tcp!t23&lt;br /&gt;nobootprompt=tcp!t23&lt;br /&gt;*nomp=1  # vesa graphics boo hoo&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I added secstore to the server and added myself as a user&lt;br /&gt;&lt;br /&gt;I fiddled around with lib/profile and added factotum&lt;br /&gt;now you get prompted for your secstore password twice, profile then imports your home directory using your auth and you can write to it. Means you have to shuffle your profile round a little bit, mine's now&lt;br /&gt;&lt;code&gt;&lt;br /&gt;fn bins {&lt;br /&gt;bind -a $home/bin/rc /bin&lt;br /&gt;bind -a $home/bin/$cputype /bin&lt;br /&gt;bind -c $home/tmp /tmp&lt;br /&gt;bind -a /usr/inferno/Plan9/386/bin/ /bin&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;font = /lib/font/bit/lucidasans/unicode.8.font&lt;br /&gt;prompt=($sysname^'% ' ' ')&lt;br /&gt;fn $sysname%{ $* }&lt;br /&gt;fn acme { /bin/acme -f /lib/font/bit/lucidasans/unicode.7.font $* }&lt;br /&gt;timezone=`{cat /adm/timezone/local}&lt;br /&gt;switch($service){&lt;br /&gt;case terminal&lt;br /&gt; auth/factotum&lt;br /&gt; import t23 / /n/t23&lt;br /&gt; bind -c /n/t23/usr/$user /usr/$user&lt;br /&gt; bind -c /n/t23/usr/$user/tmp /tmp&lt;br /&gt; bind -c /n/t23/usr/inferno /usr/inferno&lt;br /&gt; bins&lt;br /&gt; plumber&lt;br /&gt; upas/fs&lt;br /&gt; echo -n accelerated &gt; '#m/mousectl'&lt;br /&gt; echo -n 'res 3' &gt; '#m/mousectl'&lt;br /&gt; exec rio&lt;br /&gt;case cpu&lt;br /&gt; bins&lt;br /&gt; if (test -e /mnt/term/mnt/wsys) {&lt;br /&gt;  # rio already running&lt;br /&gt;  wsys = /mnt/term^`{cat /mnt/term/env/wsys}&lt;br /&gt;  bind -a /mnt/term/mnt/wsys /dev&lt;br /&gt;  echo -n $sysname &gt; /dev/label&lt;br /&gt; }&lt;br /&gt; bind /mnt/term/dev/cons /dev/cons&lt;br /&gt; bind /mnt/term/dev/consctl /dev/consctl&lt;br /&gt; bind -a /mnt/term/dev /dev&lt;br /&gt; upas/fs&lt;br /&gt; news&lt;br /&gt; if (! test -e /mnt/term/mnt/wsys) {&lt;br /&gt;  # cpu call from drawterm&lt;br /&gt;  plumber&lt;br /&gt;  auth/factotum&lt;br /&gt;  exec rio&lt;br /&gt; }&lt;br /&gt;case con&lt;br /&gt; bins&lt;br /&gt; news&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2077316973843527373?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2077316973843527373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2077316973843527373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2077316973843527373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2077316973843527373'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/08/net-booting-plan9.html' title='Net booting Plan9'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4340168721547038018</id><published>2009-07-29T11:31:00.002+01:00</published><updated>2009-08-12T23:09:27.754+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='inferno'/><title type='text'>Updated compiling Inferno</title><content type='html'>The moved to Mercurial is not without its problems - empty directories, missing build targets, but at least it is more transparent these days. I think people overlook what a tricky task it has been choosing and maintaining a distribution system that works for everybody.&lt;br /&gt;&lt;br /&gt;Anyway I &lt;a href="http://maht0x0r.blogspot.com/2009/04/build-your-own-inferno.html"&gt;edited my old entry&lt;/a&gt; so that there weren't two&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4340168721547038018?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4340168721547038018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4340168721547038018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4340168721547038018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4340168721547038018'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/07/updated-compilng-inferno.html' title='Updated compiling Inferno'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3952171612943406586</id><published>2009-06-20T18:26:00.012+01:00</published><updated>2009-06-20T20:54:58.462+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='werc'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9port'/><category scheme='http://www.blogger.com/atom/ns#' term='inotify'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='rc'/><category scheme='http://www.blogger.com/atom/ns#' term='kqueue'/><category scheme='http://www.blogger.com/atom/ns#' term='queues'/><category scheme='http://www.blogger.com/atom/ns#' term='fifo'/><title type='text'>Serialising multiple writers in the shell</title><content type='html'>A few years ago I came across &lt;a href="http://www.freebsdsoftware.org/sysutils/wait_on.html"&gt;wait_on&lt;/a&gt; for monitoring file changes on FreeBSD (from the kqueue) in the shell. Linux has inotify-tools for using inotify the same way. Using these tools we can build a fifo daemon with multiple writers and one reader. I'm not sure if Plan 9 already has a way to do this in userland, maybe even by using snoopy.&lt;br /&gt;&lt;br /&gt;Here's the Linux version I use.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% cat /usr/local/bin/manage_queue&lt;br /&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;# we assume that / will never appear in a filename and thus is a safe delimeter&lt;br /&gt;DELIMETER=/&lt;br /&gt;&lt;br /&gt;fn waiter {        &lt;br /&gt;        inotifywait  -q $3  --format '%f'^$DELIMETER -e $2 $1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fn watch {&lt;br /&gt;        if(~ $1 -1) # do it once&lt;br /&gt;                waiter $*(2-)&lt;br /&gt;        if not # do it forever&lt;br /&gt;                waiter $1 $2 -m&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;fn process {&lt;br /&gt;        read_until $DELIMETER | sed 's/.$//' | $*&lt;br /&gt;        /usr/local/plan9/bin/dd -ibs 1 -count 1 &gt;[2] /dev/null&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# start the processing cmd in the queue directory&lt;br /&gt;if(~ $1 -1) { # do it once&lt;br /&gt;        cd $2&lt;br /&gt;        watch -1 $2 $3 | process $*(4-)&lt;br /&gt;}&lt;br /&gt;if not { # ad infinitum&lt;br /&gt;        cd $1&lt;br /&gt;        watch $1 $2 | while() { process $*(3-) }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and you invoke it thus :&lt;br /&gt;su -c 'manage_queue /tmp/uploaded_images/ moved_to make_thumbnails' uploadprocessor&lt;br /&gt;although I use daemontools so that is the contents of /etc/service/uploads/run&lt;br /&gt;&lt;br /&gt;My other usual option is close_write instead of moved_to, it depends how your files get there and are processed once they arrive.&lt;br /&gt;&lt;br /&gt;The -1 option is for doing a spot of debugging, it does one file and then exits&lt;br /&gt;&lt;br /&gt;The bit of script missing from there is read_until&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;% cat /usr/local/bin/read_until&lt;br /&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;ifs=()&lt;br /&gt;&lt;br /&gt;while() {&lt;br /&gt;        c=`{/usr/local/plan9/bin/dd -ibs 1 -count 1 &gt;[2] /dev/null}&lt;br /&gt;        if(~ $#c 0)&lt;br /&gt;                echo -n ' '&lt;br /&gt;        if not&lt;br /&gt;                switch($c) {&lt;br /&gt;                case $1&lt;br /&gt;                        exit&lt;br /&gt;                case *&lt;br /&gt;                        echo -n $c&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I had to make that because newline is a valid filename character thus defeating various line reading commands.&lt;br /&gt;&lt;br /&gt;Now you've got the thing going, you'll need a processor like make_thumbnails, which I've made up here as an example (gm is graphicsmagick which kept the older api when ImageMagick changed):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;ifs=()&lt;br /&gt;fin=`{cat}&lt;br /&gt;gm convert -resize 100x100 /tmp/uploads/$fin /var/www/thumbs/$fin.jpeg&lt;br /&gt;gm convert -resize 350x500 /tmp/uploads/$fin /var/www/mids/$fin.jpeg&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, using this mechanism the user uploads the image via a web browser, when the CGI is satisfied it can do 'mv /uploadir/$up /tmp/uploads/$up' and carry on sending html to the user, the thumbnail will get made when it gets to the front of the queue.&lt;br /&gt;&lt;br /&gt;The other issues this can solve is ring fencing users from each other and just communicating via files and filenames (of which the above is an example but also internal users). www can write to /tmp/downloads but not /var/www/*. By passing the uploaded image through gm it gets (hopefully) sanitized, by running gm as its own user that mitigates attacks against gm, one can use the OSes limiters to let gm only have so much cpu etc.&lt;br /&gt;&lt;br /&gt;By serialising like this it also protects against a DoS uploading loads of massive images and trying to thumbnail them in parallel. You've still got the problem of processing them but at least only one process will be pegged at 100% not one per upload.&lt;br /&gt;&lt;br /&gt;Though I've not done it yet, you could also use it as a marshall which does some load balancing (perhaps using &lt;a href="http://xcpu.org"&gt;Xcpu&lt;/a&gt;), or just forked threads.&lt;br /&gt;&lt;br /&gt;--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3952171612943406586?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3952171612943406586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3952171612943406586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3952171612943406586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3952171612943406586'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/06/serialising-multiple-writers-in-shell_20.html' title='Serialising multiple writers in the shell'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3128967770917825600</id><published>2009-05-16T12:18:00.002+01:00</published><updated>2010-01-01T11:38:20.685Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='utf8'/><category scheme='http://www.blogger.com/atom/ns#' term='utf-8'/><category scheme='http://www.blogger.com/atom/ns#' term='iconv'/><title type='text'>Strip invalid characters UTF-8 from a bytestream</title><content type='html'>Found this at http://snippets.dzone.com/posts/show/6194&lt;br /&gt;&lt;code&gt;&lt;br /&gt;iconv -c -f UTF-8 -t UTF-8 &lt; invalid &gt; valid&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3128967770917825600?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3128967770917825600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3128967770917825600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3128967770917825600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3128967770917825600'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/05/strip-invalid-characters-utf-8-from.html' title='Strip invalid characters UTF-8 from a bytestream'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5212861133650686485</id><published>2009-04-10T18:04:00.004+01:00</published><updated>2009-04-11T13:55:29.303+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vnc'/><title type='text'>VNC serving</title><content type='html'>if you want passwordless vnc, use Debian package vnc4server&lt;br /&gt;&lt;br /&gt;vncserver -SecurityTypes None&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5212861133650686485?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5212861133650686485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5212861133650686485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5212861133650686485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5212861133650686485'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/04/vnc-serving.html' title='VNC serving'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8027706526189093935</id><published>2009-04-10T16:44:00.019+01:00</published><updated>2009-07-29T17:23:14.425+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='inferno'/><category scheme='http://www.blogger.com/atom/ns#' term='plan9. linux'/><title type='text'>Build your own Inferno</title><content type='html'>first you'll need mercurial&lt;br /&gt;&lt;br /&gt;&lt;code&gt; apt-get install mercurial&lt;/code&gt;&lt;br /&gt;then get the code&lt;br /&gt;&lt;code&gt;cd /usr/local; hg clone https://inferno-os.googlecode.com/hg/ inferno-os&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;edit mkconfig&lt;br /&gt;ROOT=/usr/local/inferno-os&lt;br /&gt;SYSHOST=Linux &lt;br /&gt;OBJTYPE=386&lt;br /&gt;&lt;br /&gt;edit makemk.sh&lt;br /&gt;ROOT=/usr/local/inferno-os&lt;br /&gt;SYSTARG=Linux&lt;br /&gt;&lt;br /&gt;Atm. you have to make some empty directories because hg doesn't like those !&lt;br /&gt;&lt;br /&gt;mkdir /usr/local/inferno-os/Linux/386/lib/&lt;br /&gt;&lt;br /&gt;&lt;code&gt;% sh makemk.sh&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;[ n.b.&lt;br /&gt;&lt;br /&gt;(11:42:04) mjl-: mahjadin: i think that on linux/amd64, you'll need a mk nuke inbetween makemk.sh and mk install, makemk.sh didn't use -m32 last time i checked, so mk install will try to link all -m32 object files against the few amd64 libs that makemk.sh created.&lt;br /&gt;(11:42:11) mjl-: but i'll have to check that.&lt;br /&gt;...&lt;br /&gt;(11:51:08) mjl-: this is the error:&lt;br /&gt;(11:51:21) mjl-: //usr/bin/ld: warning: i386:x86-64 architecture of input file `/home/mjl/inf.test/Linux/386/lib/libbio.a(bgetc.o)' is incompatible with i386 output&lt;br /&gt;&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then add the inferno bin to your path for mk and later for other tools such as iyacc&lt;br /&gt;&lt;code&gt;PATH=$PATH:/usr/local/inferno-os/Linux/386/bin&lt;br /&gt;mk install&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;bah, failed with something different this time&lt;br /&gt;&lt;br /&gt;(cd Linux; mk  install)&lt;br /&gt;cc -c -m32  asm-386.S&lt;br /&gt;mk: no recipe to make 'devtab.o'&lt;br /&gt;mk: echo "(cd $SYSTARG; ...  : exit status=exit(1)&lt;br /&gt;mk: for j in ...  : exit status=exit(1)&lt;br /&gt;&lt;br /&gt;ok I solved that one &lt;br /&gt;&lt;code&gt;touch /usr/local/inferno-os/emu/port/devtab.c&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;on to the next&lt;br /&gt;&lt;br /&gt;&lt;code&gt; touch /usr/local/inferno-os/dis/lib/oldauth.dis&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;finally mk install will work&lt;br /&gt;&lt;br /&gt;Though you have to pretend to yourself none of those compiler warnings matter as they fly past.&lt;br /&gt;&lt;br /&gt;Other directories to make&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mkdir OpenBSD/arm&lt;br /&gt;mkdir `{hget 'http://inferno-os.googlecode.com/issues/attachment?aid=-8986372491888485913&amp;name=empties'}&lt;br /&gt;chmod 555 mnt/* n/client/* n/*&lt;br /&gt;chmod 755 n/client&lt;br /&gt;chmod 555 prof&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;you'll get an error 'cos we made it earlier&lt;br /&gt;&lt;br /&gt;mkdir: ./Linux/386/lib already exists &lt;br /&gt;&lt;br /&gt;ohoh fonts&lt;br /&gt;&lt;br /&gt;can't auto-download cdinstall.iso any more, have to guess at the release date (unless this bit of p9p script works)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cd /tmp&lt;br /&gt;dist=`{hget http://www.vitanuova.com/inferno/downloads.html | grep '/dist/4e/' | sed -e 's/^[^"]+"//' -e 's/".*//'}&lt;br /&gt;hget $dist | gunzip | tar x inferno/fonts; @{cd inferno/fonts &amp;&amp; tar cp .} | @{cd /usr/local/inferno-os/fonts/&amp;&amp; tar xT} ; rm -rf inferno&lt;br /&gt;&lt;br /&gt;chmod 777 /usr/local/inferno-os/tmp&lt;br /&gt;&lt;br /&gt;For plan9 is is virtually the same, not all the missing bits are missing, you'll work it out.&lt;br /&gt;&lt;br /&gt;As a new user you'll need to do this (probably as root):&lt;br /&gt;cd /usr/local/inferno-os/&lt;br /&gt;mkdir usr/$user&lt;br /&gt;mkdir usr/$user/lib&lt;br /&gt;cp usr/inferno/lib/plumbing usr/$user/lib&lt;br /&gt;touch usr/$user/lib/keyring&lt;br /&gt;chown -R $user usr/$user&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8027706526189093935?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8027706526189093935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8027706526189093935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8027706526189093935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8027706526189093935'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/04/build-your-own-inferno.html' title='Build your own Inferno'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-2916021907458065290</id><published>2009-03-24T11:01:00.002Z</published><updated>2009-03-24T11:21:55.038Z</updated><title type='text'>more trig</title><content type='html'>for a half circle&lt;br /&gt;&lt;br /&gt;for a point X, Y&lt;br /&gt;&lt;br /&gt;if X &lt; w / 2&lt;br /&gt;&lt;br /&gt;x = ( w / 2 ) - X&lt;br /&gt;&lt;br /&gt;a = atan(y / x)&lt;br /&gt;R = sqrt(x * x + h * h)&lt;br /&gt;scale = h / R&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-2916021907458065290?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/2916021907458065290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=2916021907458065290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2916021907458065290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/2916021907458065290'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/more-trig.html' title='more trig'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7812923775217063942</id><published>2009-03-23T23:57:00.003Z</published><updated>2009-03-24T00:04:12.333Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='projection'/><category scheme='http://www.blogger.com/atom/ns#' term='throwratio'/><title type='text'>Projection trig</title><content type='html'>the throw ratio (R) is defined as distance to screen (D) divided by the width of the image (W)&lt;br /&gt;&lt;br /&gt;or rather R = D / W&lt;br /&gt;As we normally have R, are constrained by D and want to know W rewrite that as&lt;br /&gt;&lt;br /&gt;W = D / R&lt;br /&gt;&lt;br /&gt;if we assume D = 1 then W = 1 / R&lt;br /&gt;for atan we only use half the triangle for the angle from straight :&lt;br /&gt;thus&lt;br /&gt;a = atan (W / 2) = atan ( (1 / R) * (1 / 2) ) = atan ( 1 / 2R )&lt;br /&gt;ergo the angle of the cone A = 2 * a = 2 * atan ( 1 / 2R )&lt;br /&gt;for a Ratio of 0.8, A = 2 * atan( 1 / 1.6) = 64.011 degrees&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7812923775217063942?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7812923775217063942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7812923775217063942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7812923775217063942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7812923775217063942'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/projection-trig.html' title='Projection trig'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5552982160510366339</id><published>2009-03-23T13:16:00.006Z</published><updated>2009-03-23T14:09:58.879Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='wodim'/><category scheme='http://www.blogger.com/atom/ns#' term='dvd'/><category scheme='http://www.blogger.com/atom/ns#' term='mpeg'/><category scheme='http://www.blogger.com/atom/ns#' term='dvdauthor'/><title type='text'>mpeg2enc &amp; dvdauthoring on debian</title><content type='html'>basically you have to install&lt;br /&gt;http://debian-multimedia.org/&lt;br /&gt;&lt;br /&gt;apt-get install mjpegtools mkisofs dvdauthor ffmpeg&lt;br /&gt;&lt;br /&gt;2mpeg&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/local/plan9/bin/rc &lt;br /&gt;&lt;br /&gt;f = 8 # for dvdauthor otherwise go with 3&lt;br /&gt;br = 7500&lt;br /&gt;a = 3&lt;br /&gt;q = 5&lt;br /&gt;&lt;br /&gt;while(~ $1 -*) {&lt;br /&gt; switch($1) {&lt;br /&gt; case -b&lt;br /&gt;  br = $2&lt;br /&gt;  shift 2&lt;br /&gt; case -f&lt;br /&gt;  f = $2&lt;br /&gt;  shift 2&lt;br /&gt; case -a&lt;br /&gt;  a = $2&lt;br /&gt;  shift 2 &lt;br /&gt;  # 1 - 1  - 1:1 display&lt;br /&gt;  # 2 - 2  - 4:3 display&lt;br /&gt;    #  3 - 3  - 16:9 display&lt;br /&gt;   #       4 - 4  - 2.21:1 display&lt;br /&gt; case -i&lt;br /&gt;  deinterlace = '-deinterlace'&lt;br /&gt;  shift&lt;br /&gt; case -q&lt;br /&gt;  q = $2&lt;br /&gt;  shift 2&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;paff = $1&lt;br /&gt;shift&lt;br /&gt;fname = `{basename $paff}&lt;br /&gt;&lt;br /&gt;2mp2 $paff &amp;&lt;br /&gt;2m2v -q $q -a $a -f $f -b $br $paff $deinterlace &amp;&lt;br /&gt;wait&lt;br /&gt;&lt;br /&gt;mplex -f 8 -o $fname.mpeg $fname.m2v $fname.mp2 &amp;&amp; rm $fname.m2v $fname.mp2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2mp2&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;mplayer -vc null -vo null -ao 'pcm:fast:file=' ^$1.wav $1&lt;br /&gt;mp2enc  &lt; $1.wav -o `{basename $1} ^.mp2 &amp;&amp; rm $1.wav&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2wav&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;aid = ''&lt;br /&gt;while(~ $1 -*) {&lt;br /&gt; switch($1) {&lt;br /&gt; case -aid&lt;br /&gt;  aid = '-aid ' $2&lt;br /&gt;  shift 2&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;mplayer  $aid -vc null -vo null -ao 'pcm:fast:file=/dev/fd/1' -&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;make some mpegs : 2mpeg 1.mov&lt;br /&gt;2mpeg 2.mov&lt;br /&gt;so you'll end up with 1.mov.mpeg 2.mov.mpeg&lt;br /&gt;ffmpeg can deduce your aspect if you don't want to specify  it&lt;br /&gt;then make an xml (dvd.xml) file thus :&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;dvdauthor dest="dvd"&gt;&lt;br /&gt;&amp;lt;vmgm /&gt;&lt;br /&gt;&amp;lt;titleset&gt;&lt;br /&gt; &amp;lt;titles&gt;&lt;br /&gt;  &amp;lt;video format="pal" aspect="4:3" /&gt;&lt;br /&gt;  &amp;lt;audio format="pcm" lang="EN" /&gt;&lt;br /&gt;  &amp;lt;subpicture lang="EN" /&gt;&lt;br /&gt;  &amp;lt;pgc&gt;&lt;br /&gt;   &amp;lt;vob file="1.mov.mpeg" /&gt;&lt;br /&gt;   &amp;lt;vob file="2.mov.mpeg" /&gt;&lt;br /&gt;  &amp;lt;/pgc&gt;&lt;br /&gt; &amp;lt;/titles&gt;&lt;br /&gt;&amp;lt;/titleset&gt;&lt;br /&gt;&amp;lt;/dvdauthor&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;then&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;dvdauthor -x dvd.xml&lt;br /&gt;mkisofs -dvd-video -udf -o dvd.iso dvd&lt;br /&gt;wodim dev=/dev/cdrw1 -dao dvd.iso&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5552982160510366339?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5552982160510366339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5552982160510366339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5552982160510366339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5552982160510366339'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/mpeg2enc-dvdauhtoring-on-debian.html' title='mpeg2enc &amp; dvdauthoring on debian'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3949895740492336690</id><published>2009-03-17T12:03:00.006Z</published><updated>2009-03-17T14:42:25.342Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='macports'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mplayer OSX - working</title><content type='html'>Anothy_x reminded me about MacPorts&lt;br /&gt;&lt;br /&gt;yay, mplayer working&lt;br /&gt;&lt;br /&gt;except .... getting it to run at boot. putting it in login_items you have to associate it with terminal and then the mouse being in the top left means the mplayer menu bar is across the top.&lt;br /&gt;&lt;br /&gt;yay, done it. The power of Java moving the mouse off screen&lt;br /&gt;&lt;br /&gt;&lt;code&gt;import java.awt.AWTException;&lt;br /&gt;import java.awt.Robot;&lt;br /&gt;import java.awt.event.KeyEvent;&lt;br /&gt;&lt;br /&gt;public class RM {    &lt;br /&gt;    public static void main(String[] args) {        &lt;br /&gt;        try {            &lt;br /&gt;            Robot robot = new Robot();&lt;br /&gt;            robot.delay(5000);&lt;br /&gt;            robot.mouseMove(100, 10000);            &lt;br /&gt;        } catch (AWTException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;I presume the class file has to be in the classpath, Looks like that includes .&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;cd /Users/broadway/bin&lt;br /&gt;java RM RM.class&lt;br /&gt;mplayer -playlist /Users/broadway/media/playlist&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Yay, remove the bullet and sew up the wound; I'm out of this crazy hospital.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3949895740492336690?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3949895740492336690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3949895740492336690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3949895740492336690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3949895740492336690'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/mplayer-osx-working.html' title='Mplayer OSX - working'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-6520705176591919066</id><published>2009-03-16T18:42:00.004Z</published><updated>2009-03-17T14:44:08.070Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Mplayer OSX</title><content type='html'>Adapted from http://jonsimpson.co.uk/log/2005/mplayer_cvs_osx_tiger&lt;br /&gt;FAIL&lt;br /&gt; &lt;br /&gt;shoot me&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-6520705176591919066?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/6520705176591919066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=6520705176591919066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6520705176591919066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/6520705176591919066'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/mplayer-osx.html' title='Mplayer OSX'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-4009245404520081529</id><published>2009-03-16T11:06:00.004Z</published><updated>2009-03-16T11:53:22.129Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.4.11'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='macosx'/><title type='text'>sshd on MacMini / OSX 10.4.11</title><content type='html'>On the machine I got control of there were no ssh keys&lt;br /&gt;&lt;br /&gt;nothing unusual going on, keys are in /etc instead of /etc/ssh&lt;br /&gt;&lt;br /&gt;ssh-keygen -t rsa1 -q -f /etc/ssh_host_key&lt;br /&gt;ssh-keygen -t rsa -q -f /etc/ssh_host_rsa_key&lt;br /&gt;ssh-keygen -t dsa -q -f /etc/ssh_host_dsa_key&lt;br /&gt;&lt;br /&gt;/usr/sbin/sshd&lt;br /&gt;&lt;br /&gt;getting it to startup on boot - Preferences - Network - Remote Access [x]&lt;br /&gt;&lt;br /&gt;I suspect that it would have generated the proper keys if I'd done that first !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-4009245404520081529?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/4009245404520081529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=4009245404520081529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4009245404520081529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/4009245404520081529'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/sshd-on-macmini-osx-10411.html' title='sshd on MacMini / OSX 10.4.11'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-568075213368933669</id><published>2009-03-11T17:56:00.005Z</published><updated>2009-03-11T18:24:18.354Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9port'/><title type='text'>Building p9p from hg</title><content type='html'>FAIL&lt;br /&gt;&lt;br /&gt;I spend more time setting up the environment than doing the damn work when I get there!&lt;br /&gt;There was once a golden age where I could say to someone "I need a machine with Apache and Postgresql and CGI enabled for a domain foo.com" and they would email me when it was working. Happy days, but nothing to blog about!&lt;br /&gt;&lt;br /&gt;Ok so now I have a plan9port from Mercurial and it doesn't have some cmds built like awk and others I've not even looked at.&lt;br /&gt;&lt;br /&gt;First off is I can't build the awk because I don't have mk and I can't build mk because I don't have mk!&lt;br /&gt;&lt;br /&gt;Luckily VitaNuova have their &lt;a href="http://www.vitanuova.com/inferno/downloads.html"&gt;source tree available &lt;/a&gt; and for the moment the source tree is &lt;a href="http://www.vitanuova.com/dist/4e/inferno-20071027.tgz"&gt;this file&lt;/a&gt; but it is referenced by date.&lt;br /&gt;&lt;br /&gt;To make it work you have to unpack it in /usr and then I couldn't build it anyway. Aha but mk is in /usr/inferno/Linux/386/bin/mk and runs so I copied it to /usr/local/bin/mk&lt;br /&gt;&lt;br /&gt; cd /usr/local/plan9/src/cmd/awk&lt;br /&gt;which now fails with &lt;code&gt;&lt;br /&gt;warning: skipping missing include file: /src/mkhdr: No such file or directory&lt;br /&gt;warning: skipping missing include file: /src/mkone: No such file or directory&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;because of &lt;$PLAN9/src/mkhdr&lt;br /&gt;even if $PLAN9 is set so the solution is &lt;code&gt;PLAN9=$PLAN9 mk&lt;/code&gt;&lt;br /&gt;but more joy&lt;br /&gt;&lt;code&gt;&lt;br /&gt;9 yacc -S -d -v awkgram.y&lt;br /&gt;/usr/local/plan9/bin/9: line 17: exec: yacc: not found&lt;br /&gt;mk: 9 yacc -S ...  : exit status=exit(127)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;again&lt;br /&gt;&lt;code&gt;cp /usr/inferno/Linux/386/bin/yacc /usr/local/bin/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;PLAN9=$PLAN9 mk&lt;br /&gt;9 yacc -S -d -v awkgram.y&lt;br /&gt;&lt;br /&gt;conflicts: 42 shift/reduce, 83 reduce/reduce&lt;br /&gt;9c  re.c&lt;br /&gt;9c  lex.c&lt;br /&gt;9c  main.c&lt;br /&gt;9c  parse.c&lt;br /&gt;9c  maketab.c&lt;br /&gt;9c  tran.c&lt;br /&gt;9c  lib.c&lt;br /&gt;9c  run.c&lt;br /&gt;9c  y.tab.c&lt;br /&gt;9l -o o.maketab maketab.o&lt;br /&gt;/usr/bin/ld: cannot find -l9&lt;br /&gt;collect2: ld returned 1 exit status&lt;br /&gt;mk: 9l -o o.maketab maketab.o  : exit status=exit(1)&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;time to download &lt;a href="http://swtch.com/plan9port/plan9port.tgz"&gt;http://swtch.com/plan9port/plan9port.tgz&lt;/a&gt; ! and &lt;br /&gt;&lt;br /&gt;apt-get install xorg-dev&lt;br /&gt;Need to get 14.7MB of archives.&lt;br /&gt;After this operation, 47.5MB of additional disk space will be used.&lt;br /&gt;Do you want to continue [Y/n]? y&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-568075213368933669?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/568075213368933669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=568075213368933669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/568075213368933669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/568075213368933669'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/building-p9p-from-hg.html' title='Building p9p from hg'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-7115280187427414487</id><published>2009-03-09T12:58:00.006Z</published><updated>2009-03-09T19:43:16.823Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='werc'/><category scheme='http://www.blogger.com/atom/ns#' term='markdown'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Working the Werc</title><content type='html'>I'm giving &lt;a href="http://werc.cat-v.org/"&gt;Werc&lt;/a&gt; a try out, I hope the fella's done a good job.&lt;br /&gt;&lt;br /&gt;First shizzle I need is an hg client do get a checkout, I notice there's a lot of checkins so it's better this way I reckon. Plus I'll be a contributor before long.&lt;br /&gt;&lt;br /&gt;Hg only needs 16.8Mb of files !!  hgsvn is the package name - hope it's the right one.&lt;br /&gt;&lt;br /&gt;slap:/var/www# rmdir werc&lt;br /&gt;slap:/var/www# hg clone http://gsoc.cat-v.org/hg/werc/&lt;br /&gt;&lt;br /&gt;ok that worked out&lt;br /&gt;&lt;br /&gt;lighttpd.conf&lt;br /&gt;&lt;br /&gt;need to add "mod_cgi", to the modules section or run : lighty-enable-mod cgi&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$HTTP["host"] =~ ".*feedideas.$" {&lt;br /&gt;    index-file.names = ( )&lt;br /&gt;    server.error-handler-404 = "/werc.rc"&lt;br /&gt;    alias.url       += ( "/werc.rc" =&gt; "/var/www/werc/bin/werc.rc" ) # Here use the path to werc.rc in your system.&lt;br /&gt;    cgi.assign += ( ".rc" =&gt; "")&lt;br /&gt;    server.dir-listing = "disable"&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then &lt;code&gt;mkdir /var/www/werc/sites/feedideas&lt;br /&gt;echo HelloWorld &gt; /var/www/werc/sites/feedideas/index.html&lt;br /&gt;/etc/init.d/lighttpd restart&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then you can begin the task of skinning your website so it doesn't look like the paedophile cat-v ;)&lt;br /&gt;&lt;br /&gt;Apparently werc utilizes &lt;a href="http://daringfireball.net/projects/markdown/"&gt;markdown&lt;/a&gt; but when I tried it, I got literals.&lt;br /&gt;&lt;br /&gt;Not totally happy with the directory structure but been working with Uriel on moving a few functions around so you can overload your own.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-7115280187427414487?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/7115280187427414487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=7115280187427414487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7115280187427414487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/7115280187427414487'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/working-werc.html' title='Working the Werc'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5657115322959523210</id><published>2009-03-03T23:38:00.008Z</published><updated>2009-03-03T23:54:17.064Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan9'/><category scheme='http://www.blogger.com/atom/ns#' term='draw'/><category scheme='http://www.blogger.com/atom/ns#' term='porter-duff'/><title type='text'>O, that way madness lies.</title><content type='html'>Thanks Skip for the title.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#include &amp;lt;u.h&amp;gt;&lt;br /&gt;#include &amp;lt;libc.h&amp;gt;&lt;br /&gt;#include &amp;lt;draw.h&amp;gt;&lt;br /&gt;#include &amp;lt;cursor.h&amp;gt;&lt;br /&gt;&lt;br /&gt;Image *col[2];&lt;br /&gt;&lt;br /&gt;void&lt;br /&gt;main(void) {&lt;br /&gt; Point zero;&lt;br /&gt; zero.x = 0;&lt;br /&gt; zero.y = 0;&lt;br /&gt;&lt;br /&gt; newwindow("-r 0 0 700 300");&lt;br /&gt; if(initdraw(nil, nil, "tri") &lt; 0){&lt;br /&gt;  fprint(2, "stats: initdraw failed: %r\n");&lt;br /&gt;  exits("initdraw");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;/* code in the boxes goes here */&lt;br /&gt; col[0] = allocimage(display, Rect(0,0,1,1), RGB24, 1, setalpha(0xFF0000FF, 0xFF));&lt;br /&gt; col[1] = allocimage(display, Rect(0,0,1,1), RGB24, 1, setalpha(0x00FF00FF, 0xFF));&lt;br /&gt; draw(screen, screen-&gt;r, col[0], nil, zero);&lt;br /&gt; draw(screen, Rect(0,0,350,150), col[1], nil, zero);&lt;br /&gt;/* to here */&lt;br /&gt;     &lt;br /&gt; flushimage(display, 1);&lt;br /&gt; sleep(10000);&lt;br /&gt; closedisplay(display);&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This is the image with no alpha&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa2_slqZ4HI/AAAAAAAAABU/PbXlr5GgQQU/s1600-h/rgb24.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 130px;" src="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa2_slqZ4HI/AAAAAAAAABU/PbXlr5GgQQU/s400/rgb24.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309110308484800626" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As expected, apply alpha to the red or the green and the intensity diminishes. No blending.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa3A32mUDzI/AAAAAAAAABc/CostkVfredY/s1600-h/rgb24-alpha.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 148px;" src="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa3A32mUDzI/AAAAAAAAABc/CostkVfredY/s400/rgb24-alpha.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309111601521233714" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Q8z__vhZ8yg/Sa3A_mEqicI/AAAAAAAAABk/tyxf-0GBcH0/s1600-h/rgb24-alpha2.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 129px;" src="http://4.bp.blogspot.com/_Q8z__vhZ8yg/Sa3A_mEqicI/AAAAAAAAABk/tyxf-0GBcH0/s400/rgb24-alpha2.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309111734524086722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But with RGB24 you can't do Porter-Duff operations. But when you apply alpha to RGBA32 images something unexpected happens :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Q8z__vhZ8yg/Sa3BusIWPoI/AAAAAAAAABs/qPYj0K69gYU/s1600-h/rgba32-alpha.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 137px;" src="http://4.bp.blogspot.com/_Q8z__vhZ8yg/Sa3BusIWPoI/AAAAAAAAABs/qPYj0K69gYU/s400/rgba32-alpha.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309112543603998338" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa3B1LwnJPI/AAAAAAAAAB0/8VIOynxMDVU/s1600-h/rgba32-alpha2.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 136px;" src="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa3B1LwnJPI/AAAAAAAAAB0/8VIOynxMDVU/s400/rgba32-alpha2.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309112655173592306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I can't work out how that transformation even occurs - The green turns to fd007f, the red to 7f80ff. Where does the blue come from?&lt;br /&gt;&lt;br /&gt;If I drawop them too I get :&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa3CXdEWnUI/AAAAAAAAAB8/LTDUQACBPL0/s1600-h/rgba32-alpha-op.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 147px;" src="http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa3CXdEWnUI/AAAAAAAAAB8/LTDUQACBPL0/s400/rgba32-alpha-op.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5309113243935350082" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Green = bd40ff&lt;br /&gt;Red = 7f80ff&lt;br /&gt;&lt;br /&gt;I'm afraid it defies my comprehension!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5657115322959523210?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/5657115322959523210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=5657115322959523210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5657115322959523210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5657115322959523210'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/o-that-way-madness-lies.html' title='O, that way madness lies.'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Q8z__vhZ8yg/Sa2_slqZ4HI/AAAAAAAAABU/PbXlr5GgQQU/s72-c/rgb24.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-1131497605683347135</id><published>2009-03-02T15:25:00.005Z</published><updated>2009-03-02T16:50:42.045Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='9p'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='u9fs'/><category scheme='http://www.blogger.com/atom/ns#' term='tcpserver'/><title type='text'>serving 9p from debian</title><content type='html'>Despite a tried and tested u9fs working, I went the &lt;a href="http://sourceforge.net/projects/npfs"&gt;npfs&lt;/a&gt; route. &lt;br /&gt;&lt;br /&gt;No docs.&lt;br /&gt;&lt;br /&gt;I prefer tcpserver over inetd so # apt-get install ucspi-tcp&lt;br /&gt;&lt;br /&gt;naively I tried slap:/home/maht/spfs# tcpserver -v 10.0.0.1 564 fs/ufs&lt;br /&gt;&lt;br /&gt;mount failed : Hangup&lt;br /&gt;&lt;br /&gt;back to u9fs, cba pissing about&lt;br /&gt;can't find a download for u9fs at sourceforge - though I can find the &lt;a href="http://v9fs.cvs.sourceforge.net/viewvc/v9fs/u9fs/"&gt;cvs browser&lt;/a&gt; so I uploaded it to &lt;a href="http://www.proweb.co.uk/~matt/plan9/u9fs.tgz"&gt;my webspace&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;once you've built u9fs with make &lt;br /&gt;&lt;code&gt;&lt;br /&gt;cp u9fs /usr/local/bin/u9fs-bin&lt;br /&gt;touch /usr/local/bin/u9fs&lt;br /&gt;ed /usr/local/bin/u9fs&lt;br /&gt;a&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;u9fs-bin -a none&lt;br /&gt;.&lt;br /&gt;w&lt;br /&gt;q&lt;br /&gt;&lt;br /&gt;tcpserver 10.0.0.1 564 u9fs&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and away you go&lt;br /&gt;(you'll need your plan9 users as users on Debian and you trust the names)&lt;br /&gt;&lt;br /&gt;so you could use -a p9any and use /etc/u9fs.key&lt;br /&gt;I'll check it works in a bit when my 4Gb has finished copying - nope failed for me - giving up&lt;br /&gt;&lt;code&gt;&lt;br /&gt;time cp linux /n/slap/home/glenda&lt;br /&gt;0.88u 105.31s 2176.35r cp linux /n/slap/home/glenda&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;which is 36.26 mins&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-1131497605683347135?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/1131497605683347135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=1131497605683347135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1131497605683347135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/1131497605683347135'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/serving-9p-from-debian.html' title='serving 9p from debian'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-5968328323404991346</id><published>2009-03-02T13:27:00.004Z</published><updated>2009-03-03T16:23:49.169Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='aoe vblade'/><title type='text'>Installing Debian 5 to AoE</title><content type='html'>before you copy this procedure, the initrd.aoe didn't work out, I've got to inspect it an compare it against the one that worked for etch&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;haha found aoe.ko on the install disk&lt;br /&gt;on the vblade server aptitude vblade &lt;br /&gt;&lt;code&gt; &lt;br /&gt;dd if=/dev/zero of=lenny bs=1048576  count=4096&lt;br /&gt;vblade 3 1 eth0 lenny&lt;br /&gt;dd if=/dev/zero of=home bs=1024 count=204800&lt;br /&gt;vblade 3 2 eth0 home&lt;br /&gt;dd if=/dev/zero of=swap bs=1024 count=204800&lt;br /&gt;vblade 3 3 eth0 swap&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;run the installer until you can get a shell (alt-f2)&lt;br /&gt;which for me was "configure the network"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;udpkg --unpack /cdrom/pool/main/l/linux-2.6/linux-image-2.6.26-1-486_2.6.26-13_i386.deb&lt;br /&gt;insmod /lib/modules/2.6.26-1-486/kernel/drivers/block/aoe/aoe.ko&lt;br /&gt;&lt;br /&gt;cd /dev&lt;br /&gt;ln -s /dev/etherd/e3.1 hda&lt;br /&gt;ln -s /dev/etherd/e3.2 hdb&lt;br /&gt;ln -s /dev/etherd/e3.3 hdd&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The installer will moan that it can't install GRUB and give you the choice to skip along, do that.&lt;br /&gt;Eventually you get "Installation is complete" and a &lt;Go Back &gt;&lt;br /&gt;&lt;Continue&gt; choice.&lt;br /&gt;&lt;br /&gt;Now it's hack time. Crack open the initrd.img the installer just made&lt;br /&gt;&lt;code&gt;&lt;br /&gt;chroot /target&lt;br /&gt;mkdir /tmp/initrd &amp;&amp; cd /tmp/initrd&lt;br /&gt;gunzip &lt; /initrd.img | cpio -i --make-directories&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I got the scripts from http://www.etherboot.org/wiki/sanboot/debian_and_ubuntu&lt;br /&gt;&lt;code&gt;&lt;br /&gt;apt-get install aoetools&lt;br /&gt;cp /sbin/aoe-discover /tmp/initrd/sbin/&lt;br /&gt;cd /etc/initramfs-tools/&lt;br /&gt;wget http://www.proweb.co.uk/~matt/aoe/hooks -O hooks/aoetools&lt;br /&gt;wget http://www.proweb.co.uk/~matt/aoe/scripts -O scripts/aoetools&lt;br /&gt;chmod 755 hooks/aoetools scripts/aoetools&lt;br /&gt;cp scripts/aoetools /tmp/initrd/scripts/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then make the initrd.img again&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd /tmp/initrd&lt;br /&gt;find . | cpio -o -H newc | gzip -9 &gt; /boot/initrd.aoe&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then get it off the machine and on to the TFTP server.&lt;br /&gt;&lt;code&gt;scp /boot/initrd.aoe /boot/vmlinuz-2.6.6.26-1.686 TFTP-server:/var/lib/tftpboot/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now to taste the pudding&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-5968328323404991346?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5968328323404991346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/5968328323404991346'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/03/installing-debian-5-for-migration-to.html' title='Installing Debian 5 to AoE'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-3370495505664173364</id><published>2009-02-27T10:55:00.009Z</published><updated>2009-03-02T13:27:16.671Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='nfs'/><title type='text'>NFS stole my afternoon</title><content type='html'>NFS is awful for using as part of the boot sequence. It's half ok once the thing is up, but mounting /usr and /var via NFS at boot was a fail.&lt;br /&gt;&lt;br /&gt;An afternoon wasted, thanks&lt;br /&gt;&lt;br /&gt;yay for AoE&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-3370495505664173364?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/3370495505664173364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=3370495505664173364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3370495505664173364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/3370495505664173364'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/02/serving-lenny-as-nfs.html' title='NFS stole my afternoon'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-923772293110720737</id><published>2009-02-26T17:14:00.005Z</published><updated>2009-02-27T10:54:59.882Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><title type='text'>Creating a vblade for Debian Lenny</title><content type='html'>Getting the right aoe.ko to install straight onto an aoe target is (probably) a lot of fannying&lt;br /&gt;And I think this is the starting point. At least now I know how to run Qemu better so I don't need to install onto a real PC&lt;br /&gt;&lt;br /&gt;Download the netinst iso from debian - debian-500-i386-netinst.iso &lt;br /&gt;&lt;br /&gt;make a qcow disk&lt;br /&gt;slap:/home/qemus# qemu-img create -f qcow lenny 4G&lt;br /&gt;Formatting 'lenny', fmt=qcow, size=4194304 kB&lt;br /&gt;&lt;br /&gt;I discovered you can specify a full IP for the vnc so you can expose it on the lan :)&lt;br /&gt;&lt;br /&gt;slap:/home/qemus# qemu -hda lenny -cdrom debian-500-i386-netinst.iso -boot d -vnc 10.0.0.1:3  &lt;br /&gt;&lt;br /&gt;vnc into it, install as normal&lt;br /&gt;slightly concerned one sets the hostname at install. I must find out how to change that later.&lt;br /&gt;I'm going to split the partitions up so I can serve / /usr /home /tmp swap and /var from different targets. I'm thinking it *might* be possible to mount them ro so multiple comps can read the same vblade&lt;br /&gt; 4 hours later and it's still installing&lt;br /&gt;&lt;br /&gt;All installed, now to shift /usr /var /home to NFS targets&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-923772293110720737?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/923772293110720737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=923772293110720737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/923772293110720737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/923772293110720737'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/02/creating-vblade-for-debian-lenny.html' title='Creating a vblade for Debian Lenny'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-8467523850746088851</id><published>2009-02-26T14:03:00.007Z</published><updated>2009-03-06T17:48:02.312Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='vde'/><category scheme='http://www.blogger.com/atom/ns#' term='tun'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='tap'/><category scheme='http://www.blogger.com/atom/ns#' term='kqemu'/><title type='text'>Qemu installation</title><content type='html'>I aptituded &lt;br /&gt;Setting up kqemu-common (1.3.0~pre11-8) and qemu (0.9.1-10) &lt;br /&gt;&lt;br /&gt;and it added a load of extras, vde2 included&lt;br /&gt;&lt;br /&gt;I had to add kqemu-source&lt;br /&gt;It depended gcc et al and kernel headers&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cd /usr/src&lt;br /&gt;&lt;br /&gt;tar -jxvf kqemu-source.tar.bz2&lt;br /&gt;cd modules/kqemu&lt;br /&gt;aptitude linux-headers-2.6.26-686 and dependents&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;insmod kqemu.ko&lt;br /&gt;&lt;br /&gt;echo keqmu &gt;&gt; /etc/modules&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;add tap0 to /etc/network/interfaces&lt;br /&gt;&lt;br /&gt;&lt;code&gt;auto lo eth0 eth1 tap0&lt;br /&gt;&lt;br /&gt;iface tap0 inet static&lt;br /&gt;        address 192.168.254.254&lt;br /&gt;        netmask 255.255.255.0&lt;br /&gt;        network 192.168.254.0&lt;br /&gt;        broadcast 192.168.254.255&lt;br /&gt;&lt;br /&gt;echo tun &gt;&gt; /etc/modules&lt;br /&gt;&lt;br /&gt;maht@slap:~/storm_bin$ cat /etc/service/w2k/run&lt;br /&gt;&lt;br /&gt;#!/usr/local/plan9/bin/rc&lt;br /&gt;&lt;br /&gt;vdeq qemu -boot c -m 256 -hda /home/qemus/w2k -localtime -k en-us -net 'nic,macaddr=00:99:99:99:02:01,vlan=0' -net 'vde,vlan=0' -vnc 10.0.0.1:21 -win2k-hack -usbdevice tablet -snapshot&lt;/code&gt;&lt;br /&gt;so, all done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-8467523850746088851?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/8467523850746088851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=8467523850746088851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8467523850746088851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/8467523850746088851'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/02/qemu-installation.html' title='Qemu installation'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3062883415508658133.post-158210408843097041</id><published>2009-02-25T10:54:00.005Z</published><updated>2009-12-19T12:38:01.102Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>SSH config - getting protocol 1 to work</title><content type='html'>slap:/etc/ssh# ed /etc/ssh/sshd_config&lt;br /&gt;/^Proto  &lt;br /&gt;s/^.*/Protocol 2,1&lt;br /&gt;/dsa&lt;br /&gt;a&lt;br /&gt;# HostKey for protocol version 1&lt;br /&gt;HostKey /etc/ssh/ssh_host_key&lt;br /&gt;.&lt;br /&gt;w&lt;br /&gt;q&lt;br /&gt;&lt;br /&gt;slap:/etc/ssh# ssh-keygen -t rsa1&lt;br /&gt;Generating public/private rsa1 key pair.&lt;br /&gt;Enter file in which to save the key (/root/.ssh/identity): /etc/ssh/ssh_host_key&lt;br /&gt;Enter passphrase (empty for no passphrase):&lt;br /&gt;Enter same passphrase again:&lt;br /&gt;Your identification has been saved in /etc/ssh/ssh_host_key.&lt;br /&gt;Your public key has been saved in /etc/ssh/ssh_host_key.pub.&lt;br /&gt;&lt;br /&gt;slap:/etc/ssh#  kill `ps axw | grep sbin/sshd | grep -v grep | awk ' { print $1} '` &amp;&amp; /usr/sbin/sshd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3062883415508658133-158210408843097041?l=maht0x0r.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maht0x0r.blogspot.com/feeds/158210408843097041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3062883415508658133&amp;postID=158210408843097041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/158210408843097041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3062883415508658133/posts/default/158210408843097041'/><link rel='alternate' type='text/html' href='http://maht0x0r.blogspot.com/2009/02/ssh-config-getting-protocol-1-to-work.html' title='SSH config - getting protocol 1 to work'/><author><name>Maht</name><uri>http://www.blogger.com/profile/01863908675256558774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
