Skip to content

Instantly share code, notes, and snippets.

@tobinibot
tobinibot / test.md
Last active March 6, 2017 18:45
Markdown Test
  1. one
  2. two
  3. three
  • x
  • y
  1. four
@tobinibot
tobinibot / keybase.md
Created September 28, 2014 03:35
keybase.md

Keybase proof

I hereby claim:

  • I am tobinibot on github.
  • I am tobinibot (https://keybase.io/tobinibot) on keybase.
  • I have a public key whose fingerprint is 2A0B D03B 241B 3A97 E527 D169 0A1B BA2D 0E36 9EED

To claim this, I am signing this object:

@tobinibot
tobinibot / date.sql
Last active December 19, 2015 14:49 — forked from johngrimes/date.sql
Include the quarter in the dimension table, also go back to Jan 1 2009
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */
###### small-numbers table
DROP TABLE IF EXISTS numbers_small;
CREATE TABLE numbers_small (number INT);
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
###### main numbers table
DROP TABLE IF EXISTS numbers;
CREATE TABLE numbers (number BIGINT);

Snow in canvas land

Other people's code is awful, and your own code from months previous counts as someone else's. With this and the festive spirit in mind, I dug up a canvas snow demo I made two years ago to see how bad my code really was.

Turns out the performance landscape has changed quite a bit, but after applying a couple of workarounds, best practices, and memory management, I got the demo running smoother than it ever did.

Ugh, I can't believe I just wrote "performance landscape". Anyway...

How does the demo work?

@tobinibot
tobinibot / hatchshow.js
Created December 4, 2012 22:44 — forked from charliepark/hatchshow.js
A jquery typography plugin.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(window).load(function(){
$().hatchShow();
});
jQuery.fn.hatchShow = function (maxSize) {
if (!maxSize)
maxSize = 10000;
@tobinibot
tobinibot / dabblet.css
Created January 24, 2012 17:51 — forked from daneden/dabblet.css
Light loader
/**
* Light loader
*/
* {
margin: 0;
padding: 0;
}
html {
/**
* TEST
*/
color: rgba(255, 255, 255, .5);
background: linear-gradient(45deg, #f06, yellow);
text-align: center;
font-family: 'Helvetica Neue';
font-weight: 100;
font-size: 144pt;
<script type="text/javascript">
$(function() {
//all hover and click logic for buttons
$(".fg-button:not(.ui-state-disabled)").hover(
function() {
$(this).addClass("ui-state-hover");
if ($(this).data('__mousedown')) {
if($(this).is('.ui-state-active.fg-button-toggleable, .fg-buttonset-multi .ui-state-active'))
$(this).removeClass("ui-state-active");
else
@tobinibot
tobinibot / Sample state select box.html
Created August 27, 2008 22:33
A sample select for the 50 states, so you don't need to create one from scratch.
<select id="state" name="state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District of Columbia</option>