Skip to content

Instantly share code, notes, and snippets.

View erikhazzard's full-sized avatar

Erik Hazzard erikhazzard

View GitHub Profile
@erikhazzard
erikhazzard / gist:1736422
Created February 4, 2012 08:41
individual match
GET /0ba4353379f16907fea31fe0c73b25d9bb0c7437d34fa2a0c077e58ac67064c5.s2mh HTTP/1.1
User-Agent: Battle.net Web Client
Host: US.depot.battle.net:1119
Accept: */*
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: text/plain; charset=UTF-8
Date: Sat, 04 Feb 2012 08:36:20 GMT
@erikhazzard
erikhazzard / gist:1821595
Created February 13, 2012 23:58
getbbox cs getcomputedlength
<html>
<meta charset='utf-8' />
<head>
</head>
<body>
<svg>
<text id='text_node' y="20px" text-anchor="start" opacity="1">
<tspan>You</tspan>
<tspan dx='.5em'>shall</tspan>
<tspan dx='.5em' dy='.9em'>not</tspan>
@erikhazzard
erikhazzard / index.html
Created February 14, 2012 18:54
d3 tspan append
<html>
<meta charset='utf-8' />
<head>
</head>
<body>
<svg>
<text id='text_node' y="20px" text-anchor="start" opacity="1">
<tspan>You</tspan>
<tspan dx='.5em'>shall</tspan>
<tspan dx='.5em' dy='.9em'>not</tspan>
@erikhazzard
erikhazzard / index.html
Created February 14, 2012 19:02 — forked from enjalot/index.html
d3 tspan append
<html>
<meta charset='utf-8' />
<head>
</head>
<body>
Pause Delay (ms): <input id='pause_delay' type='text' placeholder=200 />
<input id='render_nodes_blocking' value='Render (blocking)' type='button' style='font-size:1.2em;'/>
<input id='render_nodes_non_blocking' value='Render (non blocking)' type='button' style='font-size:1.2em;'/>
<br />
<hr />
#!/bin/bash
PATH=/usr/sbin:/usr/bin:/sbin:/bin
#Must pass in the user (e.g., vagrant)
# If no user passed in, assume vagrant
if [ -z $1 ]
then
user_dir='vagrant'
else
user_dir=$1
@erikhazzard
erikhazzard / gist:2834632
Created May 30, 2012 08:47
javascript object creation
//The top level function we'll use to create objects from
// (will basically act as a factory for object creation
var createObjects = function(){};
//Define the create function. It's not defined inside the function
// so we don't need to call it to access it. i.e., if this was
// inside createObjects, we'd need to do createObjects().create
createObjects.create = function(name){
//newObject will reference the created object
<svg title="Visual.ly Chart " version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" space="preserve" Title="Visual.ly Chart ">
<g id="_x40_starcraft-tournamentwinningsarea" transform="translate(255.5546875,7.8515625)"><image height="168" width="295.596435546875" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAScAAACoCAYAAACiyyj4AAAgAElEQVR4Xu2diXMb153n+8YNNG4CPMD7kChS9x1bdhTbmdjOOrup2c1spWqqpmb+ud3aTM3sxjsz3sQZjxPrlkVRvO8D940+0Ne+lgwZgkARBAESx492mfXMRvfrb7/3we/369/7PfzT//4P+5hSpBmKxEmSIHEMwwgNk3GSoDVVlTCcoDH0u7ytqUqRIElGlZUi+hBzYFtRZJwgKU1TZAL9VivbmqbhGI7+ffVbrdZWtbr6IghiUVFUBse0ooYTDK6qsobjFLq/V78r2hi6Nrr1152p1kbdlDWCoHFMlVCPadSW3miXrqUpRQ1D1zyofUhffuzbK2Hq6kupb9CXN59RB+pSFARZVTEKJzAN/YOj/6B/cby8TeC4jP4vjQa4hI6lCQJDY/jtNoFjRUXFGJLAiqqGMZVtdHZZU3GKINE8Qtc8qF1PXxTElaKsUIokZWk59z3+i//6tzGzgaZJhCVP7xBvsrtEAlN5gqLMCCYcgpMZUxWuvI1rShYnKbsiyeg3aT+wXZR4n
<svg version="1.1" id="4fd10ef2fd8774ade500001c" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" space="preserve" title="Visual.ly Chart " Title="Visual.ly Chart ">
<g id="_x40_starcraft-tournamentwinningsarea" transform="translate(255.55470275878906,7.853499889373779)"><rect class="bgRect" width="253.3192138671875" height="150" x="0" y="0" style="fill: #ffffff; opacity: 0; "></rect><g class="chart_axes"></g><g class="chart_extra"><g class="chart_lines"><rect class="odd" y="0" height="150" x="0" width="1.6776106878621688" style="fill: #336699; fill-opacity: 0.2; "></rect><rect class="odd" y="0" height="150" x="0" width="1.6776106878621688" style="fill: #74a9cf; fill-opacity: 0.7; "></rect></g><g class="chart_lines"><rect class="even" y="0" height="150" x="1.6776106878621688" width="1.6776106878621688" style="fill: #74a9cf; fill-opacity: 0.2; "></rect><rect class="even" y="0" hei
@erikhazzard
erikhazzard / gist:2963791
Created June 21, 2012 04:09
less makefile example
CHECK=\033[32m✔\033[39m
HR= ==================================================
LESS_FILES = static/less/less_variables.less \
static/less/base.less \
static/less/layout.less \
03ZhkPA9Oct7wKaEW1sOFmZ1YhnUa/5G2wC
eA1RmUBaJEgYq2yecPP4dJ2IZH+B4wat83V
mhck+QJMTJryiaHOeLqHQ5odurdHwzFYQJ9
nKbYzhdQlxCHRI8vKfVmGcS/IfrhwWP4bVK
c8jMTvQ0Vty4Wh/6Yzn+ZnQMHobW5imA=