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 | |
// MemcacheQ config | |
$queueOptions = array( | |
'name' => 'example-queue', | |
'driverOptions' => array( | |
'host' => '127.0.0.1', | |
'port' => 22201 | |
) | |
); |
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 | |
concurrent=5 | |
max=81 | |
while [ $concurrent -lt $max ] | |
do | |
ab_args='-n 2000 -c '$concurrent | |
folder='run-'`date +'%Y%m%d%H%M%S'`'-'$concurrent |
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
parallel-ssh -t -1 -P -v -H server1 -H server2 tail -f /var/log/httpd/\* |
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 example | |
{ | |
private $instance; | |
public function getInstance() | |
{ | |
// Lazy load the instance | |
if (null === $this->instance) { | |
$this->instance = new example(); |
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
{ | |
"name": "..", | |
"description": "..", | |
"autoload": { | |
"psr-0": { | |
"At": "library/", | |
"Glitch": "library/", | |
"Zend": "library/", | |
"" : "application/modules/" | |
}, |
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
input { | |
file { | |
path => ["bank/*.csv"] | |
start_position => "beginning" | |
} | |
} | |
filter { | |
csv { | |
columns => ['date', 'name', 'account', 'contra-account', 'code', 'increasedecrease', 'amount', 'category', 'description'] | |
} |
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
# The path to store the cache files, limit the folder to 100MB | |
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m; | |
# A unique request is defined by this cache key | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
# Show the cached version if upstream gives a timeout or a HTTP 500 error | |
fastcgi_cache_use_stale error timeout invalid_header http_500; | |
# Don't use the following headers to define the cache variables |
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
import urllib2 | |
def lambda_handler(event, context): | |
req = urllib2.Request('https://www.thewebsite.nl/wp/wp-cron.php?doing_wp_cron', headers={'User-Agent' : "AWS Lambda Cron"}) | |
con = urllib2.urlopen(req) | |
print con.read() |
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
def v2_playbook_on_play_start(self, play): | |
hosts = play.get_variable_manager()._inventory.get_hosts() | |
for host in hosts: | |
pprint(host.get_group_vars()['applicaton.deploy_env']) | |
pprint(host.get_group_vars()) | |
pprint(host.get_vars()) |