Choose your colors:
- Open original file in Photoshop
- Select relevant areas (“Marquee”)
- Choose: Selection > Save Selection…
- Enter name eg: “Colors” and hit “Save”
Remove transparent areas:
- Select layer alpha (“CMD+Click” on layer)
function memoizer(memo, fundamental) { | |
var shell = function (n) { | |
var result = memo[n]; | |
if (typeof result !== 'number') { | |
result = fundamental(shell, n); | |
memo[n] = result; | |
} | |
return result; | |
}; | |
return shell; |
function schedule(functions, context){ | |
setTimeout(function(){ | |
var process = functions.shift(); | |
process.call(context); | |
if (functions.length > 0){ | |
setTimeout(arguments.callee, 100); | |
} | |
}, 100); |
$ ifconfig | grep 'inet ' | grep -v 127.0.0.1 | cut -d\ -f2 | |
alias ip="ifconfig | grep 'inet ' | grep -v 127.0.0.1 | cut -d\ -f2" |
# Install Selenium as a plugin: | |
script/plugin install http://svn.openqa.org/svn/selenium-on-rails/stable/selenium-on-rails/ | |
# Copy configuration file: | |
cp vendor/plugins/selenium-on-rails/selenium.yml.example config/selenium.yml | |
# Be sure to setup your browsers. Add this to run Firefox with a clean profile: | |
# /Applications/Firefox.app/Contents/MacOS/firefox-bin -P selenium | |
# Optional: Install ThoughtBot Shoulda gem: |
# show a colores list of all your commits | |
alias timelog='git log --pretty=format:"%Cgreen%ad%Creset: %s%d" --date=local --author=YOUR_NAME_HERE --since="1 weeks ago"' |
Choose your colors:
Remove transparent areas:
# replace 123 with you line number | |
git blame --porcelain -L123,123 folder/file.ext | grep summary |
# replace 123 with line number | |
git blame --porcelain -L123,123 folder/file.ext | grep summary |
git clone git://github.com/dchelimsky/rspec.git | |
cd rspec | |
git checkout 1.1.8 | |
rake gem | |
rake install_gem |
const PKSupportsTouches = ("createTouch" in document); | |
const PKStartEvent = PKSupportsTouches ? "touchstart" : "mousedown"; | |
const PKMoveEvent = PKSupportsTouches ? "touchmove" : "mousemove"; | |
const PKEndEvent = PKSupportsTouches ? "touchend" : "mouseup"; | |
function PKUtils() {} | |
PKUtils.assetsPath = ""; | |
PKUtils.t = function (b, a) { | |
return "translate3d(" + b + "px, " + a + "px, 0)" | |
}; |