<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: shell code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 08 Aug 2008 03:27:33 GMT</pubDate>
    <description>DZone Snippets: shell code</description>
    <item>
      <title>Console keyboard scheme switcher</title>
      <link>http://snippets.dzone.com/posts/show/1901</link>
      <description>Switches between us and swedish (or any other)&lt;br /&gt;keyboard-scheme in the console. Default is US.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;# Keyboard switcher script&lt;br /&gt;# Written in 2006 by Davor Babic &lt;davorb@gmail.com&gt;&lt;br /&gt;# This software is realeased into public domain&lt;br /&gt;&lt;br /&gt;case $1 in&lt;br /&gt;sv)&lt;br /&gt;    echo "Switching to swedish keyboard layout."&lt;br /&gt;    loadkeys /usr/share/keymaps/i386/qwerty/se-latin1.kmap.gz&lt;br /&gt;    ;;&lt;br /&gt;us)&lt;br /&gt;    echo "Switching to US keyboard layout."&lt;br /&gt;    loadkeys /usr/share/keymaps/i386/qwerty/us.kmap.gz&lt;br /&gt;    ;;&lt;br /&gt;default)&lt;br /&gt;    echo "None selected. Loading US..."&lt;br /&gt;    loadkeys /usr/share/keymaps/i386/qwerty/us.kmap.gz&lt;br /&gt;    ;;&lt;br /&gt;esac&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 12 Apr 2006 04:20:52 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1901</guid>
      <author>davor (Davor Babic)</author>
    </item>
    <item>
      <title>Digg/RSS Reader</title>
      <link>http://snippets.dzone.com/posts/show/1900</link>
      <description>Grabs the RSS-feed from digg.com and reads it out&lt;br /&gt;loud using festival.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;# Copyright (c) 2005 Davor Babic &lt;davorb@gmail.com&gt;&lt;br /&gt;# All rights reserved.&lt;br /&gt;# Usage of the works is permitted provided that this&lt;br /&gt;# instrument is retained with the works, so that any&lt;br /&gt;# entity that uses the works is notified of this&lt;br /&gt;# instrument.&lt;br /&gt;# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.&lt;br /&gt;&lt;br /&gt;url="http://digg.com/rss/index.xml"&lt;br /&gt;&lt;br /&gt;echo "Parsing RSS..."&lt;br /&gt;curl --silent "$url" | grep -E '(title&gt;|description&gt;)' | \&lt;br /&gt;        sed -n '4,$p' | \&lt;br /&gt;	sed -e 's/&lt;title&gt;//' -e 's/&lt;\/title&gt;//' -e 's/&lt;description&gt;/  /' \&lt;br /&gt;	    -e 's/&lt;\/description&gt;//' | head -5 &gt; digg &lt;br /&gt;echo "Reading..."&lt;br /&gt;festival --tts digg&lt;br /&gt;rm -rf ./digg&lt;br /&gt;echo "Done."&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 12 Apr 2006 04:18:53 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1900</guid>
      <author>davor (Davor Babic)</author>
    </item>
  </channel>
</rss>
