Skip to content

Instantly share code, notes, and snippets.

View samuelcotterall's full-sized avatar

Samuel Cotterall samuelcotterall

View GitHub Profile
Process: Google Chrome Canary [14559]
Path: /Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary
Identifier: com.google.Chrome.canary
Version: 20.0.1116.0 (1116.0)
Code Type: X86 (Native)
Parent Process: launchd [287]
Date/Time: 2012-04-25 18:05:45.943 +0100
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
filetype off
set nocompatible
set encoding=utf8
" Shhhhh!
set noerrorbells
set visualbell
" Syntax
syntax on
var keywords = new Array("lorem", "ipsum", "dolor");
var input = "Something something dolor something something";
var input2 = "dolor";
// http://documentcloud.github.com/underscore/#indexOf
if (_.indexOf(keywords, input) !== -1){
// false
}
if (_.indexOf(keywords, input2) !== -1){
@samuelcotterall
samuelcotterall / .tm_properties
Created April 2, 2012 15:10
My TextMate 2 Properties
# https://gist.github.com/2284235
# Display the name of the home directory.
windowTitle = "$TM_DISPLAYNAME — ${CWD/^.*\///}"
# Omit .tm_properties so it doesn't show in the browser.
include = ".htaccess"
# Exclude old *.tmproj files.
exclude = "{$exclude,*.tmproj}"
@samuelcotterall
samuelcotterall / .tm_properties
Created April 2, 2012 15:10
My TextMate 2 Properties
# Display the name of the home directory.
windowTitle = "$TM_DISPLAYNAME — ${CWD/^.*\///}"
# Omit .tm_properties so it doesn't show in the browser.
include = ".htaccess"
# Exclude old *.tmproj files.
exclude = "{$exclude,*.tmproj}"
# Variables.
TM_GIT = "/usr/local/bin/git"
@samuelcotterall
samuelcotterall / gist:2234777
Created March 29, 2012 08:06
Module Pattern Redux
function newMyApp() {
var x = 1;
var y = 2;
var that = {};
function fullName(fn,sn){
return fn + sn;
}
Order headphones
Return t-shirt
[Wedding] Call printer
@samuelcotterall
samuelcotterall / gist:1717571
Created February 1, 2012 15:37
Preload example
<div style="display: none;">
<img src=”image1.png” />
<img src=”image2.png” />
<img src=”image3.png” />
</div>
@samuelcotterall
samuelcotterall / Textmate2 Compatible.tmPreferences
Created January 20, 2012 15:16
JavaScript JSLintMate.tmbundle workaround
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>changed</key>
<dict>
<key>name</key>
<string>Textmate2 Compatible</string>
<key>settings.shellVariables</key>
<array>
@samuelcotterall
samuelcotterall / Textmate2 Compatible.tmPreferences
Created January 20, 2012 15:16
JavaScript JSLintMate.tmbundle workaround
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>changed</key>
<dict>
<key>name</key>
<string>Textmate2 Compatible</string>
<key>settings.shellVariables</key>
<array>