Skip to content

Instantly share code, notes, and snippets.

View bwbaugh's full-sized avatar

Wesley Baugh bwbaugh

View GitHub Profile
@hanshoglund
hanshoglund / pad.hs
Last active February 12, 2021 16:21
Haskell String pad
padR :: Int -> String -> String
padR n s
| length s < n = s ++ replicate (n - length s) ' '
| otherwise = s
@thomedes
thomedes / README.md
Last active November 6, 2019 23:12
Full system backup excludes
@erikhazzard
erikhazzard / _.md
Created October 8, 2013 21:36
bart salary groupings
#! /bin/bash
# streaming on Ubuntu via ffmpeg.
# see http://ubuntuguide.org/wiki/Screencasts for full documentation
# see http://www.thegameengine.org/miscellaneous/streaming-twitch-tv-ubuntu/
# for instructions on how to use this gist
if [ ! -f ~/.twitch_key ]; then
echo "Error: Could not find file: ~/.twitch_key"
echo "Please create this file and copy past your stream key into it. Open this script for more details."
@blitzcode
blitzcode / gist:8123168
Last active September 10, 2023 17:39
Haskell Hoogle Local Version Setup Steps
# Install a local copy of Hoogle (OS X 10.10, GHC 7.10.1)
# Download
cd
cabal unpack hoogle
cd hoogle-4.2.40/
# Use a sandbox
cabal sandbox init
@benknight
benknight / SassMeister-input.scss
Last active August 29, 2015 13:56
ReviewBoard CSS rewrites
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@import "compass/css3/transition";
/** Stuff from normalize.css */
@rdegges
rdegges / stormpath-seed.py
Last active February 20, 2017 02:43
Automatically seed a Stormpath application with user accounts for testing!
"""
stormpath-seed.py
~~~~~~~~~~~~~~~~~
A simple utility which creates a new Stormpath application named 'test' (or
uses one already named 'test', if it exists), and creates a number of user
accounts in this application.
This is useful for various testing scenarios.
@adamnew123456
adamnew123456 / evilscan.py
Created April 16, 2014 00:22
Scans Images From HP 3050... Using Lambdas
# So, this is a port of a fairly simple script from "normal Python" to "pure-lambda
# Python". This code contains no Python statements, and is a proof-of-concept to show
# what you can do without statements, and how powerful Python's lambdas are despite
# that they are crippled.
#
# A few notes on how to read this:
# 1. Almost everything happens in the arguments. Practially nothing happens
# inside function bodies, since the function bodies are usually just other
# functions. Go down to the bottom of the expression (using your editor's
# paren matching) to see what the arguments are.
@stefansundin
stefansundin / install-pre-push.sh
Last active June 9, 2024 13:02
Git pre-push hook to prevent force pushing the master/main branch.
#!/bin/bash
# This script will install a Git pre-push hook that prevents force pushing the master/main branch.
# There are three variants that I have built:
# - pre-push: prevents force-pushing to master/main.
# - pre-push-2: prevents force-pushing to master/main depending on the remote (you need to edit the file!).
# - pre-push-3: prevents any type of pushing to master/main.
# Set the desired version like this before proceeding:
# FILE=pre-push
# Single repo installation:
@gbraad
gbraad / README.md
Last active May 16, 2022 17:42
Import SSH-keys from GitHub

Import SSH-keys from GitHub

vagrant up
vagrant ssh -c "curl -L https://github.com/{your-username}.keys >> /home/vagrant/.ssh/authorized_keys"