Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Copyright (c) 2013 Niggler
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTW
@sandywu
sandywu / animation.html
Created November 26, 2012 15:39 — forked from jsermeno/animation.html
Three.js Troll Animation Morph Targets
<!doctype html>
<html>
<head>
<title>Three.js - Game</title>
<meta charset="utf-8">
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
@sandywu
sandywu / .tm_properties
Created August 29, 2012 15:39
My textmate properties file
TMGIT = "/usr/local/bin/git"
PATH = "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:$PATH"
NODEPATH = "/usr/local/lib/node_modules"
fontName = "Monaco"
fontSize = 14
tabSize = 2
softTabs = Spaces
exclude = "{.{o,pyc},Icon\r,CVS,darcs,MTN,{arch},blib,~.nib}"
@sandywu
sandywu / perferences.json
Created August 23, 2012 02:27 — forked from soffes/perferences.json
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns": [
".DS_Store",
".gitkeep",
"dump.rdb"
],
"folder_exclude_patterns": [
@sandywu
sandywu / gist:3414874
Created August 21, 2012 11:53 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@sandywu
sandywu / index.js
Created August 20, 2012 06:31 — forked from max-mapper/index.js
official semicolon style of @maxogden
Mdb.prototype.toCSV = function(table, cb) {
;;;;var cmd = spawn('mdb-export', [this.file, table])
;;;;cmd.stdout.pipe(
;;;;;;;;concat(function(err, out) {
;;;;;;;;;;;;if (err) return cb(err)
;;;;;;;;;;;;if (!out) return cb('no output')
;;;;;;;;;;;;cb(false, out.toString())
;;;;;;;;})
;;;;)
}
echo "Hi, I'm Douglas Crockford. What do you want?";
while read question
do
what="$question"
if [ -z "${what}" ]; then
echo "Stop waisting my time."
exit
else
@sandywu
sandywu / gist:3207479
Created July 30, 2012 14:45 — forked from madrobby/gist:3201472
Check if the browsers supports SVG
// comments welcome, there may be better ways to do this!
function supportsSVG(){
return !!('createElementNS' in document &&
document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect)
}
@sandywu
sandywu / gist:3071570
Created July 8, 2012 16:14
TextMate 2 .tm_properties

This is all based on the [alpha release][1].

Properties

From the built-in help system:

For many settings TextMate will look for a .tm_properties file in the current folder and in any parent folders (up to the user’s home folder).

These are simple setting = value listings where the value is a format string in which other variables can be referenced.