Skip to content

Instantly share code, notes, and snippets.

View TooTallNate's full-sized avatar

Nathan Rajlich TooTallNate

View GitHub Profile
@bored-engineer
bored-engineer / gcc.sh
Created September 1, 2011 20:17
GCC dep/lib stuff
#!/bin/bash
working=$(mktemp -d);
mkdir -p "$working/usr/lib"
cp -R "$1/usr/lib/" "$working/usr/lib"
mkdir -p "$working/usr/include"
cp -R "$1/usr/include/" "$working/usr/include"
mkdir -p "$working/System/Library/PrivateFrameworks"
cp -R "$1/System/Library/PrivateFrameworks/" "$working/System/Library/PrivateFrameworks"
@tj
tj / Makefile
Created October 20, 2011 00:36
tiny bash test runner
TESTS = $(shell find test/test.*.js)
test:
@./test/run.sh $(TESTS)
.PHONY: test
@bored-engineer
bored-engineer / prepare.sh
Created December 4, 2011 18:09
Cross-compile settings for node.js
#! /bin/bash
unset CPATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
unset LIBS
unset DYLD_FALLBACK_LIBRARY_PATH
unset DYLD_FALLBACK_FRAMEWORK_PATH
@class EXApplication : UIApplication {
}
- tableView:table numberOfRowsInSection:section {
return 2;
}
- tableView:table cellForRowAtIndexPath:index {
var cell = [new UITableViewCell initWithStyle:UITableViewCellStyleDefault reuseIdentifier:"cell"];
[cell setText:([index row] == 0 ? "test" : "help")];
@rauchg
rauchg / ms.md
Created December 21, 2011 00:25
Milliseconds conversion utility.
@creationix
creationix / linux-node-joystick.js
Created January 28, 2012 21:49
Basic Linux Joystick support.
var FS = require('fs');
var EventEmitter = require('events').EventEmitter;
// http://www.mjmwired.net/kernel/Documentation/input/joystick-api.txt
function parse(buffer) {
var event = {
time: buffer.readUInt32LE(0),
number: buffer[7],
value: buffer.readInt16LE(4)
}
@tj
tj / ansi.js
Created February 9, 2012 01:26
var fg = {
30: 'fg-black'
, 31: 'fg-red'
, 32: 'fg-green'
, 33: 'fg-yellow'
, 34: 'fg-blue'
, 35: 'fg-magenta'
, 36: 'fg-cyan'
, 37: 'fg-white'
@sugyan
sugyan / play-codestream.js
Created April 3, 2012 08:06
play codestre.am video on your terminal
var sio = require('socket.io-client');
var socket = sio.connect('http://play.codestre.am/?id=' + '3Y');
console.log('connecting...');
socket.on('connect', function () {
console.log('connected.');
});
socket.on("frames", function (frames) {
process.stdout.write("\x1b[2J\x1b[1;1H");
var loop = function () {
/*
In a child process, each of the stdio streams may be set to
one of the following:
1. A new file descriptor in the child, dup2'ed to the parent and
exposed to JS as a Stream object.
2. A copy of a file descriptor from the parent, with no other
added magical stuff.
3. A black hole - no pipe created.
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)