This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| [user] | |
| name = Horia Dragomir | |
| email = [email protected] | |
| [github] | |
| user = hdragomir | |
| [alias] | |
| st = status -sb | |
| ci = commit | |
| co = checkout | |
| p = push |
| function cd! { | |
| mkdir $1 | |
| cd $1 | |
| } |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2299719/hack.sh | sh | |
| # |
| /** | |
| * Weird behavior when combining opacity & z-index: -1 | |
| */ | |
| div { | |
| position: relative; | |
| width: 200px; height: 200px; | |
| background: yellowgreen; | |
| /* Try commenting this or setting it to 1: */ |
| switch (num) { | |
| case 1: | |
| 'do your stuff'; | |
| break; | |
| default: | |
| case 2: | |
| 'do other stuff'; | |
| break; | |
| case 3: | |
| 'more stuff'; |
| <!doctype html> | |
| <title>background bars proto</title> | |
| <style type="text/css"> | |
| .row { | |
| margin: .20em auto; | |
| width: 200px; | |
| position: relative; | |
| font: 14px/22px sans-serif; | |
| color: #333; | |
| background: white; |
| autocmd! | |
| set nocompatible | |
| let mapleader = "," | |
| filetype on | |
| set title | |
| set ai | |
| set relativenumber | |
| set cursorline | |
| set expandtab expandtab |
| <script> | |
| function abs(x) { | |
| x = typeof x === "string" ? x.indexOf(',') > -1 ? Number.NaN : ( x.indexOf('.') > -1 ? parseFloat(x, 10) : parseInt(x, 10) ) : (typeof x === "number" || x === null ? x : Number.NaN); | |
| return Number.isNaN(x) ? x : (x === null ? 0 : (x < 0 ? -x : x )); | |
| } | |
| function assert(message, condition) { | |
| condition || console.error(message); | |
| } |
| function droidshot { | |
| saveto=~/droidshots | |
| fname=$(date +"%Y%m%d%H%M").png | |
| [[ ! -z $1 ]] && fname=$1 | |
| [[ -d $saveto ]] || mkdir $saveto | |
| adb shell screencap -p /sdcard/$fname | |
| adb pull /sdcard/$fname $saveto/$fname | |
| adb shell rm /sdcard/$fname | |
| echo "saved to $saveto/$fname" | |
| } |