Skip to content

Instantly share code, notes, and snippets.

View sivartravis's full-sized avatar

Travis Taylor sivartravis

  • Cambridge, MA
View GitHub Profile
@sivartravis
sivartravis / auto-footnote.js
Last active September 19, 2017 21:09 — forked from murtaugh/auto-footnote.js
Sniff out superscripts that should be footnote links
$('sup[data-footnote]').each(function(index) {
noteCount = $(this).html();
$(this).html('<a id="ref' + noteCount + '" href="#note' + noteCount + '">' + noteCount + '</a>');
$('#footnotes li').eq(noteCount - 1).attr('id', 'note' + noteCount).prepend('<a href="#ref' + noteCount + '">' + noteCount + '.</a> ');
});
@sivartravis
sivartravis / footnotes-0.0.2.js
Created September 19, 2017 21:08 — forked from devdays/footnotes-0.0.2.js
Sample for moving footnotes using jQuery plugin
(function ($) {
$.fn.footnote = function () {
// console.log("footnote");
var footnotes = this.find("span.footnote");
footnotes.each(function (key, value) {
//console.log("footnote" + key + " : " + $(value).contents().text());
var footnoteContentsNode = $(value).clone();
var footnoteNumberTextNode = document.createTextNode("[" + key + "] ");
$("#references").append(footnoteNumberTextNode).append(footnoteContentsNode).css("color", "blue").append("<br />");
$(value).text("[" + key + "] ").css("color", "blue").css("vertical-align", "super").css("font-size", "60%");
@sivartravis
sivartravis / 1_using_queries.js
Created March 10, 2017 22:37 — forked from katowulf/1_using_queries.js
Methods to search for user accounts by email address in Firebase
/***************************************************
* Simple and elegant, no code complexity
* Disadvantages: Requires warming all data into server memory (could take a long time for MBs of data or millions of records)
* (This disadvantage should go away as we add optimizations to the core product)
***************************************************/
var fb = firebase.database.ref();
/**
* @param {string} emailAddress
@sivartravis
sivartravis / index.html
Created March 10, 2017 15:59 — forked from anonymous/index.html
jQuery Find Replace Plugin
<section>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It
has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
<p>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of <b>Lorem Ipsum</b>.</p>
<a href="https://en.wikipedia.org/wiki/Lorem_ipsum">Lorem Ipsum Wikipedia Link</a>
</section>
<section>
<p>This <span class="small-u">lorem ipsum</span> should not be hilighted.</p>
</section>
<ul>
@sivartravis
sivartravis / index.slim
Created March 10, 2017 15:59 — forked from anonymous/index.slim
Uber-like text transitions
#fullpage
.section.one
h1 Here's a great
h2 tagline to read
.section.two
h1 Oh look, another phrase
h2 to stand out
.section.three
h1 Finally, this is the
h2 last slide

Gooey Menu - CSS Only

Gooey Menu animation is done purely with css.

The inspiration comes from Soheil's post on Material Up called "Material In a Liquid State".

A Pen by Matthew Sechrest on CodePen.

License.

Gooey Menu - CSS Only

Gooey Menu animation is done purely with css.

The inspiration comes from Soheil's post on Material Up called "Material In a Liquid State".

A Pen by Matthew Sechrest on CodePen.

License.

@sivartravis
sivartravis / index.html
Created January 20, 2017 21:59 — forked from anonymous/index.html
kEsJe
<div class='line-through'>
<h1>Branchy</h1>
</div>
<a href='#'>About</a>
<a href='#'>Contribute</a>
<a href='#'>Archives</a>
<div class='line-through' style='margin-top:10em;'>
@sivartravis
sivartravis / export-to-csv.gs
Created August 18, 2016 02:35 — forked from mderazon/export-to-csv.gs
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
@sivartravis
sivartravis / wp-config.php
Created March 8, 2016 19:53 — forked from ifamily/wp-config.php
A universal WordPress wp-config.php which works on local development to staging and production server environments.
<?php
/*
One wp-config for local development to staging to production.
*/
// Define Environments
$environments = array(