This file contains hidden or 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
yum -y install etckeeper | |
yum -y remove sendmail | |
yum -y groupinstall "Development Tools" | |
rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm | |
vim /etc/yum.repos.d/Percona.repo | |
yum -y install nfs-utils gpg etckeeper nginx php php-fpm php-pecl-imagick composer php-oauth php-magickwand php-pecl-imagick php-pecl-apc php-pear-PHP-CodeSniffer php-pecl-cairo php-pecl-igbinary php-pecl-mongo php-pecl-xdebug php-zmq php-gd php-gmp php-mcrypt php-mysqlnd php-pdo php-pecl-memcache php-pecl-memcached php-pecl-geoip php-process php-soap varnish openssl python3 python-pip python3-pip gpg perl-Data-Dumper screen telnet redhat-rpm-config cracklib libc libstdc glibc glibc-devel glibc-headers postfix memcached redis Percona-Server-server-56 Percona-Server-client-56 |
This file contains hidden or 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
export BASEPATH=/var/web/vhosts/ | |
export SVNPATH=/var/web/wordpress-plugins/ | |
# Don't modify after this point. | |
export CONTENT_DIRS=`find ${BASEPATH} -name wp-content` | |
export PLUGIN_DIRS=`find ${CONTENT_DIRS} -maxdepth 1 -mindepth 1 -type d -name plugins` | |
export PLUGIN_FOLDERS=`find ${PLUGIN_DIRS} -maxdepth 1 -mindepth 1 -type d` | |
export PLUGIN_NAMES=`echo ${PLUGIN_FOLDERS} | xargs -n 1 basename | sort | uniq -u` | |
export OLD_PLUGIN_DATE=`date +%s` |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
# launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
# launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
from twisted.internet import reactor, stdio, defer | |
from twisted.internet.protocol import Protocol, Factory | |
from twisted.protocols.basic import LineReceiver | |
import time, re, math, json |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
# launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
# launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
from twisted.internet import reactor, stdio, defer | |
from twisted.internet.protocol import Protocol, Factory | |
from twisted.protocols.basic import LineReceiver | |
import time, re, math, json |
This file contains hidden or 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
# Python/Twisted/Redis backed DNS server - resolves from NAME to IP addrs | |
# fallback to google or any other DNS server to resolv domains not present on Redis | |
# to set a new domain on redis, just issue a SET domain.tld ip_addr | |
# run with twistd -ny txredns.tac | |
# gleicon 2011 | |
from twisted.names import dns, server, client, cache | |
from twisted.application import service, internet | |
from twisted.internet import defer | |
from twisted.python import log |
This file contains hidden or 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 f in `find`; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done |
This file contains hidden or 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 php | |
<?php | |
/* | |
Copyright 2013 Stuart Carnie and other contributors | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
This file contains hidden or 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
pt-slave-restart --user=user --verbose --ask-pass --host=127.0.0.1 --error-text="something unique to the expected error" |
This file contains hidden or 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
pt-archiver --user USER --password PASSWORD --no-check-charset --host=127.0.0.1 --file '/PATH/TABLE_%Y-%m-%d-%D.%t' --for-update --check-slave-lag h=HOST,u=USER,p=PASSWORD --source D=DATABASE,t=TABLE --where 'modified <= DATE_SUB(NOW(), INTERVAL 4 WEEK)' |
This file contains hidden or 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/sh | |
# | |
# (c) Copyright by Wolfgang Fuschlberger... | |
# Cheaply hacked as a proof of concept by Israel Shirk, December 2013. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# |