Tips for using less
on the command line.
To navigate:
- f = for next page
- b = for previous page
To search:
- /<query>
Tips for using less
on the command line.
To navigate:
To search:
alias ga='git add' | |
alias gp='git push' | |
alias gpu='git pull' | |
alias gs='git status' | |
alias gd='git diff' | |
alias gds='git diff --staged' | |
alias gm='git commit -m' | |
alias gc='git checkout' |
#!/usr/bin/env python | |
import sys | |
import subprocess | |
diff_requirements = 'git diff ORIG_HEAD HEAD --exit-code -- requirements.txt' | |
exit_code = subprocess.call(diff_requirements.split()) | |
if exit_code == 1: | |
print 'The requirements file has changed! Remember to install new dependencies.' | |
else: |
import os, sys, IPython | |
print(os.environ['VIRTUAL_ENV']) | |
print(sys.executable) | |
print(IPython.__file__) | |
print(sys.path) |
alias fixssh='eval $(tmux showenv -s SSH_AUTH_SOCK)' | |
Or for tmux that does not have showenv -s: | |
alias fixssh='export $(tmux showenv SSH_AUTH_SOCK)' |
;;; OSX specific settings | |
;;; Borrowed heavily from https://github.com/rejeep/emacs | |
(defun live-copy-from-osx () | |
(shell-command-to-string "pbpaste")) | |
(defun live-paste-to-osx (text &optional push) | |
(let ((process-connection-type nil)) | |
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) | |
(process-send-string proc text) |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
https://raw.github.com/wiki/user/repo/page.md?login=login&token=token |
When many different people are working on a project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the main line of development, and it needs to be updated before it can be merged into the project. The most common reason why pull requests go stale is due to conflicts: if two pull requests both modify similar lines in the same file, and one pull request gets merged, the unmerged pull request will now have a conflict. Sometimes, a pull request can go stale without conflicts: perhaps changes in a different file in the codebase require corresponding changes in your pull request to conform to the new architecture, or perhaps the branch was created when someone had accidentally merged failing unit tests to the master branch. Regardless of the reason, if your pull request has gone stale, you will need to rebase your branch onto the latest version of the master branch before it can be merged.