Skip to content

Instantly share code, notes, and snippets.

View wesdeboer's full-sized avatar

Wes DeBoer wesdeboer

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wesdeboer on github.
  • I am wesdeboer (https://keybase.io/wesdeboer) on keybase.
  • I have a public key ASARaQ6RErTNiLpzhHrTnJ9ZEILZ3-Cf94l3Rle_XwDmEgo

To claim this, I am signing this object:

/**
* Keep Door Locked
*
* Copyright 2014 Wes DeBoer
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@wesdeboer
wesdeboer / platformSniffer
Created August 21, 2014 17:52
Yes, I actually just saw this code snippet on a live site today.
function platformSniffer(macURL,os2URL,linuxURL,winURL) {
location.href = winURL;
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1));
var is_mac = (agt.indexOf("mac")!=-1);
@wesdeboer
wesdeboer / readme
Created May 28, 2013 22:43
Amazon EC2 EBS Backup
Simple python script to take snapshots of ebs volumes daily/monthly and allow delete expired (10 days for daily, 120 days for monthly)
Ex:
python snapshot.py -m [daily|monthly] -v [vol-XXXXXX] -d 'description'
@wesdeboer
wesdeboer / slave_running
Created February 10, 2012 18:54
Detect if a mysql slave is still running and touch slave_running, monit then watches the timestamp on the file
check file slave_running with path /opt/slave_running
if timestamp > 3 minutes then alert