Skip to content

Instantly share code, notes, and snippets.

@simon-lang
simon-lang / .block
Created September 10, 2018 04:10 — forked from NPashaP/.block
Viz - biPartite - default
license: gpl-3.0
@simon-lang
simon-lang / GIF-Screencast-OSX.md
Last active February 27, 2017 23:55 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

module.exports = function(config) {
var _ = require('lodash');
var express = require('express');
var router = express.Router();
var path = require('path');
var fs = require('fs');
var pagespeed = require('../pagespeed');
__dirname = __dirname.replace('routes','');
var psi = require('psi');
var testUrl = 'http://www.expedia.com/Cancun-Hotels.d179995.Travel-Guide-Hotels?psislp=1';
module.exports = {
getScore: function(cb) {
psi(testUrl, function (err, data) {
cb(data.score);
});
}
};
/*globals jQuery, $, wotif, wotifConfig */
_.templateSettings = {
interpolate: /\{\{(.+?)\}\}/g
};
wotif.carousel = (function (utils) {
var selectors = {
space: '#carousel'
},
@simon-lang
simon-lang / negate.js
Last active December 10, 2015 23:08 — forked from anonymous/gist:4507376
// Switch active card on swipe
$(".cards").hammer().bind("swipe", function(ev) {
if (ev.direction == "left") {
if (!activeCard.is(':first-child')) {
$('.card.active').removeClass('active').next('.card').addClass('active');
}
}
else if (ev.direction == "right") {
if (!activeCard.is(':last-child')) {
$('.card.active').removeClass('active').prev('.card').addClass('active');