Skip to content

Instantly share code, notes, and snippets.

Aron Woost aronwoost

Block or report user

Report or block aronwoost

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aronwoost
aronwoost / gist:3755801
Created Sep 20, 2012
JSHint global's for tests with Mocha, expect.js and sinon.JS (work in progress)
View gist:3755801
{
"describe",
"xdescribe",
"it",
"xit",
"before",
"after",
"beforeEach",
"afterEach",
"expect",
@aronwoost
aronwoost / example1.js
Created Jul 30, 2012
Pseudo example code for saving text fragments in HTML (or epubs)
View example1.js
/*
Looking for "and".
Markup is the following:
<body>
<div id="text">Pride and Prejudice</div>
</body>
*/
var range = {
View gist:2887578
<script type="text/javascript">
document.addEventListener("touchmove", function(evt){
evt.preventDefault();
}, false);
var container = document.getElementById("container");
container.addEventListener("touchmove", function(evt){
evt.stopPropagation();
}, false);
View gist:2887552
<html>
<head>
<style>
...
#subcontainer {
height:100%;
overflow-y: auto;
}
...
</style>
View gist:2887542
-webkit-overflow-scrolling: touch;
@aronwoost
aronwoost / dir.sublime-snippet
Created Mar 26, 2012
Sublime Text 2 snippet for console.dir() TAB completion
View dir.sublime-snippet
<snippet>
<content><![CDATA[console.dir(${1:});]]></content>
<tabTrigger>dir</tabTrigger>
<scope>source.js</scope>
<description>console.dir()</description>
</snippet>
@aronwoost
aronwoost / log.sublime-snippet
Created Mar 26, 2012
Sublime Text 2 snippet for console.log() TAB completion
View log.sublime-snippet
<snippet>
<content><![CDATA[console.log(${1:});]]></content>
<tabTrigger>log</tabTrigger>
<scope>source.js</scope>
<description>console.log()</description>
</snippet>
@aronwoost
aronwoost / gist:1986185
Created Mar 6, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:1986185

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
@aronwoost
aronwoost / gist:1582537
Created Jan 9, 2012
Basic JavaScript performance test
View gist:1582537
var start = new Date();
for (var i=0; i < 10; i++) {
// the action
};
diff = new Date() - start;
console.log(diff);
View gist:1315807
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Epub.date_published'
You can’t perform that action at this time.