I hereby claim:
- I am darkflib on github.
- I am darkflib (https://keybase.io/darkflib) on keybase.
- I have a public key whose fingerprint is CC8C 22D1 B95D 957A 59EE 7665 D5E5 F691 45F5 BBA2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$id='1227feacf41c472e5ee34e20b510a240ad81ea6e'; | |
echo 'id '.$id."\n"; | |
$url = 'http://example.com/activity/pub?id='.$id; | |
echo 'url '.$url."\n"; | |
$data = array( 'foo' => 'bar' ); | |
$data_json = json_encode($data); | |
echo $data_json."\n"; |
<?php | |
//requires guzzle | |
require_once '../vendor/autoload.php'; | |
$token='xoxp-3180528888-111111-98229-b4e1b7'; | |
$email='darkflib@example.com'; | |
$teamname='example'; | |
$url="https://${teamname}.slack.com/api/users.admin.invite"; |
<?php | |
//just making a note of this here for later use... | |
//subscribe.php | |
function f($redis, $chan, $msg) { | |
switch($chan) { | |
case 'chan-1': | |
print "get $msg from $chan\n"; | |
break; | |
case 'chan-2': |
<?php | |
print_r($_SERVER); | |
define('PLUGINDIR','./plugin.d/'); | |
foreach (glob(PLUGINDIR."*.php") as $filename) { | |
require_once($filename); | |
$basename=substr($filename,strlen(PLUGINDIR),-4); | |
$funcname='plugin_'.$basename; | |
$result[$basename]=$funcname(); | |
} |
Rough concept is as follows. | |
Setup 4 lists for each queue. | |
for a queue 'foobar' | |
'queue:foobar:low' | |
'queue:foobar:medium' | |
'queue:foobar:high' | |
'queue:foobar:run_at' | |
and optionally 'queue:foobar:failed' |
<h3>Generating the keys</h3> | |
<p>Generating the key isn't difficult.</p> | |
<code> | |
[root@server1 ~]# <b>ssh-keygen</b> | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/root/.ssh/id_rsa): <b>test_key</b> | |
Enter passphrase (empty for no passphrase): <b>my passphrase</b> | |
Enter same passphrase again:<b>my passphrase</b> |
teamplayr.com: | |
This host is located in: NA | |
This host is located in: US | |
Array | |
( | |
[continent_code] => NA | |
[country_code] => US | |
[country_code3] => USA | |
[country_name] => United States | |
[region] => TX |
<?php | |
/* | |
This has been used for testing a logstash install and searching infrastructure. It is a quick and dirty implementation of the twitter streaming api. A better way would be to do it with curl with callback handlers. Normal curl wont work as the stream doesn't have a proper end. | |
*/ | |
set_time_limit(0); | |
$query_data = array('track' => '#devops', 'stall_warnings' => 'true'); | |
$user = 'twitteraccount'; // replace with your account |
#!/bin/bash | |
#### Edit the paths to suit your environment. | |
mkdir /tmp/geoip | |
cd /tmp/geoip/ | |
rm -f *.dat | |
wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | |
gzip -d - < GeoIP.dat.gz > GeoIP.dat |