- Downloads wordpress if it's newer than the last time this ran.
- Updates wordpress by overwriting the existing files.
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 | |
set -e | |
USAGE="$0 <username> <ssh_pubkey> <group,groups>" | |
if [ -z ${1+x} ]; then echo $USAGE; exit 1; fi | |
if [ -z ${2+x} ]; then echo $USAGE; exit 1; fi | |
USERNAME=$1 |
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 | |
# Run this on every server: | |
# curl https://gist.githubusercontent.com/jondb/27f5395fbebf9701d71a/raw/ceba1231a5903566c5e24c61d0ce01f3e4e02a02/key | sudo sh | |
user=jon | |
key='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCgJaMxxNllVsb7kMRPP/95skzfGMEYtbt2r30bQZ0vt/4KMRgrX4eK8tyCbXY9g4ohmMy/iSm+b5SVwLnV58haoQYvLOuauSO8N+Gvrgi5q7vU5XXzKm2JXfwORCBwlxv37c/5YSRL1IyATlIH4iex17L26bwdwScU6wfrFpUjxN+tNlcGVR79e2TZ1Xdtmwz7+JkCIMHj+sVrauSQvmwhj81nPwiHQqFV28vwNRHV8RX30HZMHo22kTmwNbs+U7EYiIFAeihvdR0ui77B2e54ARyBF+fm2Z9+N6wWk2qM1UyyW6tmiEMwCSvjfhTCU4cdVaHX9FJ9r32/Zu/rCyq1 jon@Jonathans-MacBook-Air.local' | |
/usr/sbin/useradd -m $user -s /bin/bash | |
passwd -d $user |
I hereby claim:
- I am jondb on github.
- I am jondb (https://keybase.io/jondb) on keybase.
- I have a public key whose fingerprint is 4A3E 11E7 1298 0B54 A910 CE91 6AF3 B232 BB45 2B0F
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
query="{query}" | |
if [ $query != '' ]; then | |
/Users/jon/bin/snap -f={query} | |
else | |
/Users/jon/bin/snap | |
fi |
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
moved: http://notes.is9.co/2015/02/18/ossec-json-elk/ |
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/env python | |
# sample usage: checksites.py eriwen.com nixtutor.com yoursite.org | |
import pickle, os, sys, logging | |
from httplib import HTTPConnection, socket | |
from smtplib import SMTP | |
def email_alert(message, status): | |
fromaddr = 'you@gmail.com' |
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/env python | |
"""Usage: acat.py <root-config-file> | |
This program takes the root apache config file and outputs it | |
to STDOUT following all Include directives. | |
source: https://gist.github.com/jondb/5637099 | |
Get it: | |
curl https://gist.github.com/jondb/5637099/download | tar xvz --strip-components=1 && chmod +x acat.py | |
""" |