<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Schadenfreude &#187; script</title>
	<atom:link href="http://www.ralree.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Greasemonkey Script to get Jabber Room for Google Group Chat</title>
		<link>http://www.ralree.com/2009/03/15/greasemonkey-script-to-get-jabber-room-for-google-group-chat/</link>
		<comments>http://www.ralree.com/2009/03/15/greasemonkey-script-to-get-jabber-room-for-google-group-chat/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 03:23:28 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gchat]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google chat]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pidgin]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22468</guid>
		<description><![CDATA[So, today I was invited to Google Group chat for the first time. This would be really cool on a terminal that&#8217;s not equipped with an IM client, since it&#8217;s all done through the web with flash and magic. But, since I don&#8217;t like having 2 IM clients running at the same time (Pidgin and the Flash one from Google), I decided I needed to rip out the Jabber Group Chat Room name from the invite page. I got some [...]]]></description>
			<content:encoded><![CDATA[<p>So, today I was invited to Google Group chat for the first time.  This would be really cool on a terminal that&#8217;s not equipped with an IM client, since it&#8217;s all done through the web with flash and magic.  But, since I don&#8217;t like having 2 IM clients running at the same time (Pidgin and the Flash one from Google), I decided I needed to rip out the Jabber Group Chat Room name from the invite page.  I got some tips from <a href="http://mkokotovich.blogspot.com/2007/12/google-talk-groupchat.html">this site</a>, and wrote a Greasemonkey script to do so.</p>
<p><a href="http://www.ralree.com/newblog/wp-content/uploads/2009/03/whoa.jpg"><img class="aligncenter size-full wp-image-22469" title="whoa" src="http://www.ralree.com/newblog/wp-content/uploads/2009/03/whoa.jpg" alt="whoa" width="531" height="271" /></a></p>
<p>All you have to do is copy the room name into the <strong>Join Chat</strong> window, and put in <strong>groupchat.google.com</strong> as the server.  I hope you find it useful.  If anyone knows how to make this a link that GNOME will throw at Pidgin, let me know.  That would be awesome.</p>
<h2><a href="http://github.com/hank/life/raw/6b085700963110559c3dca29a94a701a2f0ec2df/code/greasemonkey/google_talk_chat_channel.user.js">Get the Script</a></h2>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/03/15/greasemonkey-script-to-get-jabber-room-for-google-group-chat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS for bash</title>
		<link>http://www.ralree.com/2008/03/31/dns-for-bash/</link>
		<comments>http://www.ralree.com/2008/03/31/dns-for-bash/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 01:16:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[camping]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[_why]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2008/03/31/dns-for-bash</guid>
		<description><![CDATA[Today, I decided I wanted a network service that propagated variables and aliases to every login shell that subscribed to it. This is dangerous on a large scale, but perfectly acceptable on my small home network where everyone trusts everyone else. First, I got Camping installed, bringing back fond memories of Ruby development. I then copied off the blog example, and created TreeHugger, a 427 line script that provides a web interface to edit the variables, and a plain text [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I decided I wanted a network service that propagated variables and aliases to every login shell that subscribed to it.  This is dangerous on a large scale, but perfectly acceptable on my small home network where everyone trusts everyone else.</p>
<p>First, I got <a href="http://code.whytheluckystiff.net/camping">Camping</a> installed, bringing back fond memories of Ruby development.  I then copied off the blog example, and created TreeHugger, a 427 line script that provides a web interface to edit the variables, and a plain text output for the shells to source.  </p>
<p><a href="http://modzer0.cs.uaf.edu/repos/hank/code/ruby/treehugger.rb">This script</a>, when run, allows some simple MVC actions to an sqlite3 database.</p>
<p><img src="http://ralree.com/assets/2008/3/31/screenshot2.png" alt="Example Screenshot"/></p>
<p>As you can see, I have some aliases here I want to send to all the subscribing hosts.  Eventually, I want to add some detection functionality to the database (mostly reverse DNS lookups for host rule referencing).  I just have to access <code>/out</code> to get my desired output:</p>
<pre><code>
# Treehugger Configuration
# Aliases
alias ai='sudo apt-get install'
alias aup='sudo apt-get update'
alias aug='sudo apt-get upgrade'

# Environment Variables
</code></pre>
<p>Now, to get this into bash.  I looked into making the <code>date</code> command spit out pretty unique timestamps.  Turns out you can do this with the nanoseconds format:</p>
<pre><code>
$ date +%s%N
1206926780157462141
</code></pre>
<p>I made it so <code>wget</code> saves the treehugger config to a tempfile using the somewhat random seed above as a filename suffix, and then I have my shell source it:</p>
<pre><code>
FILENAME=/tmp/treehugger-`date +%s%N`; 2&gt;/dev/null wget -O $FILENAME  http://rofl.who/treehugger/out &#038;&#038; source $FILENAME &#038;&#038; rm $FILENAME
</code></pre>
<p>And now I have nice aliases on my laptop served up from my desktop as fresh as the shell:</p>
<pre><code>
hank@davros:~$ alias
alias ai='sudo apt-get install'
alias aug='sudo apt-get upgrade'
alias aup='sudo apt-get update'
alias ls='ls --color=auto'
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/03/31/dns-for-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

