Last active
August 29, 2015 14:01
-
-
Save keshavab/9732278cfc22a424bd87 to your computer and use it in GitHub Desktop.
Cookbook
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
# delete given files and found files | |
find . -name '*.pyc' -print0 | xargs -0 rm | |
# List of files in a commit | |
git diff-tree --no-commit-id --name-only -r bd61ad98 | |
# Mount a windows cifs mount on ubuntu | |
sudo apt-get install cifs-utils | |
sudo mount.cifs //10.1.192.14/lab/COS_Share lab-cosshare -o user=<username> | |
# If you wish to set tracking information for this branch you can do so with: | |
git branch --set-upstream-to=<remote>/<branch> <branch-name> | |
# get a file from a specific revision | |
git show <treeish>:<filename> | |
# find a pattern recursively in a directory | |
grep -Ril '<string/pattern>' | |
# create a loopback device | |
sudo mkdir /srv | |
sudo truncate -s 1GB /srv/swift-disk | |
sudo mkfs.xfs /srv/swift-disk | |
/srv/swift-disk /mnt/sdb1 xfs loop,noatime,nodiratime,nobarrier,logbufs=8 0 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment