Skip to content

Instantly share code, notes, and snippets.

View lukejacksonn's full-sized avatar
🔬
Experimenting

Luke Jackson lukejacksonn

🔬
Experimenting
View GitHub Profile
@lukejacksonn
lukejacksonn / alias
Created September 23, 2019 13:01
An alias to checkout a pull request locally from the command line
alias ppr='f () { git fetch origin pull/$1/head:PR-$1 && git checkout PR-$1; }; f'
e.exports=["ac","com.ac","edu.ac","gov.ac","net.ac","mil.ac","org.ac","ad","nom.ad","ae","co.ae","net.ae","org.ae","sch.ae","ac.ae","gov.ae","mil.ae","aero","accident-investigation.aero","accident-prevention.aero","aerobatic.aero","aeroclub.aero","aerodrome.aero","agents.aero","aircraft.aero","airline.aero","airport.aero","air-surveillance.aero","airtraffic.aero","air-traffic-control.aero","ambulance.aero","amusement.aero","association.aero","author.aero","ballooning.aero","broker.aero","caa.aero","cargo.aero","catering.aero","certification.aero","championship.aero","charter.aero","civilaviation.aero","club.aero","conference.aero","consultant.aero","consulting.aero","control.aero","council.aero","crew.aero","design.aero","dgca.aero","educator.aero","emergency.aero","engine.aero","engineer.aero","entertainment.aero","equipment.aero","exchange.aero","express.aero","federation.aero","flight.aero","freight.aero","fuel.aero","gliding.aero","government.aero","groundhandling.aero","group.aero","hanggliding.aero","ho
const rgbToHex = rgb =>
'#' + rgb
.match(/rgb\((\d*), (\d*), (\d*)\)/)
.slice(1,4)
.map(d => Number(d).toString(16).padStart(2, '0'))
.join('')
@lukejacksonn
lukejacksonn / index.html
Created March 30, 2017 03:26
Multiple hyperapps on one page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Examples</title>
<script src="https://unpkg.com/hyperapp"></script>
<script src="https://unpkg.com/babel-standalone"></script>
<script type="text/babel">
const { h, app } = hyperapp
@lukejacksonn
lukejacksonn / gist:a5dd4bb03dc8dad3d489379fd5d26339
Created November 14, 2016 08:54
Download a screenshot of an HTML5 video
var screenshotVideo = (src, time) => {
// Create a video element with source and seek to time
var video = document.createElement('video');
video.src = src;
video.crossOrigin = "Anonymous";
video.currentTime = time;
video.play().then(() => {
// Pause the video at time