Skip to content

Instantly share code, notes, and snippets.

View blowery's full-sized avatar

Ben Lowery blowery

View GitHub Profile
@blowery
blowery / reload-chrome
Created October 26, 2012 17:53
Reload the active tab in Chrome
#!/bin/bash
osascript ~/dotfiles/bin/reload-chrome.osa
@blowery
blowery / index.html
Created April 25, 2012 18:45 — forked from abeppu/index.html
candlestick charts using d3
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js?1.25.0"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body>
<div id="chart"></div>
@blowery
blowery / tunlr
Created November 11, 2011 15:05 — forked from phiggins42/tunlr
tunlr!
#!/usr/bin/env node
/*
tunlr - simple SSH tunnel management
usage: tunlr [options] [command]
options:
-q quiet. suppress console output.
@blowery
blowery / foo.css
Created October 26, 2011 01:36
renaissanceww css hacks
.comment {
padding: 1em;
clear: left;
}
.comment-author-avatar {
float: left;
}
.comment-content {
<project>
<!-- this build is meant to be invoked by maven -->
<target name="uptodate" unless="dojo.skipbuild">
<uptodate property="dojo.skipbuild"
targetFile="${dojo.build.release.location}/${dojo.build.release.name}/dojo/dojo.js">
<srcfiles dir="${js.source}">
<include name="**/*.js" />
<include name="**/*.html" />
<include name="**/*.css" />
<include name="**/*.gif" />
<!DOCTYPE HTML PUBLIC>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>euro</title>
<script type="text/javascript" charset="utf-8">
window["€"] = { foo: "yes" };
console.dir(window["€"]);
</script>
</head>
dojo.provide("dojox.mustache._Templated");
dojo.require("dijit._Templated");
//
// INSTALL: copy http://github.com/janl/mustache.js to this folder as _base.js
// Add dojox.mustache = dojo.hitch(Mustache, "to_html") in _base.js, wrapping
// the whole file in a self-executing-anonymous-function. eg:
//
// dojo.provide("dojox.mustache._base");
// (function(){
// /* contents of Mustache.js */
function itWorked(response) { console.log("yay!"); }
function itFailed(err) { console.error("boo!", err); }
// in dojo 1.4+
var theForm = dojo.byId("theForm"); // assumes <form id="theForm"> is what you want
var def = dojo.xhrPost({
url: "/send/it/here",
rawBody: dojo.formToJson(theForm),
~/src/node (master)
> node
Type '.help' for options.
node> var puts = require("sys").puts;
node> puts(5*2)
10
node>
// assumes dojo base is loaded
(function(d) {
var spels = {
destroy: [ "destory" ],
connect: [ "conect"]
};
for(var x in spels) {
d.forEach(spels[x], function(n) {