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 / README.md
Last active Apr 3, 2019
HTML base template
View README.md

python -m SimpleHTTPServer

@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 / 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
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 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
Last active Jul 16, 2018
How to install node.js and CouchDB on a Google Compute Engine instance
View README.md

#How to install node.js and CouchDB on a Google Compute Engine instance

Start and ssh into instance

Make sure you have a Google Compute engine account, have a project created and the gcutil command line tool installed.

Since want to ssh without the gcutil tool, you need to a your ssh key to the instance in addition to the already existing google_compute_engine key (used for gcutil).

@aronwoost
aronwoost / gziped_sync.sh
Last active Apr 27, 2017
gzip octopress files and sync them to S3 and CloudFront with s3cmd. Original script by Julian Schrittwieser (https://github.com/mononofu) - http://www.furida.mu/blog/2012/02/29/gzip-your-octopress.
View gziped_sync.sh
#!/bin/bash
# compress the files if they aren't
find public/ -iname '*.html' -exec ./gzip_if_not_gzipped.sh {} \;
find public/ -iname '*.js' -exec ./gzip_if_not_gzipped.sh {} \;
find public/ -iname '*.css' -exec ./gzip_if_not_gzipped.sh {} \;
# change their name back
find public -iname '*.gz' -exec bash -c 'mv $0 ${0/.gz/}' {} \;
echo "gzipping successful"
@aronwoost
aronwoost / ref.sublime-snippet
Last active Jun 17, 2016
react jsx self executing function block
View ref.sublime-snippet
<snippet>
<content><![CDATA[{
(function(self){
${1:}
})(this)
}]]></content>
<tabTrigger>ref</tabTrigger>
<scope>source.js</scope>
<description>jsx self executing function</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 / index.js
Created Dec 12, 2013
Octopress. Extract date from filename and add to post header.
View index.js
var fs = require("fs");
var async = require("async");
var folder = "source/_posts";
fs.readdir(folder, function(err, result) {
async.each(result, function(file, callback){
var date = file.split("-").slice(0, 3).join("-"),
dateStr = "date: "+date+" 00:00:00 +0100";
You can’t perform that action at this time.