This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Get depot_tools. | |
command -v gclient >/dev/null 2>&1 || | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
cat >> $HOME/.bashrc <<EOF | |
# Added by $(basename $0) | |
export PATH=$PWD/depot_tools:$PATH | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = require('x-1.3'); | |
var foo = require('foo'); | |
// Doesn't work because x is expecting v1.2 of the Thing interface. | |
foo.wiggle(x.makeThing()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var visits = []; | |
var count = 0; | |
(function getVisits() { | |
visits = visits.concat(Array.prototype.slice.call(document.querySelectorAll('.title a'))); | |
console.log(visits.length + ' visits'); | |
if (++count < 10) setTimeout(getVisits, 2000); // Stop after 10 pages. | |
$('older-button').click(); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoHotkey script to make life nicer when running Windows on a MacBook. | |
; Built and tested on my mid-2009 13" Unibody MacBook Pro, with Boot Camp 3.0. | |
; Written by Patrick Dubroy <pdubroy@gmail.com>; please enjoy and modify. | |
; For common key combinations, make Cmd-<key> the same as Ctrl-<key> | |
#c::^c ; Copy | |
#x::^x ; Cut | |
#v::^v ; Paste | |
#s::^s ; Save |