Skip to content

Instantly share code, notes, and snippets.

View eaton's full-sized avatar

Eaton eaton

View GitHub Profile
@vanto
vanto / README.md
Last active December 23, 2021 21:28
OEmbed Liquid Tag for Jekyll

OEmbed Liquid Tag for Jekyll

This is a simple liquid tag that helps to easily embed images, videos or slides from OEmbed enabled providers. It uses Magnus Holm's great oembed gem which connects to the OEmbed endpoint of the link's provider and retrieves the HTML code to embed the content properly (i.e. an in-place YouTube player, Image tag for Flickr, in-place slideshare viewer etc.). By default it supports the following OEmbed providers (but can fallback to Embed.ly or OoEmbed for other providers):

  • Youtube
  • Flickr
  • Viddler
  • Qik
  • Revision3
  • Hulu
  • Vimeo
@saetia
saetia / gist:1623487
Last active July 16, 2024 05:56
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@kristoferjoseph
kristoferjoseph / timelinejs_git_log
Created November 25, 2012 22:18
git log output format for timeline.js
git log --reverse --date=short --pretty=format:'{%n "headline": "%H",%n "author": "%an <%ae>",%n "startDate": "%ad",%n "text": "%s "%n},' > ~/Desktop/json_log.txt
add_filter( 'image_send_to_editor', 'tiny_force_caption', 100 );
function tiny_force_caption( $html ) {
$a = strpos($html, 'caption');
if ($a!=1) {
preg_match('/(alignnone|alignleft|alignright|aligncenter)/', $html,$c);
preg_match('/width="(\d*)"/', $html,$w);
preg_match('/alt="([^"]*)"/', $html,$m);
preg_match('/wp-image-(\d*)"/', $html,$n);
if (!isset($n[1])) $n[1] = '0';
$html = '[caption id="attachment_'.$n[1].'" align="'.($c?$c[1]:'alignnone').'" width="'.$w[1].'"]'.$html." &copy; ".get_bloginfo('title')."[/caption]";
@ftrain
ftrain / rhymes.clj
Last active July 14, 2023 22:20
Annotated rhyming dictionary
;; This is at: https://gist.github.com/8655399
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up
;; this code here:
;;
;; https://gist.github.com/jackrusher/8640437
;;
;; I'm going to study this code and learn as I go.
;;
;; First I put it in a namespace.

Development Contract Killer

A fork of the popular open-source contract for web designers and developers by Stuff & Nonsense, reworded for developers


Between us [company name] and you [customer name]

@stborchert
stborchert / custommodule.drush.inc
Created February 18, 2016 13:23
Drupal: Drush command to refresh default config for modules/themes/profiles.
<?php
/**
* @file
* Drush commands.
*/
use Drupal\Core\Config\ConfigInstaller;
use Drupal\Core\Config\FileStorage;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
@XavierGimenez
XavierGimenez / README.md
Last active February 17, 2023 03:11
Sankey diagram with vega.js
@dreness
dreness / iShapeParser.py
Created July 22, 2020 20:29
Export Keynote shapes to SVG
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json # Native JSON Library
import argparse # Native Argument parser Library
# This is a slightly updated version of a script found on ye cyberwebs to
# add batch conversion support. Just don't specify an image ID to export the world.
# ==============================#