Skip to content

Instantly share code, notes, and snippets.

View brendonjohn's full-sized avatar
📺
Coffee is my turbo

Brendon John Muschamp brendonjohn

📺
Coffee is my turbo
View GitHub Profile
@brendonjohn
brendonjohn / README.md
Last active September 2, 2015 04:22 — forked from jonathantneal/README.md
SASS @font-face mixin

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@brendonjohn
brendonjohn / spotify-previousTrack
Last active November 1, 2019 01:45
A script that actually plays the previous Spotify track.
#!/usr/bin/env bash
osascript -e 'tell application "Spotify" to set player position to 0'
osascript -e 'tell application "Spotify" to previous track'
echo -n -e "\033]0;previousTrack\007"
osascript -e 'tell application "Terminal" to close (every window whose name contains "previousTrack")' &
exit 0
@brendonjohn
brendonjohn / example-redirect.js
Created February 15, 2020 03:03
redirect example for when am express app that uses @react-ssr/express is mounted as a sub application
import path from 'path'
const applyPrefixToRoute = (prefix) => (request, response) => {
console.log('received request for: ', request.url)
const redirectTo = path.join(prefix, request.url)
console.log('redirecting to: ', redirectTo)
response.redirect(redirectTo)
}
const applyRouteHack = (app, routePrefix) => {