Skip to content

Instantly share code, notes, and snippets.

View jkenlooper's full-sized avatar

Jake Hickenlooper jkenlooper

View GitHub Profile
@jkenlooper
jkenlooper / install-aws-cli.sh
Last active October 2, 2022 14:24
Install aws-cli version 2 on Alpine Linux [UNMAINTAINED]
#!/usr/bin/env sh
#####
# This solution is no longer being used or maintained by me anymore. The information in it may be out of date.
#####
set -o errexit
# UPKEEP due: "2022-10-08" label: "Update aws-cli" interval: "+3 months"
# https://gist.github.com/jkenlooper/78dcbea2cfe74231a7971d8d66fa4bd0
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jkenlooper
jkenlooper / machine.js
Last active January 18, 2020 15:13
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jkenlooper
jkenlooper / machine.js
Last active December 20, 2019 14:20
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jkenlooper
jkenlooper / clog.sh
Last active July 23, 2018 14:31
Prompt to log an entry in journal every 25 minutes.
#!/bin/bash
# Simple script to run in the background that will sleep for 25 minutes and
# then prompt to add an entry to the journal. A screenshot will also be taken
# after the entry has been made.
# Suggested way of running:
# nohup clog.sh > clog.output &
TIMEOUT=${1:-25}; # Default to 25 minutes if no arg passed
@jkenlooper
jkenlooper / gallery.mk
Last active April 10, 2018 03:46
Makefile for resizing jpgs that have a hint ratio in their name to multiple sizes.
@jkenlooper
jkenlooper / 5-utils-intrinsic-ratio.css
Created April 9, 2018 12:27
Simple intrinsic ratio CSS for responsive iframe with added bonus of using CSS custom properties to set the ratio based on width and height values.
.u-intrinsicRatio {
--intrinsicRatio-width: 4;
--intrinsicRatio-height: 3;
position: relative;
padding-bottom: calc(100% * (var(--intrinsicRatio-height) / var(--intrinsicRatio-width)));
height: 0;
overflow: hidden;
}
.u-intrinsicRatio > iframe {

Keybase proof

I hereby claim:

  • I am jkenlooper on github.
  • I am jkenlooper (https://keybase.io/jkenlooper) on keybase.
  • I have a public key ASCCE13uwHhE0Wn-ouHkCagJdqd8DhXLzwyA1P1jdwrpvAo

To claim this, I am signing this object:

@jkenlooper
jkenlooper / flaskstatic.py
Created October 13, 2016 11:11
Script to statically serve a directory with the Flask web framework.
#!/usr/bin/env python
import os
from werkzeug.serving import run_simple
from flask import Flask, send_from_directory, render_template_string, abort
from livereload import Server, shell
app = Flask(__name__, static_url_path=os.getcwd())
app.debug = True
CWD = os.getcwd()
@jkenlooper
jkenlooper / sample.css
Created October 12, 2016 11:14
Old css for CSS Zen Garden example
body {
background: black url(big_v_road.png) repeat-y top right;
color: #d4d6d6;
margin: 0;
font: 15px/25px sans-serif;
}
a:link, a:visited, a:hover, a:active {
background-color: #4d4a4b;
color: white;