$ rails g model User
belongs_to
has_one
| function declOfNum(number, titles) { | |
| cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
| } | |
| use: | |
| declOfNum(count, ['найдена', 'найдено', 'найдены']); | 
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| From http://linux.die.net/man/3/strftime | |
| %a - The abbreviated weekday name (``Sun'') | |
| %A - The full weekday name (``Sunday'') | |
| %b - The abbreviated month name (``Jan'') | |
| %B - The full month name (``January'') | |
| %c - The preferred local date and time representation | |
| %d - Day of the month (01..31) | |
| %e - Day of the month without leading 0 (1..31) | |
| %g - Year in YY (00-99) |