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 |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Movable and Re-sizable Raphael JS Shape</title> | |
</head> | |
<body> | |
<div id="paper"></div> |
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 |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
[alias] | |
verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/bin/zsh | |
# Compatible with bash, just change "zsh" to "bash" | |
# First param: The folder that the original file is stored in | |
# Second param: The original image name | |
sips --resampleWidth 512 "${1}/${2}" --out "${1}/iTunesArtwork" | |
sips --resampleWidth 57 "${1}/${2}" --out "${1}/Icon.png" | |
sips --resampleWidth 114 "${1}/${2}" --out "${1}/Icon@2x.png" | |
sips --resampleWidth 29 "${1}/${2}" --out "${1}/Icon-Small.png" | |
sips --resampleWidth 58 "${1}/${2}" --out "${1}/Icon-Small@2x.png" |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
#!/usr/bin/perl | |
my $dev = "/sys/class/leds/led0/brightness"; | |
my $OFF = "1"; | |
my $ON = "0"; | |
my ($ip) = `ifconfig`=~/ddr:(.*?) /; | |
#print $ip; | |
# Strip out the .'s | |
$ip =~ s/\.//g; |
# How to create a favicon with multiple image sizes and keep alpha transparency | |
- export your images in the desired sizes (16x16, 32x32 ... max 256x256) as PNGs + alpha | |
- install ImageMagick | |
Run this command (replacing the .png files for your own images): | |
convert favicon-16.png favicon-32.png favicon-64.png -colors 256 -alpha background favicon.ico |
Copy this file to: /Library/LaunchDaemons/fwd-80-to-3000.plist
and then reboot:
$ sudo -s
$ curl -L https://gist.github.com/TooTallNate/3372589/raw/ace6451e9e47f59550f12d09cb924a64531cfd1f/fwd-80-to-3000.plist > /Library/LaunchDaemons/fwd-80-to-3000.plist
$ reboot