Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
#!/usr/bin/env python3 | |
import itertools | |
whats = [ | |
'自經區', '自貿區', | |
'摩天輪', '愛情摩天輪', '愛情產業鏈', | |
'發大財', '愛河的水甘甘', '選總統', | |
'迪士尼', |
[alias] | |
plog = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
" A minimal vimrc for new vim users to start with. | |
" | |
" Referenced here: http://vimuniversity.com/samples/your-first-vimrc-should-be-nearly-empty | |
" | |
" Original Author: Bram Moolenaar <Bram@vim.org> | |
" Made more minimal by: Ben Orenstein | |
" Modified by : Ben McCormick | |
" Last change: 2014 June 8 | |
" | |
" To use it, copy it to |
# Cleanup old node_modules | |
echo "Cleaning node_modules in projects older than 30 days" | |
find . -name "node_modules" -type d -mtime +30 | xargs rm -rf | |
echo "Done cleaning node_modules" | |
# Clean up homebrew | |
echo "Clean homebrew" | |
brew update && brew upgrade && brew cleanup | |
echo "Done cleaning homebrew" |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
function git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} |
Use the natural Vim navigation keys hjkl to navigate the files. | |
Press o to open the file in a new buffer or open/close directory. | |
Press t to open the file in a new tab. | |
Press i to open the file in a new horizontal split. | |
Press s to open the file in a new vertical split. | |
Press p to go to parent directory. | |
Press r to refresh the current directory. | |
Press m to launch NERDTree menu inside Vim. |
class MyStreamListener(tweepy.StreamListener): | |
def __init__(self, api=None): | |
super(MyStreamListener, self).__init__() | |
self.num_tweets = 0 | |
self.file = open("tweets.txt", "w") | |
def on_status(self, status): | |
tweet = status._json | |
self.file.write( json.dumps(tweet) + '\n' ) | |
self.num_tweets += 1 |
#!/bin/sh | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |