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
# Run this when your sequences get out of whack | |
# Can happen after a botched database restore | |
# Tested with postgres | |
ActiveRecord::Base.connection.tables.each do |table| | |
ActiveRecord::Base.connection.reset_pk_sequence!(table) | |
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
[user] | |
name = Andrei Railean | |
email = [email protected] | |
[alias] | |
co = checkout | |
cob = checkout -b | |
st = status | |
s = status | |
ci = commit | |
c = commit |
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
module['exports'] = function echoHttp (hook) { | |
hook.debug("Debug messages are sent to the debug console"); | |
hook.debug(hook.params); | |
hook.debug(hook.req.path); | |
hook.debug(hook.req.method); | |
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
# Checkout and track remote branch | |
git checkout --track -b local_branch remote/remote_branch | |
# Delete all merged local branches except for master | |
git branch --merged master | grep -v master | xargs git branch -d | |
# Delete all branches from origin remote except master | |
git branch -a --merged remotes/origin/master | grep -v master | grep "remotes/origin/" | sed 's|remotes/origin/||' | xargs -n 1 git push --delete origin |
OlderNewer