I ran the following command:
sudo dhclient eth0
sudo dhclient eth0
grep -v "word" <file or location>For example, the results of a grep search can include a lot of results which are not relevant. Eliminate those by using grep -v
grep "blah" filename | grep -v "foo"
dig +short myip.opendns.com @resolver1.opendns.com
./config.status --config
from subprocess import Popen, PIPEcmd = "blah blah"process = Popen(cmd.split(), stdout=PIPE)process.communicate() # execute it, the output goes to the stdoutexit_code = process.wait() # when finished, get the exit codeimport os
print os.environ['ENV_VAR_YOU_WANT']
git clone <my-clone-of-upstream-repo>
cd <upstream-repo>
git remote add upstream <upstream-repo>
git config --global push.default simple
git checkout -b <new-branch>
git fetch upstream
git merge-base new-branch master => This will generate a commit hash
git rebase --interactive <commit hash>
git rebase upstream/master
git push -f
vim -u NONE filename
For commenting a block of text is almost the same: First, go to the first line you want to comment, press CtrlV, and select until the last line. Second, press ShiftI#Esc (then give it a second), and it will insert a#character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type: s/^/#in the second step instead.
yum --disablerepo="*" --enablerepo="reponame" install pkgName