Skip to content

Instantly share code, notes, and snippets.

View bvogel's full-sized avatar

Burkhard Vogel-Kreykenbohm bvogel

View GitHub Profile
const $ = $jQueryWom;
let boxes = $('.wom_hidecheckbox2');
let form = $('.wom_hidecheckbox2').parents('form');
let ids = [];
boxes.each(function () {ids.push(this.name)});
boxes.prop('checked', false);
@albertbori
albertbori / Installation.md
Last active December 26, 2025 23:19
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@bvogel
bvogel / gist:073b59b19354861dca1d
Created May 22, 2014 18:15
/usr/local/cron/delete_security_cam_history.sh
#!/bin/sh
seven_days_ago=`date -d '7 days ago' +'%Y%m%d'`
rm -f /share/SecurityCam/webcam${seven_days_ago}*
@bvogel
bvogel / gist:4d96dbaab859a33bd157
Last active August 29, 2015 14:01
/usr/local/cron/backup_buddy_production_db.sh
#!/bin/sh
date_today=`date +%Y-%m-%d`
year_month_today=`date +%Y-%m`
ssh rails-deploy@buddy.buddyandselly.com "mysqldump -h 93.92.128.20 -u xxx -pxxx buddy_production | bzip2 -c > buddy/backups/buddy.dump.$date_today.sql.bz2"
if [ ! -d "/share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today" ]; then
mkdir /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today
chown admin.everyone /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today
chmod 770 /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today
fi
scp rails-deploy@buddy.buddyandselly.com:~/buddy/backups/buddy.dump.$date_today.sql.bz2 /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today/