Skip to content

Instantly share code, notes, and snippets.

## git completion (run brew install bash-completion first)
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
## branch name in prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
letter frequency
A .08167
B .01492
C .02782
D .04253
E .12702
F .02288
G .02015
H .06094
I .06966
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.chart rect {
fill: steelblue;
}
.chart text {
fill: white;
@shortcircuit3
shortcircuit3 / cycle.js
Last active January 4, 2016 19:19
Toggle between two framer.js funcitons
var init = function() {
alert('init');
}
var run = function() {
alert('hi');
}
// Check pointer types
pointerType = "click";

Build 2013

I spent last week in (not so) sunny Belfast, N. Ireland for the last ever Build Conference. As defined on their website, "Build is a design festival for web designers". The majority of the week is spent talking shop with designers and appreciators of the craft, but the main event is a day long series of talks from industry leaders.

The Talks

A few talks that stood out to me were from David Cole, Paul Soulellis, Jason Scott & Frank Chimero.

David Cole

David presented how he arrived at his definition of product design. David argued that "Designers are in the business of invention". He continues by talking about how designers can innovate conceptually.

@shortcircuit3
shortcircuit3 / time_ago.rb
Created October 5, 2013 15:09
How much time has passed
def prettyDate(created_at)
now = Time.now.to_i
before = Time.parse(created_at).to_i
diff = now - before
minute = 60
hour = 60 * minute
day = 24 * hour
week = 7 * day
year = 365 * day
[user]
name = Alex Miles
email = [email protected]
[alias]
st = status
ci = commit
br = branch
mg = merge
co = checkout
## A modification of @stevenosloan bash profile
## https://github.com/stevenosloan
# Add brew path.
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:$PATH
export PATH=./bin:$PATH
export EDITOR=subl
## git completion (run brew install bash-completion first)
var i = 0;
var f = 'F',
u = 'U',
c = 'C',
k = 'K';
setInterval(function(){
console.log(f + u + c + k);
@shortcircuit3
shortcircuit3 / sassroute.rb
Created March 21, 2013 10:57
Basic sinatra route for sass file
get '/style.css' do
content_type 'text/css', :charset => 'utf-8'
scss :style
end