(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
#!/bin/bash | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
git diff --name-only | uniq | xargs mvim
When git encounters a merge conflict, e.g. during a rebase, it drops you back into the shell with a dirty working directory. I like this one-liner for opening all files with a merge conflict in MacVim.
Once you're in Vim, you can then switch between the files with :n
and :prev
, or another favourite: :w | n
(save current file and open the next command line-supplied file).
UPDATE: see below for a version that works with real terminal commands.
This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.
Function | Shortcut |
---|---|
Previous Tab | ⌘ + Left Arrow |
Next Tab | ⌘ + Right Arrow |
Go to Tab | ⌘ + Number |
With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.
Usage: In the vim list section of the .vimrcfile, include options:
let g:vimwiki_list = [{'path': ‘your_wiki_place',
\ 'path_html': ‘wiki_html_location’,
\ 'syntax': 'markdown',
\ 'ext': '.md',
from django.contrib.messages.storage.fallback import FallbackStorage | |
from django.contrib.sessions.middleware import SessionMiddleware | |
from django.test import RequestFactory | |
class TestSomeView: | |
def test_view(self): | |
request = RequestFactory().get('/') | |
In your command-line run the following commands:
brew doctor
brew update
Follow the instructions on Github to Create an Access Token in Github
By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.
You can tell Git you want to store credentials in the osxkeychain by running the following:-
export VERSION="3.7.1" | |
xcode-select --install | |
brew update | |
brew upgrade | |
brew install zlib | |
brew reinstall zlib | |
export LDFLAGS="-L/usr/local/opt/zlib/lib" | |
export CPPFLAGS="-I/usr/local/opt/zlib/include" | |
pyenv install $VERSION | |
pyenv global $VERSION |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |