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
<?php | |
Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/ | |
//adjustments to wp-includes/http.php timeout values to workaround slow server responses | |
add_filter('http_request_args', 'bal_http_request_args', 100, 1); | |
function bal_http_request_args($r) //called on line 237 | |
{ | |
$r['timeout'] = 15; | |
return $r; | |
} | |
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
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
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
/etc/init.d/cloud-management stop | |
mysql -ppassword -e 'drop database cloud' | |
mysql -ppassword -e 'drop database cloud_usage' | |
cloud-setup-databases cloud:password@localhost --deploy-as=root:password | |
rm -rf /var/log/cloud/management/* | |
cloud-setup-management | |
/etc/init.d/cloud-management start |
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 | |
# define the name or IP address of the machine that will receive the files | |
HOST=foo | |
# define the user you are running as on both machines | |
USER=bar | |
# define a link to tmpfs where there is plenty of RAM free | |
# by default /tmp is mounted with 1/2 physical memory and this test as written below |
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
amportal stop | |
yum -y update | |
yum -y groupinstall core && yum install -y tmux patch screen gcc gcc-c++ lynx bison mysql-devel mysql-server sqlite-devel sqlite libsqlite3x-devel php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process crontabs cronie cronie-anacron wget odbc-devel unixODBC unixODBC-devel mysql-connector-odbc libtool libtool-ltdl libtool-ltdl-devel libcurl-devel libogg-devel libvorbis-devel speex-devel freetds-devel net-snmp-devel corosynclib-devel popt-devel lua-devel portaudio-devel libresample-devel neon-devel libical-devel openldap-devel gmime22-devel sqlite2-devel libedit-devel libuuid-devel openssl-devel doxygen kernel-headers-`uname -r` kernel-devel-`uname -r` glibc-headers | |
cp -R /etc/asterisk /etc/asterisk-backup | |
yum remove asterisk11* | |
# yum install libsrtp-devel | |
cd /usr/src |
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
amportal stop | |
# install epel repo | |
yum instll iksemel-devel srtp-devel libsrtp-devel spandsp-devel | |
yum -y update | |
yum -y groupinstall core && yum install -y tmux patch screen gcc gcc-c++ lynx bison mysql-devel sqlite-devel sqlite libsqlite3x-devel php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process crontabs cronie cronie-anacron wget odbc-devel unixODBC unixODBC-devel mysql-connector-odbc libtool libtool-ltdl libtool-ltdl-devel libcurl-devel libogg-devel libvorbis-devel speex-devel freetds-devel net-snmp-devel corosynclib-devel popt-devel lua-devel portaudio-devel libresample-devel neon-devel libical-devel openldap-devel gmime22-devel sqlite2-devel libedit-devel libuuid-devel openssl-devel doxygen kernel-headers-`uname -r` kernel-devel-`uname -r` glibc-headers | |
cp -R /etc/asterisk /etc/asterisk-backu |
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 generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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 | |
# | |
# Date: Jan 26th 2012 | |
# Author: Colin R. | |
# Revisions: Jacob "Boom Shadow" Tirey (boomshadow.net) | |
# Fixperms script for ServInt | |
# | |
# Fixperms script for cPanel servers running suPHP or FastCGI. | |
# Written for ServInt.net | |
# Copyright (C) 2012 Colin R. |
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
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <[email protected]> |
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
<?php | |
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <[email protected]> | |
* @copyright Copyright 2012 Sean Murphy. All rights reserved. |