This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
padrino g project APP -d activerecord -t cucumber -e haml -c sass -s jquery -m mocha --migration_format=timestamp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
# Get Sublime to use your rvm ruby... Change your Packages/Ruby/Ruby.sublime-build to this, | |
# or drop it in Packages/User: | |
{ | |
"env":{ | |
"PATH":"/home/leemour/.rvm/bin:${PATH}" | |
}, | |
"cmd": [ | |
"/home/leemour/.rvm/bin/rvm-auto-ruby", "$file" | |
], | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show_rubles( sum ) | |
first, last = sum.to_f.round(2).to_s.split('.') | |
result = (first.reverse.gsub(/(\d{1,3})/, '\1;psbn&').reverse) + ' руб. ' | |
result = result + last + ' коп.' if last != '0' | |
result.strip.html_safe | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/Railscasts.tmTheme", | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
".tags*", | |
"*.pyc", | |
"*.pyo", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>A thumbnail grid with <a href="https://github.com/Team-Sass/Singularity">Singularity</a> and <a href="https://github.com/lolmaus/breakpoint-slicer">Breakpoint Slicer</a></h2> | |
<p>Play with the Page pane width to see the responsive magic!</p> | |
<div class=grid-item> | |
<div class=thumbnail> | |
<div class=thumbnail-content> | |
Thumbnail | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BatchItemProcessor | |
attr_accessor :processed_items | |
def initialize | |
@processed_items = [] | |
end | |
def process_items(list) | |
list = list.select(&@condition) if @condition | |
items = parse list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Sublime to use your rvm ruby... Change your ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.sublime-build to this, replacing YOURUSERNAME: | |
{ | |
"cmd": [ | |
"bundle", "exec", "/Users/YOURUSERNAME/.rvm/bin/rvm-auto-ruby", "$file" | |
], | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": "source.ruby" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// borrowed from https://github.com/samflores | |
Prism.languages.ruby = { | |
'comment': /#[^\r\n]*(\r?\n|$)/g, | |
'string': /("|')(\\?.)*?\1/g, | |
'regex': { | |
pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g, | |
lookbehind: true | |
}, | |
'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/g, | |
'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |