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:1000402
Created May 31, 2011
Exclude private ip addresses from google analytics tracking
View gist:1000402
(function(){
var re = /(^127\.0\.0\.1)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|localhost/;
if(re.test(window.location.hostname)) return;
var _gaq=[['_setAccount','UA-23156659-1'],['_trackPageview'],['_trackPageLoadTime']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
})();
@aronwoost
aronwoost / README.md
Created Jul 25, 2011
How to install LAMP on a EC2 Amazon AMI
View README.md

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@aronwoost
aronwoost / README.md
Created Jul 25, 2011
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance
View README.md

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI

@aronwoost
aronwoost / README.md
Created Aug 9, 2011
Super basic implementation of the monocle framework (for displaying html files in book form)
View README.md

This gist should give you a starting point, of how to implement the monocle framework.

The framework can much more. Check the examples in the test folder.

Make sure you have the monocle framework present in the folder js. You should clone it with git but you can also download it via the Download button.

@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 / 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>
You can’t perform that action at this time.