Layout of US House & Senate members in an arc using D3. Based on code from http://en.wikipedia.org/wiki/User_talk:Slashme/parliament.py
A Pen by Liji Jinaraj on CodePen.
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# sort list of git repos with gh cli | |
gh repo list --limit 300 --json name -q '.[].name' | sort | |
# count total commits in a repo | |
git rev-list --all --count |
Layout of US House & Senate members in an arc using D3. Based on code from http://en.wikipedia.org/wiki/User_talk:Slashme/parliament.py
A Pen by Liji Jinaraj on CodePen.
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Handlebars.JavaScriptCompiler.prototype.nameLookup = function(parent, name, type) { | |
var result = '(' + parent + ' instanceof Backbone.Model ? ' + parent + '.get("' + name + '") : ' + parent; | |
if (/^[0-9]+$/.test(name)) { | |
return result + "[" + name + "])"; | |
} else if (Handlebars.JavaScriptCompiler.isValidJavaScriptVariableName(name)) { | |
return result + "." + name + ')'; | |
} else { | |
return result + "['" + name + "'])"; | |
} | |
}; |
] wc -l domains.txt | |
783 domains.txt | |
] time go run domain_lookup_parallel.go | |
real 0m5.743s | |
user 0m0.359s | |
sys 0m0.355s | |
] time go run domain_lookup_sequential.go |
// This is the core Javascript code for http://windhistory.com/ | |
// I haven't done a full open source release, but I figured I'd put the most important | |
// D3 code out there for people to learn from. [email protected] | |
/** Common wind rose code **/ | |
// Function to draw a single arc for the wind rose | |
// Input: Drawing options object containing | |
// width: degrees of width to draw (ie 5 or 15) | |
// from: integer, inner radius |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Archimedean Spiral</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script> | |
<style> | |
body { | |
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; | |
margin: 40px; |
This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.
Give me feedback on Twitter (@nicoleslaw) or by email ([email protected]).
var self = Ti.UI.createWindow(args); | |
// Grab instance of class. | |
var egc = new (require('egc'))(self); | |
// Add events through the wrapper. | |
egc.addEvent('someEvent', function (){}); | |
egc.addEvent('anotherEvent', function (){}); | |
egc.addEvent('tresEvent', function (args){}); |