Skip to content

Instantly share code, notes, and snippets.

@garris
garris / gist:afebec8e31f5a193aa1b
Last active August 29, 2015 14:27
tremula local data example
Modify `./boilerplate/index.html`
Look at line 81 where we initialize tremulajs...
```
$(document).ready(function(){
setTimeout(function(){
window.tremula = tremulaInit();//does not need to be on the window -- implemented here for convienience.
loadFlickr(); // <=== replace this line with the block below...
@garris
garris / TremulaJS-Boilerplate.markdown
Last active December 12, 2015 13:57
A Pen by Garris.

TremulaJS Boilerplate

TremulaJS is a client-side javascript UI component providing Bézier-based content-stream interactions with momentum & physics effects for mouse, scroll and and touch UIs.

This Pen allows you to experiment using different config file settings.

A Pen by Garris on CodePen.

License.

;; xr - convert string regexp to rx notation
(require 'rx)
(defun xr-parse-char-alt ()
(let ((set nil))
(when (looking-at "]")
(forward-char 1)
(setq set (list "]")))
(while (not (looking-at "]"))
@bennadel
bennadel / code-1.htm
Created March 25, 2014 11:06
Enable And Disable jQuery Event Handlers (Rather Than Bind And Unbind)
<!DOCTYPE HTML>
<html>
<head>
<title>Enable And Disable jQuery Event Handlers</title>
<style type="text/css">
#modal {
background-color: #FAFAFA ;
border: 1px solid #C0C0C0 ;
display: none ;
@bennadel
bennadel / code-1.cfm
Created March 25, 2014 12:10
Creating Repeated Sequences With The Modulus (MOD) Operator
<!---
Loop to 15 using a modulus of 3 to get a result
at each index.
--->
<cfloop
index="i"
from="1"
to="15"
step="1">
@pritchard2751
pritchard2751 / recursive_array_iterator.php
Last active July 25, 2017 17:40
Recursive Iteration of a Multidimensional Array Using SPL Iterators
<?php
$nav_menu = array("Level 1" => array("Level 1 child (a)", "Level 1 child (b)"),
"Level 2" => array("Level 2 child (a)" =>
array("Level 2.1 child (a)" =>
array("Level 2.2 child (a)"),
"Level 2.1 Child (b)"
),
"Level 2 child (b)"
),
@vichango
vichango / Begin document
Last active September 9, 2017 20:49
Scrivener LaTeX Compile options
\usepackage{authblk}
\title{\mytitle}
\author[*]{\myauthor}
\affil[*]{\affiliation}
% To remove the date
\date{}
\begin{document}
@paxperscientiam
paxperscientiam / install-mosh.sh
Created October 1, 2017 18:18 — forked from jaywilliams/install-mosh.sh
Compiling and running mosh on Dreamhost (Updated - 2017)
#!/usr/bin/env bash
# Thanks to @samsonjs for the cleaned up version:
# https://gist.github.com/samsonjs/4076746
PREFIX=$HOME/local
VERSION=1.2.6
# Create Source Directory
mkdir -p $PREFIX/src
@mogsdad
mogsdad / NSLookup.gs
Last active September 12, 2018 05:48
NSLookup - Google Sheets custom function to Perform a Network Service Lookup, using StatDNS API. From "Nslookup or dig in Google App Script" (http://stackoverflow.com/a/30610580/1677912).
/**
* Perform a Network Service Lookup, using StatDNS API.
*
* @param {"google.com"} dn A well-formed domain name to resolve.
* @return {String} Resolved IP address
* @customfunction
*/
function NSLookup(dn) {
// From gist.github.com/mogsdad/ece531531e0ef5dc355d
var url = "http://api.statdns.com/%FQDN%/a".replace("%FQDN%",dn);