Skip to content

Instantly share code, notes, and snippets.


Taylor buley

  • McNaughton Newspapers, Inc.
  • Winters, California
View GitHub Profile
View background.html
<!DOCTYPE html>
// Fired when a URL is visited, providing the HistoryItem data for that URL.
chrome.history.onVisited.addListener(function(historyItem) {
// Deletes all items from the history.
chrome.history.deleteAll(function() {});
View Bang bang bang‽
View gist:872974
[timetric config="" width="600" height="400"/]
buley / gist:1272846
Created Oct 8, 2011
Flow Diagram - Wu Tang's Gravel Pit
View gist:1272846
Back->gravel pit: check out
Back->Forth: Mystery
Forth->gravel pit:check out
Forth->Back: Unraveling
View gist:1272931
### Reporters
# reporter
buley / gist:1273310
Created Oct 9, 2011
Database Schema
View gist:1273310
# Accounts
note over Accounts: id* (int) [auto]
note over Accounts: user_id (string)
note over Accounts: user_name (string)
note over Accounts: reporter_id (string)
View gist:1375163
I'm working on an IndexedDB-only wrapper for just this purpose. If you don't mind that it's not yet released, there's not readme and my commits are fast-paced and not descriptive than maybe you should [check it out][1].
There should be an example of every function in [][2]. Here's how you would use the vanilla `InDBApp`:
I am in my third rewrite of a JavaScript application that heavily relies on IDB. I got sick of writing boilerplate IndexeDB code (setting up transactions, setting onsuccess callbacks, etc.) and decided to write a reusable interface.
That API is true to the IndexedDB spec and is now the core of InDB. It servers as a private object inside a wrapper that tries to simplify the interface. I'm writing my own [libraries][3] on top of it so I'm learning about what works and doesn't work and trying to improve InDB along the way.
buley / gist:1381200
Created Nov 20, 2011
Generalized cursor update
View gist:1381200
InDB.cursor.update = function (store, index, keyRange, data, direction, on_success, on_error, on_abort) {
var request, transaction, tx, transaction_index, update_request, cursor, value, attr;
try {
tx = InDB.db.transaction([database], type, timeout);
transaction = request.objectStore(database);
} catch (event) {
throw ('Transaction error');
buley / gist:1503237
Created Dec 20, 2011
Where's Waldo?
View gist:1503237
var Waldo = Waldo || {};
Waldo.logging = true;
(function () {
var keys = {
var el = document.getElementsByTagName('canvas');
var that = this;
var Mouse = {};
buley / file1.txt
Created Feb 26, 2012
This is a test 1
View file1.txt
<div id="testing"><strong>That</strong> was a test 4</div>.