Skip to content

Instantly share code, notes, and snippets.

View hforbess's full-sized avatar

harry forbess hforbess

  • independent contractor
  • austin texas
View GitHub Profile
@hforbess
hforbess / loader.css
Created July 22, 2017 19:25
simple loader css only
.loader {
border: 16px solid #f3f3f3; /* Light grey */
border-top: 16px solid #3498db; /* Blue */
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}
@keyframes spin {
@hforbess
hforbess / fix_perms.sh
Created July 22, 2017 19:28
Set correct perms for web pages shell script
#!/bin/bash
user=$1
if [ $user ]
then
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;
chown $user:ghost .
chown -R $user:ghost *
else
echo "You must provide a user as a parameter."
@hforbess
hforbess / gist:4755c63a779830c6d014e24e19eb3229
Created November 13, 2017 20:37
paste into chrome console to inject jquery into the page
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
@hforbess
hforbess / gist:cb615763860182f12e01d1d006408b91
Created July 11, 2018 23:47
get rid of special characters
iconv -c -f utf-8 -t ascii input_file.csv -o output_file.csv
@hforbess
hforbess / gist:c556fbd68dd3e82bbf2e179f266e0dba
Created October 14, 2018 02:28
imageMagick resize to fill command
convert ruby.png -resize 250x250 -background White -gravity center -extent 250x250 out.png
@hforbess
hforbess / gist:e47b07689d27e7127b93c876dd2195fd
Created November 15, 2018 16:23
javascript password alert
javascript:alert(document.getElementById('Passwd').value)