Skip to content

Instantly share code, notes, and snippets.

@frob
frob / Makefile
Last active Feb 18, 2019 — forked from rcmachado/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
View Makefile
.SILENT:
.PHONY: help
# Based on https://gist.github.com/prwhite/8168133#comment-1313022
## Print this help screen.
help:
printf "Available targets\n\n"
awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
@frob
frob / gist:66f13be5b8789ed8a61c2c1083fd51d6
Last active Feb 24, 2021 — forked from amandavisconti/gist:e909e41e6896d2a90de8
Setting up Annotator.js annotation on Drupal
View gist:66f13be5b8789ed8a61c2c1083fd51d6

Annotator.js works on Drupal as two modules and a library (installed, as usual, under /sites/all):

    /modules/annotator
    /modules/annotation
    /libraries/annotator

The files in libraries/annotator are the latest from the Annotator.js repo (https://github.com/openannotation/annotator/releases). Although the modules Infinite Ulysses uses have been significantly changed from the modules you could download on Drupal.org, the Drupal.org Annotator (https://www.drupal.org/project/annotator) and Annotation (https://www.drupal.org/project/annotation) modules pages might still have useful info if you're troubleshooting.

@frob
frob / ansi-color.php
Created Feb 13, 2017 — forked from s4553711/ansi-color.php
ANSI color terminal output module for php
View ansi-color.php
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
@frob
frob / emoji.php
Last active Aug 29, 2015 — forked from alanorth/emoji.php
Emoji class / function / variable names in PHP...
View emoji.php
<?php
class 💩💩💩💩
{
function 💩💩💩($😎, $🐯)
{
return $😎 + $🐯;
}
}
$🐔 = 3;
@frob
frob / scrollTo.js
Last active Aug 29, 2015 — forked from james2doyle/scrollTo.js
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
View scrollTo.js
// easing functions http://goo.gl/5HLl8
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
}
t--;
return -c/2 * (t*(t-2) - 1) + b;
};