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( ) | |
{ |
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
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
<?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
<?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
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 | |
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
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 | |
namespace Drupal\Core\Config; | |
class ConfigMetadata { | |
/** | |
* @var \Drupal\Core\Config\Config | |
*/ | |
protected $config; |
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 read -r project | |
do | |
output=`drush dl --dev -y -q --destination=allmodules --package-handler=git_drupalorg $project` | |
if [ -z "$output"] | |
then | |
output=`drush dl --dev -y -q --destination=allmodules --default-major=6 --package-handler=git_drupalorg $project` | |
if [ -z "$output"] ; then echo 'module sucks; fi | |
fi | |
done < allmodules.txt |