Skip to content

Instantly share code, notes, and snippets.

Avatar

Taylor buley

  • McNaughton Newspapers, Inc.
  • Winters, California
View GitHub Profile
View background.html
<!DOCTYPE html>
<html>
<head>
<script>
// 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() {});
});
</script>
View Bang bang bang‽
javascript:jQuery(".twitter-anywhere-tweet-box-editor").val(jQuery(".twitter-anywhere-tweet-box-editor").val().replace("?!","‽").replace("!?","‽"));
View gist:872974
[timetric config="%7B%22axisPerSeries%22%3Afalse%2C%22series%22%3A%5B%7B%22url%22%3A%22http%3A%2F%2Ftimetric.com%2Fembed%2F0__E7GMxTsafiPcoRkrhgg%2Findex%2F%22%2C%22lineWidth%22%3A0%2C%22color%22%3A%220x1B95D9%22%7D%2C%7B%22url%22%3A%22http%3A%2F%2Ftimetric.com%2Fembed%2FHpP88dY4ShWKg3xLAz9xFg%2Findex%2F%22%2C%22lineWidth%22%3A0%2C%22color%22%3A%220xCAC272%22%7D%2C%7B%22url%22%3A%22http%3A%2F%2Ftimetric.com%2Fembed%2Fny-ymUYASiqN9SiHdRXMrw%2Findex%2F%22%2C%22lineWidth%22%3A0%2C%22color%22%3A%220xF05E27%22%7D%5D%7D" width="600" height="400"/]
@buley
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
http://www.websequencediagrams.com/?lz=QmFjay0-Z3JhdmVsIHBpdDogY2hlY2sgb3V0CgAWBkZvcnRoOiBNeXN0ZXJ5CgAKBQAlDQAnCgAVB0JhY2s6IFVuAFAFaW5n&s=napkin
View gist:1272931
### Reporters
#
# reporter
#
##
Reporters->Notebooks:curate
Reporters->String:create
Reporters->Activities:publish
Reporters->Interface:dashboard
@buley
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 [indbapp.dev.js][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
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
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
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>.