Skip to content

Instantly share code, notes, and snippets.

Local setup
-----------
- `NEW_SERVER_NAME='bafflement'`
- `{mkdir, cd} ~/.ec2`
- https://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key#x509
- `mv ~/Downloads/*.pem ./`
- https://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
- `cp -r /Users/elliottcable/Downloads/ec2-api-tools-1.3-19403/{bin,lib} ./`
- `ec2-add-keypair $NEW_SERVER_NAME`
- `touch id_rsa-$NEW_SERVER_NAME`
@ELLIOTTCABLE
ELLIOTTCABLE / Paws resources.markdown
Created February 1, 2010 22:23
Some random Paws resources

Random Paws resources: (some of these are wildly out of date, with regard to syntax, semantics, or both… so skim with a grain of salt)

@ELLIOTTCABLE
ELLIOTTCABLE / hello_world.bewbs
Created May 16, 2010 02:17
Hello, world in Bewbs.
/* I wrote “Hello, world!” for whatever mad, mad genius wrote this version of Brainfuck: http://pastie.org/private/siw6uoan1cd6shuao7r8hw */
(.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] {.}[.] (.)(.) (.)[.] (.)[.] (.)[.] (.)[.]
(.)[.] (.)[.] (.)[.] (.)(.) (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)(.) (.)[.]
(.)[.] (.)[.] (.)(.) (.)[.] (.){.} (.){.} (.){.} (.){.} [.](.) [.]{.} (.)(.) (.)[.] (.)[.] [.][.] (.)(.) (.)[.]
[.][.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] [.][.] [.][.] (.)[.] (.)[.] (.)[.] [.][.] (.)(.) (.)[.]
(.)[.] [.][.] (.){.} (.){.} (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.]
(.)[.] (.)[.] (.)[.] [.][.] (.)(.) [.][.] (.)[.] (.)[.] (.)[.] [.][.] [.](.) [.](.) [.](.) [.](.) [.](.) [.](.)
[.][.] [.](.) [.](.) [.](.) [.](.) [.](.) [.](.) [.](.) [.](.) [.][.] (.)(.) (.)[.] [.][.] (.)(.) [.][.]
@ELLIOTTCABLE
ELLIOTTCABLE / .gitignore
Created May 31, 2010 08:17
ItBacksUpYourFuckingTweets
*.json
*.log
@ELLIOTTCABLE
ELLIOTTCABLE / Google Wave.user.js
Created July 21, 2010 07:55
Google Wave userscript for Fluid.app
// ==UserScript==
// @name Google Wave
// @namespace http://ell.io
// @description Fluid.app: Growl notifications and Dock badges for Google’s Wave web-client (includes support for
// both Google Wave *and* GAFYD Wave installations). Also provides seperate notifications for
// unread waves, and unread “pings.”
// @include https://wave.google.com/wave/*
// @include https://wave.google.com/a/*
// @author elliottcable <http://elliottcable.name>
// @copyright Copyright ©2010 elliottcable, all rights reserved.
@ELLIOTTCABLE
ELLIOTTCABLE / gist:488236
Created July 24, 2010 00:10
instanceEval for JavaScript
var instanceEval, origArgs
// This approach, by Tim Caswell (creationix) coerces the input function into a string, ensuring said function
// will be called with `instanceEval()`’s `this`, and then `with()`s that input function against `this` as well.
// This exposes the keys attached to the `this` you call `instanceEval()` on as variables within the input
// function.
instanceEval = function (input) {
if (typeof(input) === "function") input = "("+input+").call(this)"; return eval("with(this){"+input+"}") }
;(function(){ var first = "Bob", middle = "Johnathan", last = "Smith"
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
require 'net/http'
extensions = %w(jpg png jpeg gif)
URLs = Array.new; puts "Gimmie sum urlzorz: (newline to complete)"
while (url = STDIN.gets.chomp) =~ %r http:// ; URLs << url; end
artist = nil; DERP = Class.new(StandardError)
URLs.each do|url| begin raise DERP if artist.nil?
d, number = url.match( %r http://(?:www.)?([^/]+)/pic-(\d+).html )[1,2]
domain = "pictures.#{d}"
@apeiros
apeiros / examples.rb
Created January 15, 2011 23:19
A generic smaller/bigger implementation, for things like infinite ranges etc.
(1..Bigger).first(5) # => [1, 2, 3, 4, 5]
@basham
basham / nodejs-rfid.js
Last active July 17, 2023 04:06
Use NodeJS to read RFID ids through the USB serial stream.
/*
DESCRIPTION
-----------
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum:
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699
CODE REPOSITORY
---------------
https://gist.github.com/806605