Skip to content

Instantly share code, notes, and snippets.

View mbmccormick's full-sized avatar

Matt McCormick mbmccormick

View GitHub Profile
@mbmccormick
mbmccormick / gist:1273145
Created October 9, 2011 01:18
Install Hamachi VPN on the PogoPlug USB Device (Part 2)
wget http://mbmccormick.com/files/pogoplug/libstdc++.tar.gz
wget http://mbmccormick.com/files/pogoplug/openssl.tar.gz
@mbmccormick
mbmccormick / gist:1273146
Created October 9, 2011 01:19
Install Hamachi VPN on the PogoPlug USB Device (Part 3)
tar -zxvf openssl.tar.gz
cp usr/lib/libcrypto.so /usr/lib/
cp usr/lib/libcrypto.so.0 /usr/lib/
cp usr/lib/libcrypto.so.0.9.8 /usr/lib/
cp usr/lib/libssl.so /usr/lib/
cp usr/lib/libssl.so.0 /usr/lib/
cp usr/lib/libssl.so.0.9.8 /usr/lib/
ln -sf /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.7
@mbmccormick
mbmccormick / gist:1273148
Created October 9, 2011 01:20
Install Hamachi VPN on the PogoPlug USB Device (Part 4)
tar -zxvf libstdc++.tar.gz
cp usr/lib/libstdc++.so /usr/lib/
cp usr/lib/libstdc++.so.6 /usr/lib/
cp usr/lib/libstdc++.so.6.0.9 /usr/lib/
@mbmccormick
mbmccormick / gist:1273151
Created October 9, 2011 01:20
Install Hamachi VPN on the PogoPlug USB Device (Part 5)
wget http://files.hamachi.cc/linux/nokia-770/hamachi-0.9.9.9-20-lnx-n770.tar.gz
tar -zxvf hamachi-0.9.9.9-20-lnx-n770.tar.gz
cp hamachi /usr/bin/hamachi
cp tuncfg/tuncfg /sbin/tuncfg
chmod 755 /usr/bin/hamachi
chmod 700 /sbin/tuncfg
ln -sf /usr/bin/hamachi /usr/bin/hamachi-init
mkdir /var/run/
@mbmccormick
mbmccormick / gist:1273152
Created October 9, 2011 01:21
Install Hamachi VPN on the PogoPlug USB Device (Part 6)
ln -sf /bin/ifconfig /sbin/ifconfig
tuncfg
hamachi-init
hamachi start
hamachi login
@mbmccormick
mbmccormick / gist:1273155
Created October 9, 2011 01:21
Install Hamachi VPN on the PogoPlug USB Device (Part 7)
echo "KeepAlive 20" >> /root/.hamachi/config
@mbmccormick
mbmccormick / gist:1273156
Created October 9, 2011 01:22
Install Hamachi VPN on the PogoPlug USB Device (Part 8)
cd /etc/init.d/
wget http://mbmccormick.com/files/pogoplug/hamachi.sh
chmod 777 hamachi.sh
echo "/etc/init.d/hamachi.sh start" >> /etc/init.d/rcS
@mbmccormick
mbmccormick / gist:1335716
Created November 3, 2011 03:40
Update Weather script to support "natural language" replies, specify temperature format
robot.respond /weather(?: me|for|in)?\s(.*)/, (msg) ->
query msg, (body, err) ->
return msg.send err if err
city = body.getElementsByTagName("city")[0]
return msg.send "Sorry, but you didn't specify a location." if not city or not city.getAttribute
city = city.getAttribute("data")
currentCondition = body.getElementsByTagName("current_conditions")[0].getAttribute("data")
conditions = body.getElementsByTagName("current_conditions")[0].getElementsByTagName("condition")[0].getAttribute("data")
@mbmccormick
mbmccormick / gist:1345302
Created November 7, 2011 15:40
Override navigation links, dynamically load content, transition to replace content
$("aside a.logo, nav ul li a").live("click", function(e) {
if ((e.which == 1 && !e.metaKey && !e.shiftKey) == false)
return true;
history.pushState("", "", this.href);
$("body").css("cursor", "progress");
$(".main").after("<section class='right'></section>");
@mbmccormick
mbmccormick / gist:1345316
Created November 7, 2011 15:45
Handle browser's back button, dynamically load content, transition to replace content
$(window).bind("popstate", function() {
$("body").css("cursor", "progress");
$(".main").after("<section class='left'></section>");
$(".left").load(location.pathname + " .main>*", function() {
if ($(".left h1").text().length > 0)
document.title = "Matt McCormick - " + $(".left h1").text();
else
document.title = "Matt McCormick";