Skip to content

Instantly share code, notes, and snippets.

View mmattice's full-sized avatar

Mike Mattice mmattice

View GitHub Profile
@jawn
jawn / Ideal onboarding braindump.md
Last active July 29, 2023 19:56
Ideal onboarding braindump
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
/*
* Common bit handling macros for AVR (avr-gcc)
*
* Examples:
*
* #define LED_DIR BITP(DDRB, PB4) // LED_DIR is "variable" pointing to single bit (PB4) in DDRB
* #define LED_STATE BITP(PORTB, PB4) // LED_STATE points to single bit (PB4) in PORTB
* LED_DIR = DIR_OUT; // Set pin as output
* LED_STATE = LEVEL_HIGH; // Switch LED on
*
@RichardBronosky
RichardBronosky / README.MD
Last active May 19, 2024 22:03
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@nathforge
nathforge / expbackoff.sh
Created December 22, 2016 10:33
Exponential backoff in Bash
expbackoff() {
# Exponential backoff: retries a command upon failure, scaling up the delay between retries.
# Example: "expbackoff my_command --with --some --args --maybe"
local MAX_RETRIES=${EXPBACKOFF_MAX_RETRIES:-8} # Max number of retries
local BASE=${EXPBACKOFF_BASE:-1} # Base value for backoff calculation
local MAX=${EXPBACKOFF_MAX:-300} # Max value for backoff calculation
local FAILURES=0
while ! "$@"; do
FAILURES=$(( $FAILURES + 1 ))
if (( $FAILURES > $MAX_RETRIES )); then
@bketelsen
bketelsen / smoked-fried-chicken.md
Last active June 10, 2017 01:11
Smoked Fried Chicken

Smoked Fried Chicken

It's the best of all worlds. Trust me

Ingredients

  • Chicken - cut for frying is best
  • Coarse salt. Sea salt or Kosher salt
  • Spices for brining - I use parsley, sage, thyme, a dash of cumin and cayenne powder. Experiment!
  • Panko crumbs
  • Eggs
  • French's fried onion strips
-- Project: Dropbox Module
-- Description: A module for accessing Dropbox from Lua/CoronaSDK using the Dropbox REST API. Module written
-- by F. E. Torkel, based off code by Michael Weingarden.
local lfs = require( "lfs" )
local json = require( "json" )
local M = {}