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
fastcgi_read_timeout 60; | |
location ^~ /administrator/ { | |
fastcgi_read_timeout 360; | |
fastcgi_send_timeout 360; | |
try_files $uri /index.php?url=$uri&$args; | |
} |
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
check process Xvfb | |
with pidfile /var/run/screencap.pid | |
start program = "/etc/init.d/screencap start" | |
stop program = "/etc/init.d/screencap stop" |
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/sh | |
### BEGIN INIT INFO | |
# Provides: screencap | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the Xvfb server | |
# Description: starts Xvfb using start-stop-daemon |
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
sudo cat /etc/php5/fpm/conf.d/xdebug.ini | |
zend_extension="/usr/lib/php5/20090626/xdebug.so" | |
xdebug.remote_enable=true | |
xdebug.remote_host=127.0.0.1 | |
xdebug.remote_port=9001 | |
xdebug.remote_handler=dbgp | |
xdebug.remote_autostart=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
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
use epoll; | |
} | |
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
top - 18:41:25 up 26 days, 2:18, 1 user, load average: 0.00, 0.01, 0.05 | |
Tasks: 106 total, 1 running, 105 sleeping, 0 stopped, 0 zombie | |
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.2%st | |
Mem: 606492k total, 357132k used, 249360k free, 169852k buffers | |
Swap: 0k total, 0k used, 0k free, 48836k cached | |
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |
22159 memcache 20 0 72300 9864 888 S 0.0 1.6 0:01.87 memcached | |
16565 memcache 20 0 69100 5732 0 S 0.0 0.9 0:05.82 memcached | |
23593 root 20 0 215m 5712 1592 S 0.3 0.9 0:00.79 php5-fpm |
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
free -m | |
total used free shared buffers cached | |
Mem: 592 348 243 0 165 47 | |
-/+ buffers/cache: 134 457 | |
Swap: 0 0 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
free -m | |
total used free shared buffers cached | |
Mem: 7933 3597 4336 0 288 1058 | |
-/+ buffers/cache: 2250 5683 | |
Swap: 5721 0 5721 |
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 | |
class Foo extends AppModel { | |
var $name = 'Foo'; | |
var $virtualFields = array( | |
'tot_impressions' => 'COALESCE(SUM(Foo.impressions),0)', | |
'tot_clicks' => 'COALESCE(SUM(Foo.clicks),0)', //This is initial ad clicks | |
); | |
.... |
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 | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
#make a memcache daemon. | |
function makememcached { | |
DNAME=memcached_$1 |