This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am ssimpson89 on github. | |
* I am ssimpson (https://keybase.io/ssimpson) on keybase. | |
* I have a public key whose fingerprint is 47E6 9D63 5860 3A40 8EB5 4C21 9815 C9BC 120E D3AE | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
/* | |
*** Original by Patric Draper <http://www.pdrap.org/about/> | |
*** | |
*** Changes on 13-Mar-2004 by Msquared <http://www.msquared.id.au/> | |
*** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $@ | |
do | |
ping -q -c 1 -W 1 ${1} >/dev/null | |
if [[ $? == 0 ]] | |
then | |
echo $1 OK | |
else | |
echo $1 FAILED | |
fi | |
shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### | |
# This script will tar up the files you define in the rsync section and send them off to S3 | |
# It will also delete any files older that $DAYS from the bucket | |
# You do need s3cmd (usually available in the repo) in order for this to work | |
# S3cmd will work with dreamobjects but if you want b2 or rackspace you'll need to swap out that code. | |
# This does also log to /var/log/backup.log and /var/log/backup.err | |
###### | |
DATE=`date +%Y-%m-%d_%H-%m` | |
TMPBACKUP='/backup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function latencyTest(url) { | |
$.ajax({ | |
url: "http://"+url+".kapeli.com/feeds/latencyTest_v2.txt", | |
cache: false, | |
success: function(content){ | |
if(beginsWith("Just a latency test. Move along.", content)) | |
{ | |
var link = document.getElementsByClassName("downloadButton")[0]; | |
if(link.getAttribute("href") == "Dash.zip") | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /var/www; | |
index index.html index.php; | |
# Make site accessible from http://localhost/ | |
server_name localhost; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### VARIABLES ### \ | |
EMAIL="" | |
SERVER=$(hostname) | |
MYSQL_CHECK=$(mysql -e "SHOW VARIABLES LIKE '%version%';" || echo 1) | |
LAST_ERRNO=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Last_Errno" | awk '{ print $2 }') | |
SECONDS_BEHIND_MASTER=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G"| grep "Seconds_Behind_Master" | awk '{ print $2 }') | |
IO_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_IO_Running" | awk '{ print $2 }') | |
SQL_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_SQL_Running" | awk '{ print $2 }') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# myapp daemon | |
# chkconfig: 345 20 80 | |
# description: myapp daemon | |
# processname: myapp | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Set up a new A record in Cloudflare, add the details of it along with your account details below | |
# Make sure this script runs on startup (or whenever you get a new IP...) | |
# | |
# @author Aaron Rice <[email protected]> | |
import urllib | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2010 Curt Micol <[email protected]> | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
NewerOlder