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
View func.sublime-snippet
<snippet>
<content><![CDATA[function() {
${1:}
}]]></content>
<tabTrigger>func</tabTrigger>
<scope>source.js</scope>
<description>function(){}</description>
</snippet>
@aronwoost
aronwoost / gist:4f27d5642f12406ed754
Created Jul 3, 2014
super-simple svg feature detection
View gist:4f27d5642f12406ed754
<script>
function addClass(el, cl) {
el.className += ' ' + cl;
}
function supportsSVG() {
return !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect;
}
if(supportsSVG) {
View gist:116c17f9d98ae2c61eb7
// copy-paste into console
fetch('https://api.github.com/gists', {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Hubot',
login: 'hubot',
@aronwoost
aronwoost / index.html
Created Aug 24, 2011
Retrieve "anonymously" data from a foursquare checkin. You don't need to follow the person who checked in. However, the checkin must have been made public (e.g. via twitter)
View index.html
<!DOCTYPE html>
<head>
<title>4sq image request</title>
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript">
// set the following appropriately
var testUrl4sq = "XXX",
bitlyUsername = "XXX",
bitlyApiKey = "XXX",
@aronwoost
aronwoost / kafka.html
Created Sep 15, 2011
Kafka test file
View kafka.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Kafka</title>
</head>
<body>
<div><p>Jemand mußte Josef K. verleumdet haben, denn ohne daß er etwas
Böses getan hätte, wurde er eines Morgens verhaftet. Die Köchin der
Frau Grubach, seiner Zimmervermieterin, die ihm jeden Tag gegen
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'
@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);
@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 / 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>
View gist:2887542
-webkit-overflow-scrolling: touch;
You can’t perform that action at this time.