Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block bhays

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vicgonvt /
Last active Nov 17, 2019
Deployment Guide for Ubuntu Server from Scratch with Laravel
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
eloypnd /
Last active Oct 31, 2019
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
kaleksandrov /
Last active Nov 9, 2019
Simple script that starts and stops on Mac OSX.
case $# in
echo "Usage: $0 {start|stop}"
exit 1
case $1 in
ttscoff / sizeup.bash
Created Jan 5, 2015
A shell function for viewing file sizes and totals within a nested directory structure
View sizeup.bash
__sizeup_build_query () {
local bool="and"
local query=""
for t in $@; do
query="$query -$bool -iname \"*.$t\""
echo -n "$query"
adactio / postforms.js
Created Mar 2, 2014
Show a progress bar when a form is submitted (and prevent more than one submission per document).
View postforms.js
Show a progress element for any form submission via POST.
Prevent the form element from being submitted twice.
(function (win, doc) {
'use strict';
if (!doc.querySelectorAll || !win.addEventListener) {
// doesn't cut the mustard.
gruber / Liberal Regex Pattern for Web URLs
Last active Nov 16, 2019
Liberal, Accurate Regex Pattern for Matching Web URLs
View Liberal Regex Pattern for Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "". For a pattern that attempts to
match all URLs, regardless of protocol, see:
# Single-line version:
jkottke / gist:8739051
Last active Jun 11, 2019
A list of design/writing/coding music recommendations from my Twitter followers
View gist:8739051
Not sure how to summarize/organize this into something useful. Some can be made into Spotify/Rdio playlists, but others are likely unavailable and some are just URLs to other services. Genre is all over the place as well...lots of ambient and classical, soundtracks, uptempo dancey stuff, rock w/ words, and even Slayer. Not sure all that can be put into one playlist that's useful for anyone. What I'm saying is, good luck!
fantoraygun ‏@fantoraygun 1h
@jkottke some great mixes here:
Andrew ‏@jandrewc 1h
@jkottke "From here we go sublime" by The Field and "Alive 2007" by Daft Punk.
Lenny ‏@lenny_ 1h
@jkottke SomaFM's Groove Salad station
spigists / new_gist_file.css
Created Oct 2, 2013
Bootstrap 3 styles for Gravity Forms, make sure that in Forms > Settings you have Output CSS set to No and Output HTML5 set to Yes
View new_gist_file.css
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }
tdominey / gist:6543642
Created Sep 12, 2013
Use {{ }} variable to know which page you're viewing
View gist:6543642
<koken:if data="" equals="/">
<!-- We're on the home page -->
<koken:if data="" equals="/albums/">
<!-- We're on the albums index -->
<koken:if data="" equals="/albums/portraits/">
<!-- We're on the portraits album page -->
You can’t perform that action at this time.