Skip to content

Instantly share code, notes, and snippets.

@Hypercubed
Hypercubed / cite.js
Last active August 29, 2015 13:56
Simple mechanism to link citation references with citation notes.
/* Author: J. Harshbarger
Simple mechanism to link citation references with citation notes. This code will do two things:
1) Highlight a citation note (actually just add the `highlight` class to the parent) when a citation reference or note is clicked.
2) Citation note text (the anchors parent) is added to each citation reference as a popover.
Citation notes and references are linked using standard HTML has linking using the anchor tag. For both the citation note and citation reference the parent of the link is important. For example:
```js
@Hypercubed
Hypercubed / angular-pageslide-directive.css
Created July 15, 2014 01:00
Directive-less ng-pageslide
.ng-pageslide {
z-index: 1000;
position: fixed;
width: 0;
height: 0;
-moz-transition-property: width, height; /* Firefox 4 */
-webkit-transition-property: width, height; /* Safari and Chrome */
-o-transition-property: width, height; /* Opera */
transition-property: width, height;
-webkit-transition-duration: 0.5s; /* Safari */
@Hypercubed
Hypercubed / .gitignore
Last active August 29, 2015 14:10
PowerArray vs....
node_modules/
@Hypercubed
Hypercubed / .gitignore
Last active August 29, 2015 14:10
PowerArray benchmarks
node_modules/
@Hypercubed
Hypercubed / .editorconfig
Last active August 29, 2015 14:15
FANTOM5 Timecourse Visualization
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@Hypercubed
Hypercubed / DOM_element.js
Last active August 29, 2015 14:23
A simple DOM component (for angular and angular-ecs)
// Detect Vendor Prefix with JavaScript
// by By David Walsh
// from http://davidwalsh.name/vendor-prefix
var prefix = (function () {
var styles = window.getComputedStyle(document.documentElement, ''),
pre = (Array.prototype.slice
.call(styles)
.join('')
.match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])
)[1],
@Hypercubed
Hypercubed / gist:37dade46dbf5e447cc95
Last active August 29, 2015 14:24
polymer 1.0 d3 bar chart
<link rel="import"
href="//www.polymer-project.org/1.0/samples/components/polymer/polymer.html">
<dom-module id="bar-chart">
<style>
.content-container > ::content .axis path,
.content-container > ::content .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
@Hypercubed
Hypercubed / index.js
Last active September 1, 2015 03:01
signals-patch
module.exports = require('signals');
@Hypercubed
Hypercubed / README.md
Last active October 19, 2015 03:12
Superformula Explorer (with svgsaver)
@Hypercubed
Hypercubed / index.html
Last active October 19, 2015 05:50
angular-downloadsvg-directive bundle
<!doctype html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.rawgit.com/martine/webtreemap/a2fa353833eca1a4821ba4c93fb6a7d546aed02a/webtreemap.css">
<title>angular-downloadsvg-directive.min.js - Source Map Explorer</title>
<style>
html, body {
height: 100%;
}