Skip to content

Instantly share code, notes, and snippets.

SebFlippence /
Created Jan 30, 2021
Update all old email addresses in commits from all existing GitHub repos
# Requires `git filter-repo`
mkdir tmp && cd tmp
export USERNAME="github-username"
export TOKEN="github-token-with-repo-access"
grep -e 'ssh_url*' |
cut -d \" -f 4 |
SebFlippence / Dockerfile
Last active Dec 28, 2020 — forked from remarkablemark/Dockerfile
Install node and npm with nvm using Docker.
View Dockerfile
# set the base image to Debian
FROM debian:latest
# use bash so we can source files
SHELL ["/bin/bash", "-c"]
# update the repository sources list
# and install dependencies
RUN apt-get update \
SebFlippence /
Last active Jul 16, 2020
Quickly and easily deploy an Eleventy Static Site to GitHub Pages with a custom domain

Deploying an Eleventy Static Site to GitHub Pages with a custom domain

Quickly and easily deploy an Eleventy Static Site to GitHub Pages with an optional custom domain.


  1. Use or create a new Eleventy project and commit and push it to a GitHub repo.
  2. In the root folder of your Eleventy project create a new file and copy the contents into it and on the commandline run chmod +x
  3. Edit your package.json file adding "deploy": "./" into the bottom of the scripts: section.
SebFlippence / Dockerfile
Last active Jul 13, 2019
Docker Android build container
View Dockerfile
FROM openjdk:8-jdk-slim-stretch
SHELL ["/bin/bash", "-c"]
# Install build tools & newer version of cmake from Debian backports
RUN echo "deb stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/backports.list \
&& apt-get update \
&& apt-get install -y \
build-essential \
bzip2 \
SebFlippence / autostart
Last active Oct 22, 2019
Auto start Raspberry Pi Chromium fullscreen from a list of bookmarks
View autostart
# /home/pi/.config/lxsession/LXDE-pi/autostart
@bash /home/pi/
SebFlippence / .gitignore
Last active Sep 29, 2020
Concourse CI with a Windows worker
SebFlippence /
Created May 13, 2019
Using cec-client on a Raspberry Pi to control TV power and inputs via HDMI

Using cec-client on a Raspberry Pi

Most modern HDMI connected devices support Consumer Electronics Control (CEC). It allows devices to send commands to each other, typically to get the TV to switch input and control volume. If you have ever turned on a Game Console and had your TV automatically change input to that device you have seen CEC in action. It is very convenient and useful, sort of a universal remote that works.

Every manufacturer seems to have it’s own branding of CEC (e.g. Samsung Anynet+, LG SimpLink, Sharp Aquos Link) but it may need to be enabled. Check your manual for details.

Using a Raspberry Pi connected to a TV that supports CEC, you can use the command line cec-client application to control the inputs and the TV itself. These are notes on how to use cec-client and understand the different options.


SebFlippence /
Created Dec 4, 2018
Sorts dependencies in all `package.json` files in the current directory
# yarn global add npm-sort
# find . ! -path "*node_modules*" -type f -name "package.json" -exec `pwd`/ "{}" \;
pushd `dirname $1` && npm-sort && sed -i '' -e '$a\' package.json && popd
SebFlippence / index.js
Last active Mar 25, 2020
Log all incoming HTTP and HTTPS requests
View index.js
const fs = require('fs');
const https = require('https');
const Koa = require('koa');
const multipartBodyParser = require('koa-body');
const app = new Koa();
SebFlippence / index.js
Created Aug 1, 2017
Node Chrome Headless wait until element exists
View index.js
const chromeLauncher = require('chrome-launcher');
const CDP = require('chrome-remote-interface');
const sleep = require('sleep-async');
// Optional: set logging level of launcher to see its output.
// Install it using: yarn add lighthouse-logger
// const log = require('lighthouse-logger');
// log.setLevel('info');