View TidalAB.js
/*
Tidal A/B Test Script
So you want to see if you and your friends can hear the difference between
lossless streaming and 320kbps in Tidal? This script will help! Instructions:
1. Log in to the Tidal web player at http://listen.tidalhifi.com/
2. Set up a playlist with a handful of songs you like a lot. Here's mine:
tidal.com/playlist/28d66a7c-f29f-47b3-b062-ba06e4b8883b
2. In the code below, set `playlistTitle` to match the name of that playlist.
View git-good.md

Know what changes you're making, every step of the way

Give yourself as many chances as you can to catch your mistakes before you push them:

  1. Use an editor plugin like Sublime Text's GitGutter so you can always see which parts of a file you've changed. (More precisely, it shows the diff of the file between the working directory and HEAD.)
  2. Not sure whether to stage your unstaged changes? Use git diff with no arguments. It shows the difference between your working directory and the index.
  3. Not sure whether to commit your staged changes? Use git diff --staged. It shows the difference between your index and HEAD.
  4. When you decide to commit, use git commit --verbose, no -m, and take one last look at the changes in your editor. (Make sure it's got a nice Git Commit Message syntax, like the one in the Sublime Text Git package, so the list of changes is nice and colorized.) You can't edit the changes directl
View gist:3350746
# Old code
_temp.key for _temp in arr
# Shiny new code!
key for {key} in arr
View gist:2839176
mainWindow.menu("File", function(err, file) {
if(err) throw err;
file.openMenu(function(err, menu) {
if(err) throw err;
menu.item("Open", function(err, item) {
if(err) throw err;
item.click(function(err) {
if(err) throw err;
mainWindow.getChild(type('Window'), function(err, dialog) {
if(err) throw err;
View embedly-jquery.html
<!DOCTYPE>
<html>
<head>
<title>Page Title</title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://scripts.embed.ly/jquery.embedly.min.js"></script>
<script type="text/javascript">
$('document').ready(function(){
$('div.content').embedly({
maxWidth: 450,
View gist:2603860
$ gdb --args ./bin/node_g -e "require('fs').watch('a.txt', function(){});"
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........... done
(gdb) run
View gist:2603829
$ gdb --args ./bin/node_g -e "require('fs').watch('a.txt', function(){});"
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........... done
(gdb) run
View gist:2490150
$ gdb --args ./node_g -e "(require('fs')).watch('/Users/trevor/Desktop/a.txt', function(){});"
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........... done
(gdb) run
View gist:2485151
$ gdb --args node -e "(require('fs')).watch('a.txt', function(){});"
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........... done
(gdb) run
View gist:2484936
$ valgrind --leak-check=full node -e ""
==37555== Memcheck, a memory error detector
==37555== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==37555== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==37555== Command: node -e
==37555==
vex amd64->IR: unhandled instruction bytes: 0xCF 0xFA 0xED 0xFE 0x7 0x0 0x0 0x1
==37555== valgrind: Unrecognised instruction at address 0x1000.
==37555== at 0x1000: ??? (in /usr/local/Cellar/valgrind/3.7.0/lib/valgrind/vgpreload_core-amd64-darwin.so)
==37555== by 0x1000061D5: node::Start(int, char**) (in /usr/local/bin/node)