Skip to content

Instantly share code, notes, and snippets.

View amowu's full-sized avatar

Amo Wu amowu

View GitHub Profile

#Sublime Text 2 - Shortcuts (Mac OSX)

##Default

###General

Command Shortcut
Command palette + + P
Toggle side bar + K + B
@amowu
amowu / install-nvm.sh
Last active December 15, 2015 16:58 — forked from popomore/gist:3794407
Install nvm and node on zsh.
git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> ~/.zshrc
zsh
nvm install v0.10.0
nvm alias default v0.10.0
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data --default-character-set=utf8 -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="http://d3js.org/d3.v2.js"></script>
<style>
line.arrow {
stroke: #666;
@amowu
amowu / comment.js
Last active August 29, 2015 14:11 — forked from edokeh/index.js
/* code is far away from bug with the animal protecting
* ┏┓   ┏┓
*┏┛┻━━━┛┻┓
*┃       ┃  
*┃   ━   ┃
*┃ ┳┛ ┗┳ ┃
*┃       ┃
*┃   ┻   ┃
*┃       ┃
*┗━┓   ┏━┛
@amowu
amowu / iterm2.md
Last active August 29, 2015 14:13

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [
// C# example
using UnityEditor;
using System.IO;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
class PerformBuild
{
static string[] GetBuildScenes()
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
function getZodiacSign(date) {
if(!(date instanceof Date)) date = new Date();
var dateStr = +[
date.getMonth() + 1,
('0' + date.getDate()).slice(-2)
].join('')
,signs = [
[120, 'Capricorn'],
[219, 'Aquarius'],
@amowu
amowu / README.md
Created October 27, 2015 11:06 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage