Skip to content

Instantly share code, notes, and snippets.

View guybrush's full-sized avatar

Patrick guybrush

View GitHub Profile
@guybrush
guybrush / index.js
Last active December 20, 2015 14:19 — forked from shama/index.js
var Context = typeof webkitAudioContext == 'undefined'
? AudioContext
: webkitAudioContext
var master = new Context
var jsynth = require('jsynth')
var tune = require('tune')
var ff = [];
[
'C D E G',
@guybrush
guybrush / n+npm
Created April 21, 2011 22:48 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
git clone https://github.com/visionmedia/n.git /tmp/n
cd /tmp/n
sudo make install
sudo n 0.4.6
sudo git clone --recursive http//github.com/isaacs/npm.git /tmp/npm
sudo node /tmp/npm/cli.js install -g --prefix=/usr/local
  • 4 space indentation

  • 80 character max per line

  • if's always have space before braces

  • if's always have braces

      if () {
        return;
      }
    
  • exception: if (err) throw err;

#!/usr/local/bin/node
var sys = require('sys'),
http = require('http'),
querystring = require('querystring'),
base64 = require('./lib/base64'),
Buffer = require('buffer').Buffer,
Irc = require('./vendor/IRC/lib/irc');
var twitter_auth = { user: "<YOUR_TWITTER_USERNAME>", pass: "<YOUR_TWITTER_PASSWORD>"};
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- According to Heather Champ, former community manager at flickr,
you should not allow search engines to index your "Contact Us"