Skip to content

Instantly share code, notes, and snippets.

View tylershuster's full-sized avatar

Tyler Shuster tylershuster

View GitHub Profile
@tylershuster
tylershuster / graph-store-notes.hoon
Last active November 22, 2020 01:28
Notes on @loganallenc's graph store
|%
+$ resource [=ship =term] :: A resource is a ship and a term.
+$ resources (set resource) :: Resources are a set of resources
::
+$ network :: A network is like a social network...think subreddits or twitter lists or are.na collections. A node may occupy many positions in a network by being under multiple graphs
$: graphs=(map resource (unit graph)) :: A list of resources (like [~zod %rants]) to a graph (a map of entities to nodes). Like on ~marpem/%permaculture, ~radbur-sivmus has a collection of saved posts about soil health
tags=(set term) :: tags, which are the terms used in the network (a list of communities, perhaps, or more generally the way people categorize things on the network)
tag-queries=(map term resources) :: tag-queries are terms mapped to resources. So %my-posts = (set resource), or /r/permaculture = (set resource)
==
::
@tylershuster
tylershuster / onename.txt
Created June 14, 2016 20:40
Onename Verification
Verifying that +tylershuster is my blockchain ID. https://onename.com/tylershuster
function parseURL(url) {
var parser = document.createElement('a'),
searchObject = {},
queries, split, i;
// Let the browser do the work
parser.href = url;
// Convert query string to object
queries = parser.search.replace(/^\?/, '').split('&');
for( i = 0; i < queries.length; i++ ) {
split = queries[i].split('=');
jQuery.fn.extend({
cvToggle: function( duration , easing ) {
easing = typeof easing !== 'undefined' ? easing : 'swing';
if( this.css('opacity') == '0' ) {
this.slideToggle({
duration: 'fast',
easing: easing,
@tylershuster
tylershuster / calendar.js
Last active August 29, 2015 14:18
Pulls in Calendar events and outputs in table
function pad2(number) {
return (number < 10 ? '0' : '') + number
}
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
$.get('https://www.googleapis.com/calendar/v3/calendars/{calendar_id}/events?orderBy=startTime&singleEvents=true&key={api_key}&orderBy=startTime',function(data){
var events = data.items;
console.log(events);
events.reverse();
for (var i = events.length - 1; i >= 0; i--) {
if(events[i].start.dateTime) {
@tylershuster
tylershuster / gist:7a65fea8d27ebb12f2cb
Created February 3, 2015 19:44
Images Directory Function for Bones Themes
<?
/**
* Retrieve images directory URI. Bones Extension
*
* @return string
*/
function get_images_directory_uri() {
$stylesheet = get_stylesheet();
$theme_root = get_theme_root( $stylesheet );
$stylesheet_dir = "$theme_root/$stylesheet/library/images";
@tylershuster
tylershuster / gist:84b9d5230778e6fefcc9
Created December 4, 2014 02:32
Onename Veification
Verifying that +tylershuster is my openname (Bitcoin username). https://onename.io/tylershuster
@tylershuster
tylershuster / _musical-typography.scss
Last active December 28, 2015 12:49
Musical Typography - a Sass resource for calculating typographic ratios from the musical scale
/* http://24ways.org/2011/composing-the-new-canon/ !*/
// Need to write cent calculator so that the font-size for the notes can all be based on cents
$note-small: ( font-size: 0.850, line-height: 1, padding-top: 0.75, padding-bottom: 0.25, font-weight: normal, font-style: normal);
$note-unison: ( font-size: 1.000, line-height: 2, padding-top: 0.75, padding-bottom: 0.25, font-weight: normal, font-style: normal);
$note-second-minor: ( font-size: 1.067, line-height: 2, padding-top: 0.60, padding-bottom: 0.40, font-weight: normal, font-style: normal);
$note-second: ( font-size: 1.125, line-height: 2, padding-top: 0.60, padding-bottom: 0.40, font-weight: bold, font-style: normal);
$note-third-minor: ( font-size: 1.200, line-height: 2, padding-top: 0.60, padding-bottom: 0.40, font-weight: normal, font-style: normal);
$note-third-major: ( font-size: 1.250, line-height: 2, padding-top: 0.55, padding-bottom: 0.45, font-weight: bold, font-style: normal);
$note-fourth-perfect: ( font-size: 1.330, line
@mixin box {
margin: 0 auto;
display: inline-block;
float: left;
p, h1, h2, h3, h4, h5 {padding: 0;padding-left: 1rem;padding-right:1rem;}
}
/*the typography padding will eventually be 1em, adjusted for the size of each of the elements, after it all goes into media queries.*/