Skip to content

Instantly share code, notes, and snippets.

View samuelcotterall's full-sized avatar

Samuel Cotterall samuelcotterall

View GitHub Profile
Order headphones
Return t-shirt
[Wedding] Call printer
@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;
}
@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 / .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}"
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){
filetype off
set nocompatible
set encoding=utf8
" Shhhhh!
set noerrorbells
set visualbell
" Syntax
syntax on
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
<div class="ml_10 fl_l stay_info">
<div class="box_380 fl_r gallery" id="hotelGallery_f32c3f2e-800b-4547-8fc1-461099d1470b">
...
</div>
<p><span class="pink_highlight">Hotel</span>Velvet Hotel is a 19 bedroom Bespoke Hotel located on Canal Street, part of
Manchester’s Village. Minutes away from Piccadilly train station, the Northern
Quarter, the exclusive shopping districts and theatres, offering King-rooms,
Balcony Kings overlooking Canal Street and luxury Penthouse Suites.</p>
<script type="text/javascript">
<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33284346-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
/*
<div class="tiles">
<div class="a1"></div>
<div class="a2"></div>
<div class="a3"></div>
<div class="a4"></div>
<div class="b1"></div>
<div class="b2"></div>
<div class="b3"></div>