Some stuff that makes me happy:
- good decisions
- well written, persuasive prose
- elegant solutions
- evocative experiences
- genuine, honest communication
- afterglow
- summertime
- doodling
| alias gitgraph="git log --graph --full-history --all --color --pretty=format:\"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s\"" |
| export TERM=xterm-color | |
| # set colors and prompt | |
| #PS1="\[\e]2;\w\a\][\[\e[32m\]\u\[\e[0m\]@\[\e[31m\]\h\[\e[0m]\]:\[\e[35m\]\w\[\e[0m\]$ " | |
| #PS2=">> " | |
| #export PS1 PS2 | |
| export CLICOLOR="true" | |
| export LSCOLORS="exfxcxdxbxegedabagacad" | |
| # set a fancy prompt (non-color, unless we know we "want" color) | |
| case "$TERM" in |
| // Vertical gradient scss mixin | |
| @mixin gradient($start-color: #f3f3f3, $end-color: #fcfcfc) { | |
| background: $start-color; /* for non-css3 browsers */ | |
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}'); /* ie */ | |
| background: -webkit-gradient(linear, left top, left bottom, from($start-color), to($end-color)); /* webkit */ | |
| background: -moz-linear-gradient(top, $start-color, $end-color); /* ff */ | |
| } | |
| // --- Usage --- |
| // Image replacement scss mixin | |
| @mixin image_replace($img, $width, $height, $x: 0, $y: 0) { | |
| display: block; | |
| background: image-url($img) no-repeat $x $y; | |
| width: $width; | |
| height: $height; | |
| overflow: hidden; | |
| text-indent: -9999em; | |
| } |
| hello humans | |
Some stuff that makes me happy:
| Array.prototype.simple_moving_average = function(window_length) { | |
| var averaged = new Array(this.length); | |
| var chunk = []; | |
| for (k = 0; k < this.length; k++) { | |
| chunk.push(this[k]); | |
| if (chunk.length > window_length) chunk.shift(); | |
| averaged[k] = chunk.sum() / chunk.length; // sum() is an exercise left to the reader | |
| } | |
| return averaged; | |
| }; |
| # You can get your own setup: | |
| # >> import distutils | |
| # >> distutils.sysconfig.get_config_vars() | |
| macx { | |
| QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5 | |
| QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk # need this if building on PPC | |
| CONFIG += x86 | |
| LIBS += -framework \ | |
| IOKit \ |
| git log --since=yesterday | |
| git log --since="3 days ago" | |
| git log --before=today |
| require 'rubygems' | |
| require 'hpricot' | |
| require 'open-uri' | |
| n = ARGV[0] | |
| n = n.gsub(/\s+/, "%2C%2D") | |
| xml = open("http://gdata.youtube.com/feeds/api/videos?category=#{n}").read | |
| doc = Hpricot::XML(xml) |