Skip to content

Instantly share code, notes, and snippets.


Miles Rausch awayken

View GitHub Profile
awayken / monospace.css
Created Apr 19, 2020
System Font Stacks
View monospace.css
/* Stolen from: */
code, kbd {
/* macOS, iOS */
/* Windows */
awayken / holo.ts
Last active Aug 4, 2019
Robot Dance Club Promos
View holo.ts
export enum RobotType {
export interface IRobot {
readonly id: string;
View make-prefetch.js
// Global maps
const preloaded = new Map();
const preloading = new Map();
function buildPreload(url = '') {
// If we have a URL
if (url.length) {
// Create a prefetch <link />
const el = document.createElement('link')
el.rel = 'prefetch'
awayken / open-graph-inspector.js
Last active Dec 14, 2018
Show Open Graph Tags
View open-graph-inspector.js
(function() {
const tags = document.querySelectorAll('[property^="og:"]')
let taginfo = `<div style="overflow: auto; padding-bottom: .5em;">`;
if (tags.length) {
taginfo += `<div style="text-align: center; padding-bottom: .5em; margin-bottom: .5em; border-bottom: 1px solid #000">🎉 Found ${tags.length} Open Graph ${tags.length === 1 ? 'tag' : 'tags'}!</div>`
for (const item of tags) {
const property = item.getAttribute('property')
awayken / post_3699_take1.cfm
Last active Jun 20, 2017
A Technique for Tracking Prints Using CSS:
View post_3699_take1.cfm
param name='args.qrURL';
<div class="u--printonly detail--trackprint">
<p>#_('qrcode_explanation', 'Scan the following QR code to learn more.')#</p>
<img class="u--box" src=";data=#HTMLEditFormat( args.qrURL )#" alt="">
<p>(#HTMLEditFormat( args.qrURL )#)</p>
<img src="?trackprint" alt="">
View Spoiler.markdown
awayken / cache_cfml.cfm
Last active Dec 20, 2015
CFML Caching Templates
View cache_cfml.cfm
<cfset local.cacheKey = hash( cgi.http_host, 'sha1' ) & '_CHANGEME'>
<cfset local.cacheTimespan = createtimespan( 0, 0, 10, 0 )>
<cfset local.cacheHTML = "">
<cfcache action="get" id="#local.cacheKey#" name="local.cacheHTML">
<cfif isNull( local.cacheHTML )>
<cfsavecontent variable="local.cacheHTML">
<!--- CFML here --->
<cfcache action="put" id="#local.cacheKey#" value="#local.cacheHTML#" timespan="#local.cacheTimespan#">
awayken / .gitconfig
Created Jul 18, 2013
My incredible, tricked-out, super helpful, awesome git config.
View .gitconfig
## Compound command alias
# View all alias
alias = !"git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort"
# Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master"
# Stage all missing files for delete
r = !"git ls-files -z --deleted | xargs -0 git rm"
# Show all files modified using `git assume` alias
assumed = !"git ls-files -v | grep ^h | cut -c 3-"
View new_gist_file
The ancestor of every action is thought.
I always thought this was incomplete. They should add: The parent of every action is emotion. The sibling of every action is reaction.