Skip to content

Instantly share code, notes, and snippets.

View TooTallNate's full-sized avatar

Nathan Rajlich TooTallNate

View GitHub Profile
@othiym23
othiym23 / gist:3050224
Created July 5, 2012 00:10
Getting SmartOS working under vmware

If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.

Running SmartOS under vmware Fusion

  1. Start by downloading the latest live image
  2. When you run the new VM wizard, select "Continue without disk" on the first screen of the wizard.
  3. Select Sun Solaris / Solaris 10 64-bit on the next screen.
  4. You're going to get dumped to a config screen when the live image starts up, choose DHCP for the networking and defaults for everything else.
  5. Pretty much the first thing you're going to want to do is figure out how to SSH into the box once it boots and creates its storage pools, because trying to do stuff in the virtual console is miserable. There's no cut and paste
@JerrySievert
JerrySievert / gist:3119325
Created July 16, 2012 00:08
Working Node.js on Raspberry Pi
These instructions should be deprecated at this point.
Start following https://github.com/TooTallNate/node/tree/pi for a more straightforward node installation on the pi.
----
These instructions work for the Raspberry Pi running Raspbian (hard float), and include a working NPM:
1. Install Raspbian - http://www.raspbian.org/PiscesImages
@statico
statico / gist:3172711
Created July 24, 2012 21:15
How to use a PS3 controller on Mac OS X 10.7 (Lion)

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@TooTallNate
TooTallNate / index.js
Created August 3, 2012 21:09
The "Kart Randomizer": mode, characters, and levels randomizer for Mario Kart 64
var characters = [
'Donkey Kong',
'Wario',
'Mario',
'Luigi',
'Peach',
'Toad',
'Bowser',
'Yoshi'
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@TooTallNate
TooTallNate / README.md
Last active October 8, 2015 18:38
Forward port 80 traffic from 127.0.0.1 to port 3000 at bootup on OS X

Copy this file to: /Library/LaunchDaemons/fwd-80-to-3000.plist and then reboot:

$ sudo -s
$ curl -L https://gist.github.com/TooTallNate/3372589/raw/ace6451e9e47f59550f12d09cb924a64531cfd1f/fwd-80-to-3000.plist > /Library/LaunchDaemons/fwd-80-to-3000.plist
$ reboot
@TooTallNate
TooTallNate / stations.json
Created October 30, 2012 21:59
Icecast radio stations that are good
{
"Phish Live Radio": "http://radio.nugs.net:8002",
"GDRadio.net": "http://sc1-fmt.spacialnet.com:26260",
"4 Ever Floyd": "http://99.198.112.59:8000"
}
@TooTallNate
TooTallNate / node_pointer.h
Last active April 7, 2016 02:03
C helper functions for wrapping and unwrapping Node Buffer instances as "pointers"
/*
* Helper functions for treating node Buffer instances as C "pointers".
*/
#include "v8.h"
#include "node_buffer.h"
/*
* Called when the "pointer" is garbage collected.
/* does effectively this, but without all that fancy
* stream mumbo jumbo:
var net = require('net');
var server = net.createServer(function(socket) {
socket.pipe(socket);
});
server.listen(PORT, function() {