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
| set :sync_directories, ["public/assets", "public/galleries"] | |
| set :sync_backups, 3 |
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
| set :sync_directories, ["public/assets", "public/galleries"] | |
| set :sync_backups, 3 |
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
| if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
| var Storage = function (type) { | |
| function createCookie(name, value, days) { | |
| var date, expires; | |
| if (days) { | |
| date = new Date(); | |
| date.setTime(date.getTime()+(days*24*60*60*1000)); | |
| expires = "; expires="+date.toGMTString(); |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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
| function __git_dirty { | |
| git diff --quiet HEAD &>/dev/null | |
| [ $? == 1 ] && echo "!" | |
| } | |
| function __git_branch { | |
| __git_ps1 "(%s)" | |
| } | |
| function __my_rvm_ruby_version { |
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
| #Config is there http://github.com/spyou/vim-config | |
| #Give a go to vimtutor in order to have a little overview of Vim. | |
| "open/save" | |
| #:w (save) | |
| #:q (quit) | |
| #:qa (quit all buffers) | |
| #:q! (quit without saving) | |
| #:wq (save and quit) |
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
| git ci -am"`curl -s http://whatthecommit.com/ | sed -n '/<div id="content">/,/<\/div>/p' | sed 's/<[^>]*>//g' | tr -d "\n"`" |
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
| # Help nginx+passenger serve static index pages | |
| # Site specific config | |
| server { | |
| listen 80; | |
| server_name domain.com; | |
| index index.html; | |
| access_log logs/appname.access.log; | |
| error_log logs/appname.error.log; |
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
| require 'rubygems' | |
| require 'test/unit' | |
| class Call | |
| attr_accessor :company | |
| def initialize(opts = {}) | |
| @company = opts[:company] | |
| raise Call::NoCompanyException unless @company | |
| 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
| alias serve="ruby -rwebrick -e\"s = WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start\"" |
OlderNewer