Skip to content

Instantly share code, notes, and snippets.

View buley's full-sized avatar
🤑

Tay buley

🤑
View GitHub Profile
@buley
buley / gist:0eaf53993e0c4e6c1d35
Last active August 29, 2015 14:27 — forked from pbiggar/gist:3166676
Sample circle.yml file
########################
# Customize the test machine
########################
machine:
# Set the timezeone - any value from /usr/share/zoneinfo/ is valid here
timezone:
America/Los_Angeles
# Version of ruby to use
@buley
buley / functions.php
Last active August 29, 2015 14:28 — forked from ChromeOrange/functions.php
Managing WooCommerce Product Tabs
<?php
/**
* Standard Tab Code from woocommerce-hooks.php
*/
/* Product page tabs */
add_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 );
add_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 20 );
add_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 );
add_action( 'woocommerce_product_tab_panels', 'woocommerce_product_description_panel', 10 );
<!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>
javascript:jQuery(".twitter-anywhere-tweet-box-editor").val(jQuery(".twitter-anywhere-tweet-box-editor").val().replace("?!","‽").replace("!?","‽"));
[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 October 8, 2011 20:46
Flow Diagram - Wu Tang's Gravel Pit
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
### Reporters
#
# reporter
#
##
Reporters->Notebooks:curate
Reporters->String:create
Reporters->Activities:publish
Reporters->Interface:dashboard
@buley
buley / gist:1273310
Created October 9, 2011 04:44
Database Schema
###
#
# 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)
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 November 20, 2011 23:55
Generalized cursor update
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');
};