Skip to content

Instantly share code, notes, and snippets.

@thebinarypenguin
thebinarypenguin / movable-resizable-raphael
Created January 4, 2012 02:43
Movable and re-sizable rectangle using Raphael SVG
<!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>
@msluyter
msluyter / gist:1925069
Created February 27, 2012 16:22
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@jcaraballo
jcaraballo / git-branch-between-different-repositories.md
Created March 6, 2012 01:05
How to fork a github repository in bitbucket

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@remi
remi / .gitconfig
Created March 20, 2012 19:20
Find the most used verbs in your Git commit messages
[alias]
verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#
@rnystrom
rnystrom / Iphone Icon.png Bash Script
Created April 5, 2012 15:04 — forked from jessedc/iOS Icon.png bash script
A simple bash script using OSX command line tool sips to resample a 512x512px image
#!/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"
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
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"
@chrismeyersfsu
chrismeyersfsu / blink_ip.pl
Created June 2, 2012 15:27
Raspberry Pi Blink Ip Address
@ricardobeat
ricardobeat / favicon.txt
Created June 4, 2012 20:36
Create multiple-size, alpha transparent favicon.ico
# 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
@TooTallNate
TooTallNate / README.md
Last active October 8, 2015 18:38
Forward port 80 traffic from 127.0.0.1 to port 3000 at bootup on OS X

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