This file contains hidden or 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
// What up, @mdo. You'll need a recent version of jQuery. | |
// You can try this out by pasting it into the console on http://api.jquery.com/jQuery.ajax/ | |
window.repoCallback = function (obj) { | |
console.log("Watchers:" + obj['repository']['watchers']); | |
console.log("Forks:" + obj['repository']['forks']); | |
} | |
$.ajax("http://github.com/api/v2/json/repos/show/twitter/bootstrap?callback=repoCallback", {dataType: "jsonp"}); |
This file contains hidden or 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
""" | |
Python Startup File (from https://gist.github.com/955154) | |
Add this file to ~/.pythonrc.py to add history between sessions and | |
auto-completion via the ESC key to the interactive Python interpreter. After | |
adding this file, put something like the following line in your .bash_profile: | |
export PYTHONSTARTUP=$HOME/.pythonrc.py | |
Requires a recent version of Python and the readline package, which you can |
This file contains hidden or 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
// Hello! I am Ben Hodgson. | |
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
// A: |