Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Rajlich TooTallNate

View GitHub Profile
View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
View browserify_for_webpack_users.markdown

browserify for webpack users

There's been a strange explosion in misinformation about browserify recently, particularly in comparisons to webpack.

Generally speaking, most of this confusion stems from how webpack is more willing to pull features into its core to ease discoverability while browserify is more likely to push features out to userland instead.

I think that longer-term, separability has more benefits from a maintenance and

View gogoinflight.md

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file
@kujohn
kujohn / portforwarding.md
Last active Nov 8, 2020
Port forwarding in Mavericks
View portforwarding.md

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@daniel-j
daniel-j / spotify.js
Last active Oct 4, 2020
A simple node.js program to listen to Spotify tracks, albums and playlists
View spotify.js
#!/usr/bin/env node
'use strict';
/*
This is a simple Spotify cli-based client with optional Icecast2/shout support!
It should work for non-premium users, but you must connect your Spotify account to Facebook.
Usage:
$ node spotify <spotify uris> <playlist uri> <album uri> <track uri> <etc...>
View tcp-raw.js
/* 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() {
@TooTallNate
TooTallNate / node_pointer.h
Last active Apr 7, 2016
C helper functions for wrapping and unwrapping Node Buffer instances as "pointers"
View node_pointer.h
/*
* Helper functions for treating node Buffer instances as C "pointers".
*/
#include "v8.h"
#include "node_buffer.h"
/*
* Called when the "pointer" is garbage collected.
@TooTallNate
TooTallNate / stations.json
Created Oct 30, 2012
Icecast radio stations that are good
View stations.json
{
"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 / README.md
Last active Oct 8, 2015
Forward port 80 traffic from 127.0.0.1 to port 3000 at bootup on OS X
View README.md

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
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

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:

You can’t perform that action at this time.