Skip to content

Instantly share code, notes, and snippets.

View JesseHerrick's full-sized avatar

Jesse Herrick JesseHerrick

View GitHub Profile
@JesseHerrick
JesseHerrick / site-changed.sh
Created December 11, 2015 01:35
Checks for site changes and reports yes or no. Useful for things like audition results :)
# $1 = site to check
while true
do
curl -L "$1" -o site1.html &>/dev/null
curl -L "$1" -o site2.html &>/dev/null
if diff -q site1.html site2.html &>/dev/null; then
echo "YES!!!"
@JesseHerrick
JesseHerrick / typeahead-force-selection.js
Last active June 21, 2017 20:53
Force selection of TypeAhead.JS result before form can be submitted.
var checkAutocompleteInput = function() {
if ($('#autocomplete').find('.tt-selectable').length === 0) { // "#autocomplete" is the autocomplete input menu section
$('.actions input').attr('disabled', 'disabled') // ".actions input" is the Submit button for the form
} else {
$('.actions input').removeAttr('disabled')
}
};
$('#autocomplete .typeahead').typeahead({...}, {...}).on('typeahead:render', function(e) {
$('#autocomplete').parent().find('.tt-selectable:first').addClass('tt-cursor');
@JesseHerrick
JesseHerrick / install-libxml-ruby.md
Last active March 5, 2020 19:49
Install libxml-ruby on Mac OS Catalina
@JesseHerrick
JesseHerrick / mysql2-mojave.md
Created March 5, 2020 22:11 — forked from fernandoaleman/mysql2-mojave.md
Install mysql2 on MacOS Mojave

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@JesseHerrick
JesseHerrick / install-therubyracer-mac-os-mojave.md
Created March 5, 2020 22:19
Install therubyracer on Mac OS Mojave
gem install therubyracer -v '0.12.3' -- --with-v8-dir=/usr/local/opt/[email protected] --with-cxx=/usr/bin/gcc