This file contains 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
https://help.github.com/articles/syncing-a-fork | |
``` | |
git remote -v | |
git remote add upstream https://github.com/otheruser/repo.git | |
git fetch upstream | |
git checkout master | |
git merge upstream/master | |
``` |
This file contains 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
rmhist() { | |
start=$1 | |
end=$2 | |
count=$(( end - start )) | |
while [ $count -ge 0 ] ; do | |
history -d $start | |
((count--)) | |
done | |
} |
This file contains 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 this is an issue with your firewall blocking the git: protocol port (9418), then you should make a more persistent change so you don't have to remember to issue commands suggested by other posts for every git repo. | |
git config --global url."https://".insteadOf git:// | |
This simply adds the following two lines to ~/.gitconfig: | |
[url "https://"] | |
insteadOf = git:// |
This file contains 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 rev-list -n 1 HEAD -- <file_path>` | |
Then checkout the version at the commit before. | |
`git checkout <deleting_commit>^ -- <file_path>` | |
Or in one command, if $file is the file in question. | |
`git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"` | |
The solution works fine on bash, but zsh has it's own expansion on '^'. So simply replace '^' with '~1', ~X allows you to specify X commits before the specified commit, so ~1 is the commit before, ~2 is two commits before, etc |
This file contains 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
f=/System/Library/CoreServices/Dock.app/Contents/Resources/DockMenus; sudo cp $f.plist $f-old.plist; sudo defaults write $f finder-running -array-add '<dict><key>command</key><integer>1004</integer><key>name</key><string>REMOVE_FROM_DOCK</string></dict>'; sudo chmod 644 $f.plist; osascript -e 'quit app "Dock"' |
This file contains 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
{ | |
"color_scheme": "Packages/User/Tubnil.tmTheme", | |
"colored_folder_glyphs": true, | |
"font_size": 15, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
This file contains 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
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences. | |
# Instructions: | |
# Go to TextMate > Preferences... | |
# Click Advanced | |
# Select Folder References | |
# Replace the following: | |
# File Pattern |
This file contains 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
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |