Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Go Avs!

Andrew Ellis ellisio

:octocat:
Go Avs!
View GitHub Profile
@davejamesmiller
davejamesmiller / ask.sh
Last active Sep 9, 2020
Bash General-Purpose Yes/No Prompt Function ("ask")
View ask.sh
# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.
ask() {
# https://djm.me/ask
local prompt default reply
if [ "${2:-}" = "Y" ]; then
prompt="Y/n"
@saetia
saetia / gist:1623487
Last active Aug 15, 2020
Clean Install – OS X 10.11 El Capitan
View gist:1623487

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@dahnielson
dahnielson / UUID.php
Last active Sep 8, 2020
Pure PHP UUID generator
View UUID.php
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
You can’t perform that action at this time.