Skip to content

Instantly share code, notes, and snippets.

Jimmy Bonney jbonney

Block or report user

Report or block jbonney

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
View keybase.md

Keybase proof

I hereby claim:

  • I am jbonney on github.
  • I am jbonney (https://keybase.io/jbonney) on keybase.
  • I have a public key ASBgDeWYjOtPoyZhuSwq-zuANFYogofsPCrYtKgGj_XwRQo

To claim this, I am signing this object:

@jbonney
jbonney / crontab
Last active Aug 29, 2015
Script to check the internet connection of a kiosk and reload the active page in case the connection drops and then comes back online. Sources: -http://alexba.in/blog/2015/01/14/automatically-reconnecting-wifi-on-a-raspberrypi/ - http://raspberrypi.stackexchange.com/questions/6981/auto-refresh-for-midori - http://www.lynsayshepherd.com/blog/2014…
View crontab
*/2 * * * * DISPLAY=:0 sh /usr/local/bin/wifi_reloader.sh
View drop_tables.sh
user=...
pass=...
host=localhost # or remote if necessary
database=...
mysqldump -u${user} -p${pass} -h ${host} --add-drop-table --no-data ${database} | grep ^DROP | mysql -u${user} -p${pass} -h ${host} ${database}
View remove_kernels.sh
# Get info about current kernel
uname -a
# List installed kernels
dpkg-query -l | awk '/linux-image-*/ {print $2}'
# Remove old kernel and dependencies (DO NOT DELETE KERNEL FROM uname -a)
sudo apt-get --purge remove <Kernel>
sudo apt-get autoremove
# Update grub (usually not necessary)
sudo update-grub
View encrypt_decrypt.sh
#Encryption
openssl enc -in important_backups.tar.gz -aes-256-cbc -e > important_backups_encrypted.tar.gz
# Decryption
openssl enc -in important_backups_encrypted.tar.gz -aes-256-cbc -d > important_backups_decrypted.tar.gz
View dbuser.sql
CREATE USER 'dbbackup'@'localhost' IDENTIFIED BY '***';
GRANT SELECT ,
RELOAD ,
FILE ,
SUPER ,
LOCK TABLES ,
SHOW VIEW ON * . * TO 'dbbackup'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
@jbonney
jbonney / .bash_profile
Created Feb 4, 2014
Run ssh-agent when you login, and kill it when you logout. Add code to ~/.bash_profile. Taken from http://blog.xk72.com/post/75565726956/ssh-agent
View .bash_profile
eval `/usr/bin/ssh-agent -s`
trap "kill $SSH_AGENT_PID" 0
@jbonney
jbonney / link.txt
Created Jan 31, 2014
Ruby Styleguide from GitHub
View link.txt
View external_ip.sh
wget -qO- http://ipecho.net/plain ; echo
curl ipecho.net/plain ; echo
@jbonney
jbonney / link.txt
Created Dec 13, 2013
HTML5+JSON interactive table plugin. Dynatable is a funner, semantic, interactive table plugin using jQuery, HTML5, and JSON. And it's not just for tables.
View link.txt
You can’t perform that action at this time.