brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
# lib/liquid_i18n_rails.rb | |
module LiquidI18nRails | |
def t(string) | |
I18n.t(string.to_sym) | |
end | |
end | |
# config/initializers/liquid.rb | |
require 'liquid_i18n_rails' | |
Liquid::Template.register_filter LiquidI18nRails |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
var LightenColor = function(color, percent) { | |
var num = parseInt(color,16), | |
amt = Math.round(2.55 * percent), | |
R = (num >> 16) + amt, | |
B = (num >> 8 & 0x00FF) + amt, | |
G = (num & 0x0000FF) + amt; | |
return (0x1000000 + (R<255?R<1?0:R:255)*0x10000 + (B<255?B<1?0:B:255)*0x100 + (G<255?G<1?0:G:255)).toString(16).slice(1); | |
}; |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
#!/usr/bin/python | |
import time, signal, sys | |
from Adafruit_ADS1x15 import ADS1x15 | |
def signal_handler(signal, frame): | |
print 'You pressed Ctrl+C!' | |
sys.exit(0) | |
signal.signal(signal.SIGINT, signal_handler) | |
#print 'Press Ctrl+C to exit' |
Press minus + shift + s
and return
to chop/fold long lines!
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
de: | |
devise: | |
confirmations: | |
confirmed: "Vielen Dank für Deine Registrierung. Bitte melde dich jetzt an." | |
confirmed_and_signed_in: "Vielen Dank für Deine Registrierung. Du bist jetzt angemeldet." | |
send_instructions: "Du erhältst in wenigen Minuten eine E-Mail, mit der Du Deine Registrierung bestätigen kannst." | |
send_paranoid_instructions: "Falls Deine E-Mail-Adresse in unserer Datenbank existiert erhältst Du in wenigen Minuten eine E-Mail mit der Du Deine Registrierung bestätigen kannst." | |
failure: |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
/** | |
* ECMA2015 | |
*/ | |
function convertHex(hexCode, opacity = 1){ | |
var hex = hexCode.replace('#', ''); | |
if (hex.length === 3) { | |
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; | |
} |