Skip to content

Instantly share code, notes, and snippets.

@aarondai
aarondai / HTML:Starting Template
Created July 16, 2014 05:57
HTML:Starting Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
@aarondai
aarondai / gist:221194893313c9e36ff4
Last active August 29, 2015 14:04
Jut: Proc Test Header
var testutils = require('testutils');
var JuttleQuery = require('../../juttle-query');
var environment = require('testutils/environment');
var expect = require('chai').expect;
var auth = require('auth');
var jut_ports = require('jut-ports');
var _ = require('underscore');
var ImportSimpleData = require('../juttle-query.import.simple');
var ImportDemoData = require('../juttle-query.import.demo');
testutils.depends('service-auth', 'service-data', 'service-deployment');
@aarondai
aarondai / gist:62c7c4c1f388a34a7816
Last active August 29, 2015 14:04
Sublime Text: Great Plugins
# Awesome Plugins for Sublime Text 2
* AdvancedNewFile
* All Autocomplete
* DocBlockr
* Emmet
* Gist (this)
* HTML-CSS-JS Prettify
* JavaScript Snippets
* JSON Lint
* PlainTasks
@aarondai
aarondai / gist:5c73325d25affbac9737
Created July 16, 2014 08:05
Kitchen: Chef Knives
* Wusthof Ikon
* Henckels twin
* Shun Premier
* Shun Classic
* Mac Mighty (Chef Pro series)
* Mac Chef knife (with dimples)
* Global G-2
* Global cooks knife (heavy duty)
* Messermeister Meridian
@aarondai
aarondai / gist:3fa314b5d2cff83a34a4
Last active August 29, 2015 14:04
NodeJS: Log Item
console.log(JSON.stringify(myObject, null, 4));
@aarondai
aarondai / gist:aeec1f443d71ca57754c
Last active August 29, 2015 14:04
BASH: Read File Line By Line
#!/bin/bash
FILE=$1
while read line; do
echo "This is a line : $line"
done < $FILE
@aarondai
aarondai / gist:cdbde0199fd47e841f7b
Created July 16, 2014 08:08
BASH: Get Relative Path
python -c "import os.path; print os.path.relpath('/foo/bar', '/foo/baz/foo')"
@aarondai
aarondai / Client.java
Last active August 29, 2015 14:04
Java: XMLRPC
try(BufferedReader br = new BufferedReader(new FileReader("file.txt"))) {
StringBuilder sb = new StringBuilder();
String line = br.readLine();
while (line != null) {
sb.append(line);
sb.append(System.lineSeparator());
line = br.readLine();
}
String everything = sb.toString();
@aarondai
aarondai / gist:139961e1801178247055
Created July 16, 2014 08:13
Java: Iterate Through HashMap
// If youre only interested in the keys, you can iterate through the keySet() of the map:
for (String key : map.keySet()) {
// ...
}
// If you only need the values, use values():
for (Object value : map.values()) {
// ...
}
@aarondai
aarondai / asset.sh
Created July 16, 2014 08:14
BASH: Interleave Two Documents
paste -d '\n' file1 file2