Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.21" |
sudo apt-get update | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' | |
sudo apt-get install -y vim curl python-software-properties | |
sudo add-apt-repository -y ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug |
push = +refs/heads/master:refs/heads/gh-pages | |
push = +refs/heads/master:refs/heads/master |
stack1 = [] | |
stack2 = [] | |
def enqueuue(a): | |
stack1.append(a) | |
def dequeue(): | |
if len(stack2) > 0: | |
return stack2.pop() | |
elif len(stack2) == 0 and len(stack1) > 0: |
def braces_validator(string): | |
openers = "({[" | |
closers = ")}]" | |
stack = [] | |
for char in string: | |
if char in openers: | |
stack.append(openers.index(char)) | |
elif char in closers: | |
if len(stack) == 0 or stack.pop() != closers.index(char): | |
return False |
openers = "({[" | |
closers = ")}]" | |
def paranthesis_match(string, pos): | |
stack = [string[pos]] | |
for i in range(pos + 1, len(string)): | |
if string[i] in openers: | |
stack.append(string[i]) | |
if string[i] in closers: | |
stack.pop() |
for file in `find . -type f -name "*.jpg"` | |
do | |
thumbnail_file="./thumbnail/${file##*/}" | |
if [ ! -e "${file%/*}/thumbnail" ]; then mkdir -p "${file%/*}/${thumbnail_dir}"; fi | |
echo "Create thumbnail for image $file" | |
`convert -thumbnail x300 $file $thumbnail_file` | |
done |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |