Skip to content

Instantly share code, notes, and snippets.

View itsananderson's full-sized avatar

Will Anderson itsananderson

View GitHub Profile
@itsananderson
itsananderson / .gitconfig
Created August 27, 2014 22:22
My setup for automatically configuring user.email when cloning a repo
[alias]
email-guess = !. ~/.git-scripts/email-guess.sh
@itsananderson
itsananderson / backbone-wat.js
Created October 7, 2014 05:49
Backbone API designers. WTF is wrong with you?
var posts = new wp.api.collections.Posts();
posts.fetch().done(function() {
var post = posts.first().attributes;
// ...
});
@itsananderson
itsananderson / a.js
Created October 12, 2014 16:18
An illustration of module export behavior in Node
module.exports = Math.random();
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="height: 1584018px;">
Inspect my layout
</div>
</body>
</html>
@itsananderson
itsananderson / .gitconfig
Created February 13, 2015 00:32
git diff/merge config for kdiff3
[diff]
tool = kdiff3
[difftool "kdiff3"]
cmd = 'c:\\Program Files\\kdiff3\\kdiff3' $LOCAL $REMOTE
keepBackup = false
trustExitCode = true
keepTemporaries = false
[merge]
tool = kdiff3
[mergetool "kdiff3"]
@itsananderson
itsananderson / chain-promises.js
Created June 23, 2015 20:51
Storing state at the top-level scope to be shared between promise handlers.
var user;
var balance;
getCurrentUser()
.then(function (currentUser) {
user = currentUser;
return getBalance(user);
})
.then(function (userBalance) {
balance = userBalance;
@itsananderson
itsananderson / index.html
Last active August 29, 2015 14:24 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.chord {
fill-opacity: .67;
@itsananderson
itsananderson / 0.README.md
Last active August 29, 2015 14:24
Subreddit comment distribution by month - 2007
@itsananderson
itsananderson / topthree.txt
Created July 13, 2015 09:21
Top three subreddits by month (based on posted comments) https://github.com/itsananderson/reddit-comment-data/
$ ./topthree.sh
./out/RC_2007-10.json | reddit.com 88601 | politics 34088 | programming 16162
./out/RC_2007-11.json | reddit.com 223377 | politics 88473 | programming 32838
./out/RC_2007-12.json | reddit.com 195181 | politics 112025 | programming 31726
./out/RC_2008-01.json | reddit.com 234405 | politics 144953 | programming 39374
./out/RC_2008-02.json | reddit.com 247924 | politics 109893 | programming 31063
./out/RC_2008-03.json | reddit.com 207092 | politics 83375 | programming 34642
./out/RC_2008-04.json | reddit.com 140944 | politics 64532 | programming 40958
./out/RC_2008-05.json | reddit.com 149251 | politics 74204 | pics 44095
./out/RC_2008-06.json | reddit.com 125032 | politics 74453 | pics 40568
@itsananderson
itsananderson / WillWideWeb.htm
Created July 17, 2015 05:58
My first ever web page
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<h1>Will's page </h1>
My name is <b>Will</b>. I am <font size="&#43;1" color="red">11</font> years old.
<p>This is a new paragraph. </p>
</body>
</html>