This file contains hidden or 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
map.with_options :controller => 'user_sessions' do |session| | |
session.callback '/callback', :action => 'callback' | |
session.logout '/logout', :action => 'destroy' | |
session.login '/login', :action => 'new' | |
end |
This file contains hidden or 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
#! /usr/bin/ruby | |
## Elliott Kember's Delete MM_ Script. | |
# I bet you thought I wouldn't write this! | |
## Usage: | |
# $ ruby dreamcatcher.rb emailaddress password | |
## dreamcatcher.rb |
This file contains hidden or 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
# Tested on Ubuntu 8.10 | |
apt-get update | |
# Git | |
apt-get install git-core -y | |
# Apache |
This file contains hidden or 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
/* Elliott Kember's jSnake, version 3 */ | |
// Usage: new Snake() | |
// Adding options: new Snake({ width: 30, mouse_chasing: true }) | |
// TODO: Add list of options | |
// Compass bearings for directions | |
UP = 0; | |
RIGHT = 90; | |
DOWN = 180; | |
LEFT = 270; |
This file contains hidden or 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
$(document).ready(function(){ | |
if($.browser.safari){ | |
height = parseInt($('#wrapper').css('height')); | |
number = height / 100; | |
for(i=0;i<number;i++){ | |
$("<a name="+i+"></a>").css('position','absolute').css('top', i*100+'px').appendTo($('body')); | |
} | |
} | |
}) |
This file contains hidden or 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
// Thanks to Joshua Hatfield (@fjhat) for the pluginizing! | |
(function($){ | |
$.fn.ek3d = function(options) { | |
var defaults = { | |
strength: 5, | |
hex: '#aaaaaa' | |
}; | |
This file contains hidden or 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
.outline-disclosure li {padding: 1px 0 1px 14px;} | |
body.platform-mac.platform-mac-snowleopard .monospace, | |
body.platform-mac.platform-mac-snowleopard .source-code {font-family: 'Lucida Grande', monospace;} |
This file contains hidden or 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
beforemovenode: function (tree, node, oldParent, newParent, index) { | |
var self = this; | |
self.moved = false; | |
self.ready = false; | |
Ext.Msg.confirm('', '', function (button) { | |
if (button === 'yes') { | |
$.ajax({ | |
async: false, | |
url: CMS.BaseUrl() + 'pfCMSTree/moveNode/', |
This file contains hidden or 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
# In your crontab: | |
* * * * * ruby ~/run.rb | |
# in ~/run.rb | |
12.times do | |
uptime = `uptime`.split(' ')[-3] | |
user = `whoami`.sub("\n", '') | |
# Optionally, use the following line to customize your username | |
# user = "@YOUR-TWITTER-NAME" | |
`curl http://loadaverages.elliottkember.com/statistics -s -d statistic\\[computer_id\\]=#{user}\\&statistic\\[uptime\\]=#{uptime}` |
This file contains hidden or 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
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c" | |
autodetach on # Autodetach session on hangup instead of terminating screen completely | |
startup_message off # Turn off the splash screen | |
defscrollback 30000 | |
term screen-256color | |
# terminfo and termcap for nice 256 color terminal | |
# allow bold colors - necessary for some reason |
OlderNewer