Skip to content

Instantly share code, notes, and snippets.

View sgregson's full-sized avatar
NANA nana nana nana A11Y

Spencer sgregson

NANA nana nana nana A11Y
View GitHub Profile
@dsparks
dsparks / Super Bowl bingo card generator.R
Last active May 23, 2018 00:19
This script generates 5×5 bingo cards for the Super Bowl (or anything, really). Each randomly-generated card will be saved as a separate PNG for you to print. Use the provided word list, or edit to use your own. You can also modify the title, "rules" text, and "free space" text.
library(ggplot2)
new_theme_empty <- theme_bw()
new_theme_empty$line <- element_blank()
new_theme_empty$rect <- element_blank()
new_theme_empty$strip.text <- element_blank()
new_theme_empty$axis.text <- element_blank()
nCards <- 30
ruleText <- c("Look for these on the field, in the stands, or in the commercials.\n\"\" indicate that you should listen for the broadcast team to say this phrase.")

Raise Open File Limits in OS X

in OS X 10.4 to macOS sierra 10.12 and maybe higher!

Create Launcher Script:

/Library/LaunchDaemons/limit.maxfiles.plist

Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:

@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@jaibeee
jaibeee / brew-perms.sh
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@badsyntax
badsyntax / open-url.sh
Created July 7, 2015 18:42
Open or reload a URL in Google Chrome with AppleScript
#!/usr/bin/env bash
osascript -e "
tell application \"Google Chrome\"
activate
set theUrl to \"$1\"
set found to false
set windowList to every window
repeat with aWindow in windowList
set tabList to every tab of aWindow
@christofluethi
christofluethi / gist:646ae60d797a46a706a5
Last active April 1, 2024 22:10
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3
@sgregson
sgregson / SassMeister-input.scss
Last active August 29, 2015 14:11
LibSass Configuable Objects (syntax 1)
// ----
// libsass (v3.1.0-beta)
// ----
// LibSass Configurable Objects Syntax 1
// uses selector() to include content
//
// @author Spencer Gregson
// @credit http://hugogiraudel.com/2014/05/05/bringing-configuration-objects-to-sass/ - a modular way to build partials with signatures
// @credit map-merge-deep() - Pedr Browne (https://gist.github.com/Undistraction/681818d751b6dd06c0cc), edited for compatibility with libsass 3.0.2, no dependencies
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@taprootphoto
taprootphoto / my-sugars.sh
Created February 2, 2012 17:52 — forked from rowanmanning/my-sugars.sh
My Favourite Espresso Sugars
cd ~/Library/Application\ Support/Espresso/Sugars;
echo "Installing Sugars:";
if [ ! -d ./CSS3.sugar ]; then
echo "Installing CSS3.sugar...";
git clone -q git://github.com/minimalweb/CSS3.sugar.git ./CSS3.sugar;
else
echo "CSS3.sugar already installed, attempting update...";
cd CSS3.sugar;
@balupton
balupton / README.md
Last active April 20, 2022 13:21
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo