Skip to content

Instantly share code, notes, and snippets.

View ELLIOTTCABLE's full-sized avatar
🐫

ELLIOTTCABLE

🐫
View GitHub Profile
@ELLIOTTCABLE
ELLIOTTCABLE / gist:1326304
Created October 30, 2011 19:18
Awesome music that Spotify is missing
- “Piano Tune” by Bar 9
- “Champagne High” by Sister Hazel
- “I Am Willing” by Liquid Mind
- “I'm Still Here” by Vertical Horizon
- “In Your Eyes” by Peter Gabriel
- AC/DC (“Highway To Hell”)
- “Mission” by Beats Antique
- Teargas & Plateglass (“Arkhangelsk”)
- “Electric State” by Culprit 1
- “You Wish” by Nightmares On Wax
@symposion
symposion / README
Created October 15, 2011 15:34 — forked from cyberfox/keychain.rb
Convert OS X Keychain exported entries into logins for 1Password import
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
@bmeck
bmeck / gist:1214975
Created September 13, 2011 20:07
escape
vm=require('vm');
function alertMe() {
var Object = {}.constructor;
var o=Object.create(Error.prototype);
function stack(){
stack.caller.constructor('try{console.log("ez")}catch(e){}')();
return function() {return '0'};
};
var properties = {};
[
@ELLIOTTCABLE
ELLIOTTCABLE / gist:1176410
Created August 28, 2011 08:25
How Twitter replies *acutally work*. With proof.
<+elliottcable> fotoverite ⁓ Basically, there’s two situations in which a tweet from @A will not show up to
                person @C, who follows @A
<+elliottcable> 1. if the tweet *starts* with an @ character as the very first character, followed by at
                least one legal username character
<+elliottcable> 2. if the tweet is marked as a “reply̦” to another tweet, with the in_reply_to_status_id
                property
<+elliottcable> now, neither of the above apply *if* @A is *also* following the third person, @B (for
                instance, if the tweet *started* with @B, or if the in_reply_to_status_id was a tweet by @B.)
<+elliottcable> That is the *entirety of how it works*.

<+elliottcable> It’s a very long-standing belief that if you stick something before the @ at the start of a

@mbbx6spp
mbbx6spp / t4r-client-examples.rb
Created August 28, 2011 02:37
Examples of using Twitter4R (Ruby gem library to access the Twitter.com REST and Search APIs).
# Below are examples of how to initialize and use a Twitter::Client object for each Twitter user
# Can initialize by passing in Hash of oauth_access information for the authenticated user driving calls
# through Twitter4R
twitter = Twitter::Client.new(:oauth_access => {
:key => ACCESS_KEY, :secret => ACCESS_SECRET })
# Can also initialize by loading in file configuration file and specifying YAML key name to use for user:
twitter = Twitter::Client.from_config("file/name/to/config.yml", "key") # YAML file will look like twitter.yml
##### STATUS APIs ######
@ThisIsMissEm
ThisIsMissEm / gist:938580
Created April 23, 2011 12:52
Simplistic API router for Connect
var connect = require('connect'),
fs = require('fs'),
path = require('path');
function _rr(file) {
var modules = {};
var files = fs.readdirSync(file);
files.map(function(_file) {
var filepath = path.join(file, _file);
@ELLIOTTCABLE
ELLIOTTCABLE / sodomy.c
Created March 29, 2011 02:05
Sodomizing ISO C for fun and profit.
// The upshot: (in legal, sane(?) ISO C99)
type v = Namespace__foo_bar(.first = 123, .third = "non-default value!");
/* We want a function (macro.) that appears to take “named arguments,” by preprocessing into a designated
* initializer directly at the position of the function call, post-processing.
*/
// This portion is all, effectively, a neat way to define default, named arguments.
@AlanQuatermain
AlanQuatermain / gist:830865
Created February 17, 2011 02:59
All the external private APIs referenced by iBooks.app version 1.2.1
From PrivateFrameworks/Bom.framework:
U _BOMCopierCopyWithOptions
U _BOMCopierCountFilesInArchive
U _BOMCopierFree
U _BOMCopierNew
U _BOMCopierSetCopyFileFinishedHandler
U _BOMCopierSetCopyFileStartedHandler
U _BOMCopierSetCopyFileUpdateHandler
U _BOMCopierSetFatalErrorHandler
U _BOMCopierSetFatalFileErrorHandler
@ezmobius
ezmobius / gist:807334
Created February 2, 2011 06:37
Run this script on a mac osx box running 10.6 and you will get a luajit with batteries included and all the good libs
#!/bin/bash
# have to hand install this one sorry http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz
if [ "$1" == "cleanup" ]; then
echo "Cleaning up old luajit install"
cd /usr/local/share
sudo rm -rf lua luajit-2.0.0-beta6
@basham
basham / nodejs-rfid.js
Last active May 1, 2024 12:56
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