<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>CodeSnippets: bcrow</title>
    <link>http://codesnippets.joyent.com/rss</link>
    <pubDate>Tue, 15 Aug 2006 15:12:54 GMT</pubDate>
    <description>CodeSnippets: bcrow</description>
    <item>
      <title>Change the hostname in Mac OS X</title>
      <link>http://codesnippets.joyent.com/posts/show/627</link>
      <description>&lt;code&gt;sudo scutil --set HostName servername.example.com&lt;/code&gt;</description>
      <pubDate>Tue, 15 Aug 2006 15:12:54 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/627</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>How to extract all the files from an RPM package</title>
      <link>http://codesnippets.joyent.com/posts/show/557</link>
      <description>&lt;code&gt;&lt;br /&gt;rpm2cpio filename | cpio -i --make-directories&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 08 Jul 2006 14:35:24 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/557</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>how to use shfsmount as a normal user in Debian/Ubuntu</title>
      <link>http://codesnippets.joyent.com/posts/show/549</link>
      <description>&lt;code&gt;sudo chmod u+s /usr/bin/shfsmount /usr/bin/shfsumount&lt;/code&gt;</description>
      <pubDate>Tue, 04 Jul 2006 18:01:39 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/549</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>How to set a static IP in Ubuntu from the shell</title>
      <link>http://codesnippets.joyent.com/posts/show/319</link>
      <description>Edit &lt;code&gt;/etc/network/interfaces &lt;/code&gt; and adjust it to your needs (in this example setup I will use the IP address  192.168.0.100):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# This file describes the network interfaces available on your system&lt;br /&gt;# and how to activate them. For more information, see interfaces(5).&lt;br /&gt;&lt;br /&gt;# The loopback network interface&lt;br /&gt;auto lo&lt;br /&gt;iface lo inet loopback&lt;br /&gt;&lt;br /&gt;# This is a list of hotpluggable network interfaces.&lt;br /&gt;# They will be activated automatically by the hotplug subsystem.&lt;br /&gt;mapping hotplug&lt;br /&gt;        script grep&lt;br /&gt;        map eth0&lt;br /&gt;&lt;br /&gt;# The primary network interface&lt;br /&gt;auto eth0&lt;br /&gt;iface eth0 inet static&lt;br /&gt;        address 192.168.0.100&lt;br /&gt;        netmask 255.255.255.0&lt;br /&gt;        network 192.168.0.0&lt;br /&gt;        broadcast 192.168.0.255&lt;br /&gt;        gateway 192.168.0.1&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 10 Jan 2006 03:35:28 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/319</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>How to Rip a DVD in Ubuntu Linux</title>
      <link>http://codesnippets.joyent.com/posts/show/287</link>
      <description>&lt;p&gt;First, install Handbrake:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install nasm build-essential devscripts fakeroot&lt;br /&gt;mkdir ~/tmp&lt;br /&gt;cd tmp&lt;br /&gt;wget http://apt.cerkinfo.be/pool/main/x264/x264_0.0.20050906-1.diff.gz&lt;br /&gt;wget http://apt.cerkinfo.be/pool/main/x264/x264_0.0.20050906-1.dsc&lt;br /&gt;wget http://apt.cerkinfo.be/pool/main/x264/x264_0.0.20050906.orig.tar.gz&lt;br /&gt;dpkg-source -x x264_0.0.20050906-1.dsc&lt;br /&gt;cd x264-0.0.20050906/&lt;br /&gt;dpkg-buildpackage -rfakeroot&lt;br /&gt;cd ..&lt;br /&gt;sudo dpkg -i *.deb&lt;br /&gt;sudo apt-get install debhelper libgtk2.0-dev jam nasm liba52-dev libavcodec-dev libdvdcss2-dev libdvdread3-dev libfaac-dev libmpeg2-4-dev liblame-dev libmp4v2-dev libogg-dev libsamplerate-dev libvorbis-dev libwxgtk2.6-dev libx264-dev libxvidcore-dev&lt;br /&gt;wget http://handbrake.m0k.org/mirrors/m0k/HandBrake-0.6.2-src.tar.gz&lt;br /&gt;tar -xzvf HandBrake-0.6.2-src.tar.gz&lt;br /&gt;cd HandBrake-0.6.2&lt;br /&gt;jam&lt;br /&gt;sudo cp HBTest /usr/local/bin/handbrake&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;p&gt;Next, follow &lt;a href="http://ubuntuforums.org/showthread.php?t=85190" title="General - MPlayer compilation from CVS - Ubuntu Forums"&gt;the instructions from the Ubuntu Forums&lt;/a&gt; to compile and install MPlayer 2.0 from CVS.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now we can actually rip the DVD:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd ~/tmp&lt;br /&gt;handbrake -e xvid -E ac3 -2 -S 1400 -i /dev/cdrom -o MOVIENAME.avi&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Finally, split the DVD into two files:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mencoder -ovc copy -oac copy -endpos 700MB -o MOVIENAME.CD1.avi MOVIENAME.avi&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The output will finish with something like:&lt;/p&gt;&lt;br /&gt;&lt;code&gt;Video stream: 1297.378 kbit/s  (162172 B/s)  size: 638610165 bytes  3937.851 secs  94414 frames&lt;/code&gt;&lt;br /&gt;&lt;p&gt;Note the number of seconds (in this case: 3937).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mencoder -ovc copy -oac copy -ss NUMER_OF_SECONDS -o MOVIENAME.CD2.avi MOVIENAME.avi&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That's it!&lt;/p&gt;</description>
      <pubDate>Thu, 15 Dec 2005 22:24:10 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/287</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>Configure Ctrl-Alt-Del to open Gnome System Monitor</title>
      <link>http://codesnippets.joyent.com/posts/show/268</link>
      <description>&lt;code&gt;&lt;br /&gt;gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "&lt;Control&gt;&lt;Alt&gt;Delete"&lt;br /&gt;&lt;br /&gt;gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 24 Nov 2005 18:26:53 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/268</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>Fix permissions on a directory</title>
      <link>http://codesnippets.joyent.com/posts/show/247</link>
      <description>&lt;code&gt;&lt;br /&gt;chown -R youruser:youruser /thedirectory&lt;br /&gt;find /thedirectory -type f -exec chmod 0644 {} \;&lt;br /&gt;find /thedirectory -type d -exec chmod 0755 {} \;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 31 Oct 2005 04:28:03 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/247</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>Use Sun Java in Ubuntu Breezy</title>
      <link>http://codesnippets.joyent.com/posts/show/246</link>
      <description>Download the binary installer from &lt;a href="http://java.com/"&gt;Sun&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Make sure the universe and multiverse repositories are enabled.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sudo apt-get install fakeroot java-package java-common&lt;br /&gt;&lt;br /&gt;fakeroot make-jpkg --full-name "My Name" --email "me@example.com"&lt;br /&gt;&lt;br /&gt;sudo dpkg -i sun-j2re1.5_1.5.0+update05_i386.deb&lt;br /&gt;&lt;br /&gt;sudo update-alternatives --config java&lt;/code&gt;</description>
      <pubDate>Sun, 30 Oct 2005 08:11:38 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/246</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
    <item>
      <title>rsync for dummies</title>
      <link>http://codesnippets.joyent.com/posts/show/69</link>
      <description>&lt;code&gt;rsync -e ssh -av here/ there/&lt;/code&gt;</description>
      <pubDate>Mon, 27 Jun 2005 02:36:37 GMT</pubDate>
      <guid>http://codesnippets.joyent.com/posts/show/69</guid>
      <author>bcrow (Basil Crow)</author>
    </item>
  </channel>
</rss>
