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
cd /tmp/serverlist | |
for i in * ; do scp /var/www/$1.torrent $i:torrent/watch/ ; done |
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 | |
require('rackspace.inc'); | |
$conn = new OpenCloud\Rackspace( | |
'https://identity.api.rackspacecloud.com/v2.0/', | |
array( | |
'username' => '', | |
'apiKey' => '', | |
'tenantName' => 'this is your account number' | |
)); | |
$compute = $conn->Compute('cloudServersOpenStack', 'DFW', 'publicURL'); |
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
system.method.set_key = event.download.finished,done,"execute=/usr/local/bin/run.sh,$d.get_name=;d.set_directory=/var/www" | |
schedule = watch_directory,1,1,load_start=/root/torrent/watch/*.torrent |
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 | |
$dir = getcwd(); | |
foreach (file('/usr/local/etc/baseline.csv') as $row) { | |
list($k, $v) = explode(',', trim($row)); | |
$a[$k] = (int)$v; | |
} | |
$a = array_reverse($a); | |
$bins[] = array('sum' => 0, 'data' => array()); | |
foreach ($a as $name => $time) { |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> |
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
apt-get update | |
aptitude install -y apache2 libonig2 libqdbm14 libxml2 apache2-mpm-prefork ucf libicu44 mysql-server libjpeg62 libpng12-0 libt1-5 libxpm4 git-core autoconf automake libssl-dev libtool shtool make | |
service mysql stop | |
sed -i 's/\/var\/lib\/mysql/\/dev\/shm\/mysql/g' /etc/mysql/my.cnf | |
sed -i '/en_US/a skip_innodb' /etc/mysql/my.cnf | |
mysql_install_db | |
service mysql start | |
echo ServerName localhost > /etc/apache2/httpd.conf | |
cd /etc/apache2/mods-enabled | |
ln -s ../mods-available/rewrite.load |
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 | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
function btest_menu() { | |
$items['btest'] = array( | |
'type' => MENU_CALLBACK, | |
'access callback' => TRUE, | |
'page callback' => 'btest_page', | |
); |
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
if (!isset($input)) { | |
if (!empty($element['#default_value'])) { | |
$element['#needs_validation'] = TRUE; | |
} | |
$element['#has_garbage_value'] = TRUE; | |
} | |
if ($input === FALSE && !isset($element['#default_value']))) { | |
$element['#has_garbage_value'] = TRUE; | |
} |
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
Index: apc.c | |
=================================================================== | |
--- apc.c (revision 326528) | |
+++ apc.c (working copy) | |
@@ -34,6 +34,7 @@ | |
#include "apc.h" | |
#include "apc_zend.h" | |
#include "apc_cache.h" | |
+#include "apc_globals.h" | |
#include "php.h" |
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 DummyFilter extends PHP_User_Filter | |
{ | |
private $_data; | |
/* Called when the filter is initialized */ | |
function onCreate( ) | |
{ |