This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code snippet courtesy of http://muness.blogspot.com/2009/01/no-network-after-copying-ubuntu-vmware.html | |
# Apparently, Ubuntu persists the MAC address of the network device | |
sudo rm /etc/udev/rules.d/*net.rules | |
sudo shutdown -r now #to reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code fixes the error: | |
# undefined method `relative_url_root' for SessionsController:Class | |
def requested_url | |
relative_url_root = self.class.respond_to?(:relative_url_root) ? self.class.relative_url_root.to_s : request.relative_url_root | |
"#{request.protocol + request.host_with_port + relative_url_root + request.path}" | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var BackButton = { | |
init: function() { | |
if (this.sampleFunction()) { | |
$('.backbutton').click(this.backButtonEvent); | |
} | |
}, | |
sampleFunction: function() { | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Test Page</title> | |
</head> | |
<body> | |
<p id="paragraph1">This is a list of key-value pairs</p> | |
<p id="paragraph2"></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'erubis' | |
require 'json' | |
get '/index' do | |
erb :index | |
end | |
get '/data.json' do | |
sleep 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 | |
* http://benalman.com/ | |
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
(function($) { | |
var o = $({}); | |
$.subscribe = function() { | |
o.on.apply(o, arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
lockfile=${TMPDIR}/link.lock | |
count=1; | |
while !(shlock -f "${lockfile}${count}" -p $$) do | |
let count=count+1; | |
if [ ${count} -eq 5 ]; then | |
let count=1; | |
sleep 1; | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Clojure wrapper script | |
# with no arguments runs Clojure's REPL | |
if [ -n "${CLOJURE_EXT:-}" ]; then | |
OLD="$IFS" | |
IFS=":" | |
EXT="$(find -H $CLOJURE_EXT -mindepth 1 -maxdepth 1 -print0 | tr \\0 \:)" | |
IFS="$OLD" | |
if [ -n "${CLASSPATH:-}" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-add-repository ppa:flexiondotorg/java | |
sudo apt-get update | |
sudo apt-get install sun-java6-jdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo brew install emacs --cocoa --srgb |
OlderNewer