Skip to content

Instantly share code, notes, and snippets.

westonruter / scripts-to-footer-exclude-amp.php
Last active Jun 2, 2020
Exclude all AMP scripts from being moved to the footer by the Scripts To Footer plugin. All AMP scripts have async anyway so they do not need to be moved to the footer for performance.
View scripts-to-footer-exclude-amp.php
CodingDoug /
Last active Dec 21, 2020
Realtime Database triggers with Cloud Functions for Firebase - source

Realtime Database triggers with Cloud Functions for Firebase - source

This gist contains the source code in my video series about Realtime Database triggers. You can watch the three parts here:

  1. Part 1 (intro, onCreate)
  2. Part 2 (onUpdate, infinite loops)
  3. Part 3 (onDelete, transactions)

index.ts contains the Cloud Functions code, and dialog.ts contains the script to run

mrbar42 /
Last active Jan 6, 2021
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)


bash beach.mkv

will produce:

      |- playlist.m3u8
      |- 360p.m3u8
surma / gist:bcad12c026c395b00a32
Last active Oct 23, 2016
Mac Setup Routine
View gist:bcad12c026c395b00a32
ruby -e "$(curl -fsSL"
brew install caskroom/cask/brew-cask
brew cask install google-chrome
ln -sf ~/Applications/Google\ /Applications
brew cask install megasync
ln -s '/opt/homebrew-cask/Caskroom/megasync/latest/' '/Applications/'
brew cask install dropbox
brew cask install google-drive
brew cask install iterm2
brew cask install spectacle
domenic /
Last active Jan 5, 2021
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
NickBarreto / iBooks popups which degrade nicely in other devices
Last active Feb 2, 2019
How to create popup footnotes in iBooks which degrade well for other EPUB3 readers
View iBooks popups which degrade nicely in other devices
The only requirements for popup footnotes in iBooks are:
* Ebook has to be an EPUB3
* epub:type "noteref" and "footnote"
So you can link to a totally separate document, as you normally would for endnotes,
but include the attributes so the <a> link behaves differently in iBooks, instead triggering the popup.
Original reference link would look something like this (in a file called ch001.html):
<a epub:type="noteref" href="footnote.html#note1">1</a></div>
roman01la / index.html
Created Jun 17, 2013
THREE.js scene setup with JSONLoader for OSM2WebGL demo
View index.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<div class="viewport"></div>
<script src="//"></script>
<script src="//"></script>
benfrain / _media32.scss
Last active Nov 26, 2019
A Sass 3.2 mixin for dealing with Media Queries
View _media32.scss
// Here are some variables, then a mixin and then an application of the mixin - this will only compile using Sass 3.2
$XS: 12.5em; // 200px;
$S: 18.75em; // 300px
$SM: 35em; // 560px
$M: 47.5em; // 760px
$L: 63em; // 1008px
$XL: 110em; // 1760px
$XXL: 180em; // 2880px
adactio / lettering.html
Created Jan 26, 2012
A quick'n'dirty way of doing some lettering.js stuff without jQuery.
View lettering.html
<!DOCTYPE html>
<html lang="en">
.slogan span:nth-child(odd) {
color: red;
alderete / my_looper-no_comments.php
Created Feb 4, 2011
A starter template for the Custom Loop API in the Thesis theme for WordPress.
View my_looper-no_comments.php
// Source and explanation of this file:
class my_looper extends thesis_custom_loop {
function home() {
You can’t perform that action at this time.