Based on Jason Davies’ implementation of Bridson’s algorithm. See the related explanation.
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
#!/usr/bin/env node | |
var inquirer = require("inquirer"), | |
request = require("request"), | |
qs = require('querystring'), | |
fs = require('fs'); | |
var request_token_url = 'https://api.twitter.com/oauth/request_token', | |
access_token_url = 'https://api.twitter.com/oauth/access_token'; |
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
class String | |
def guess_type | |
if self.to_i.to_s == self | |
return Integer | |
elsif self.to_f.to_s == self | |
return Float | |
elsif self.downcase == "true" || self.downcase == "false" | |
return Boolean | |
end |
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
require 'benchmark' | |
class Obj | |
def with_condition | |
respond_to?(:mythical_method) ? self.mythical_method : nil | |
end | |
def with_rescue | |
self.mythical_method | |
rescue NoMethodError |
I hereby claim:
- I am h0ke on github.
- I am h0ke (https://keybase.io/h0ke) on keybase.
- I have a public key whose fingerprint is 1DED 3A53 7AE3 4AE9 4F35 5C2C 3272 8426 24CE 69A8
To claim this, I am signing this object:
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
var five = require("johnny-five"), | |
board = new five.Board(), | |
keypress = require('keypress'); | |
board.on("ready", function() { | |
keypress(process.stdin); | |
servoRight = new five.Servo({ | |
pin: 10, |
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
alias ga='git add' | |
alias gp='git push' | |
alias gl='git log' | |
alias gs='git status' | |
alias gd='git diff' | |
alias gdc='git diff --cached' | |
alias gm='git commit -m' | |
alias gma='git commit -am' | |
alias gb='git branch' | |
alias gc='git checkout' |
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
alias svna='svn add' | |
alias svnu='svn up' | |
alias svnco='svn co' | |
alias svnd='svn diff' | |
alias svns='svn st' | |
alias svnm='svn merge' | |
alias svncp='svn cp' | |
alias svnl='svn log | less' | |
alias svnb='svn blame' | |
alias svnc='svn commit' |