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
Ctrl+D to select next occurence of word. | |
Alt+F3 to select all occurences of a word. | |
R-Click & Shift for column select. Ctrl to add to selection. | |
Make selection, Ctrl+Shift+L (L for lines) | |
Ctrl+Shift+P for command bar. Type somethign like syntax or just javascript (it does fuzy searching) | |
Ctrl+P searches your file system (fuzzy search as well). Enter @ symbol on highlighted file to get Ctrl+R functionality (see) | |
Ctrl+R to browse symbols / method names / style sheets. | |
Ctrl+I is incremental search (what does this do?) | |
Ctrl+Shift+P and type snipper for the working files language snippets | |
You can create your own snippets. |
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
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=True) |
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
#!/usr/bin/env python | |
import os | |
import pip | |
dists = [] | |
for dist in pip.get_installed_distributions(): | |
dists.append(dist.project_name) | |
for dist_name in sorted(dists, key=lambda s: s.lower()): |
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
Permissions | |
Directories/Files Permissions | |
Public directories 0711 | |
Private Directories 0700 | |
Python scripts (.py) 0700 | |
CGI scripts (.py) 0755 | |
Regular files inside pub dirs (CSS, HTML, etc) 0644 |
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
.debug { border:1px dashed red; } |
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
tmux new -s session_name -n window_name # Creates a new session with a named window | |
tmux attach -t session_name # Attaches to tmux session | |
tmux ls # Lists all tmux sessions | |
#PREFIX is Ctrl-b by default | |
PREFIX ? # Lists all commands available | |
PREFIX d # Detaches window | |
PREFIX c # New window | |
PREFIX , # Rename window | |
PREFIX n # Next window |
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
# Setup | |
git config --global user.name "Erik Cox" | |
git config --global user.email "[email protected]" | |
git config --global color.ui auto | |
# Creating a new local repository | |
git init | |
# Cloning | |
git clone <URL> |
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
mkvirtualenv [ENV_NAME] # creates and activates a fresh virtual environment | |
rmvirtualenv [ENV_NAME] # removes virtual environment | |
workon [ENV_NAME] # activates an already-created virtual environment | |
deactivate # deactivates the virtual environment that is currently active | |
# within an activated virtualenv | |
pip install [PACKAGE_NAME] #installs a package into the virtualenv | |
pip freeze # lists the packages that is installed & accessible within the virtualenv |
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
android update sdk --no-ui --all |
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
function fizzBuzz(n) { | |
for (i = 0; i <= n; i++) { | |
if (i % 15 === 0) { | |
console.log("FizzBuzz"); | |
} else if (i % 3 === 0) { | |
console.log("Fizz"); | |
} else if (i % 5 === 0) { | |
console.log("Buzz"); | |
} else { | |
console.log(i); |
OlderNewer