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
prog=$0 | |
srcdir=$1 | |
ignore="$2" | |
if test $# -lt 1; then | |
echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\"" | |
exit 1 | |
fi | |
ignore_additional=". .. CVS .git .svn" |
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
to add more dbs to replicate: | |
- edit /etc/mysql/my.cnf on master | |
* add binlog_do_db = thedb | |
- restart master mysqld instance | |
- on master instance | |
* RESET MASTER (optional) | |
* USE thedb | |
* FLUSH TABLES WITH READ LOCK; | |
* SHOW MASTER STATUS - make note of file & position | |
- dump the db from commandline |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# base config | |
config.vm.box = "janihur/ubuntu-1404-desktop" | |
config.vm.box_check_update = false | |
config.vm.hostname = "proxy6-01-dev" | |
# port forwarding |
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
#282A36,#44475A,#44475A,#8BE9FD,#6272A4,#FFFFFF,#50FA7B,#FF5555 | |
#40415a,#54556e,#f99a66,#ffffff,#54556e,#ffffff,#59d979,#d55161 |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# base config | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
# network interfaces | |
config.vm.network "private_network", ip: "192.168.33.10" |
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
mysqldump --set-gtid-purged=OFF --no-create-info --skip-triggers -S /data/database/data/mysql.sock -u USERNAME -p DBNAME TABLE1 TABLE2 TABLE3 > outputfile.sql |
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
from threading import Thread, Event | |
import time | |
import requests | |
class TimerThread(Thread): | |
def __init__(self, event, interval): | |
Thread.__init__(self) |
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
# Incoming HTTP traffic on interface bound for IP | |
sudo tcpdump -s 0 -i <interface> -A host <host/ip> and tcp port http | |
# All Outgoing HTTP traffic | |
sudo tcpdump dst port 80 -v -n | |
# SSL handshake | |
sudo tcpdump -i <interface> -s 1500 -vv -lntX host emailapi.dynect.net and port 443 | |
openssl s_client -connect emailapi.dynect.net:443 | |
GET / HTTP/1.0 |
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
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from SocketServer import ThreadingMixIn | |
import sys | |
import threading | |
class Handler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) |
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
while sleep 5; do mysql -u dbuser -p$MYSQLPW -e "SELECT HOST, COMMAND, TIME, STATE, SUBSTRING(INFO, 1, 100) AS INFO, ROWS_SENT, ROWS_EXAMINED FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY HOST, TIME DESC INTO OUTFILE '//path/to/dir/mysqlproclist_$(date +%s).csv' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n'"; done |
OlderNewer