Couldn't find the text of this for a while...
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 | |
## README | |
# To run this script | |
# => scp it to the server | |
# => run `sudo bash install.bash` | |
# Preparations | |
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list # MongoDB Prep | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 # MongoDB Prep |
A utility inspired by @ahoward that allows screens to be the name of the directory they were spawned from. This is mainly helpful for Terminal/iTerm tabs.
Executing this should rejoin sessions with the same name if they already exist or otherwise create them.
- Place or symlink into your path (I symlink as
ns
) - Ensure the script is executable
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
#!/usr/bin/env ruby | |
if fetched_file_blank? or fetched_file_expired? | |
fetch! | |
end | |
write_cached_screenfetch! | |
BEGIN { | |
COMMAND = 'screenfetch'.freeze |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; |
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
class Printer | |
attr_reader :printer | |
deftyped :initialize , :printer => [ Proc ] do | |
@printer = printer | |
end | |
deftyped :print , :string => { :splat => true , :type => String } do | |
printer.call string.join( ' ' ) | |
end |
- Update the iPad (v5.1.1?) to the latest iOS and make a backup using iTunes
- Install the sshpass program on your laptop. Ansible will need this to connect over ssh using a password.
- Jailbreak the iPad using redsn0w -- you now have Cydia
- Use Cydia to install "MobileTerminal", "OpenSSH", "Python", and "Setup Tools"
- Follow the "MobileTerminal" instructions in Cydia for changing the default passwords
- Locate your iPad's IP address by looking in Settings.app > Wi-Fi and clicking your connected networks detail ">" arrow
- SSH into your iPad and make sure you add IP address to list of known hosts
- Place IP address into an Ansible hosts file
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
# it's not critical for understanding | |
# but here is the associated server-side action | |
# | |
def version | |
@program = load_program! | |
@version = @program.versions.find(params[:version_id]) | |
if stale?(:last_modified => @version.updated_at, :etag => @version.cache_key) | |
render |
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
#!/usr/bin/env ruby | |
require 'drb' | |
require 'irb' | |
DRb.start_service | |
$context = DRbObject.new_with_uri('druby://localhost:9876') | |
IRB.start |
NewerOlder