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 rm --cached file_name |
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
# start on task | |
git checkout dev | |
git pull | |
git checkout -b branchname | |
# work & commit | |
# send to central repo everyday | |
git push origin branchname |
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
update pg_database set datallowconn = 'false' where datname = 'dbname'; | |
DROP DATABASE 'dbname' |
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 Cart | |
include ActiveAttr::Model | |
attribute :items # has_many | |
attribute :qty, :type => Integer | |
attribute :subtotal_chf, :type => Integer | |
attribute :subtotal_eur, :type => Integer | |
attribute :order_id, :type => Integer | |
def initialize(storage) |
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 jquery.ui.sortable | |
#= require jquery.ui.nestedSortable | |
#= require sortable_tree/initializer | |
#= require_self | |
# case insensitive jQuery Contains http://goo.gl/IrNmk | |
jQuery.expr[":"].Contains = (a, i, m) -> | |
jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0 | |
jQuery.expr[":"].contains = (a, i, m) -> | |
jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0 | |
$ -> |
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
text.gsub(URI.regexp(%W[https http])) do | |
"<a href=\"#{$&}\">#{$&}</a>" | |
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
export LC_CTYPE="en_US.UTF-8" |
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
http://localhost:3000/rails/info/routes |
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
ruby -I test test/unit/my_model_test.rb -n test_name |
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
# Find the process ID | |
ps -ax | grep Safari | |
# Pause the process | |
kill -STOP 1234 | |
# Resume the process | |
kill -CONT 1234 | |
# Force stop |