A Pen by Hidenari Nozaki on CodePen.
This time, sort function is cleaner than the previous one. It doesn't need to update rect and text position, just the container g. And, by using 'transform', appending rect and text becomes easier.
A Pen by Hidenari Nozaki on CodePen.
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
function ruby_version() { | |
echo 'ruby('`rbenv version | sed -e 's/ .*//'`')' | |
} | |
function node_version() { | |
echo 'node('`nvm version`')' | |
} | |
PROMPT='%{$fg[yellow]%}$(ruby_version):$(node_version) %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%} | |
$ ' |
A javascript library for laying out area proportional venn and euler diagrams written by Ben Frederickson.
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
"use strict"; | |
var fs= require('fs'); | |
var Promise = require('bluebird'); | |
var parse= Promise.promisify(require('csv-parse')); | |
var file = fs.readFileSync('test.csv', 'utf8'); | |
var headerKeys; | |
var options ={ | |
trim: true, |
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
#!/usr/bin/env ruby | |
if ARGV.length != 3 | |
puts 'Need 3 arguments' | |
puts ' calculate-email-distribution INITIAL_SIZE STEP AMOUNT' | |
puts 'e.g.' | |
puts ' calculate-email-distribution 100 20 65000' | |
exit 0 | |
end |
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 Promise = require('bluebird'); | |
function test1() { | |
return new Promise(function(resolve) { | |
setTimeout(function() { | |
console.log('resolve'); | |
resolve(100); | |
}, 500); | |
}); | |
} |
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 Q = require('q'); | |
function test() { | |
var d = Q.defer(); | |
setTimeout(function() { | |
d.reject(new Error('failed')); | |
}, 500); | |
return d.promise; |
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
[dev] | |
url = "http://dev.example.com" | |
username = "dev.account" | |
password = "devdev" | |
[test] | |
url = "http://test.example.com" | |
username = "test.account" | |
password = "testtest" |