Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gjnoonan on github.
  • I am gjnoonan (https://keybase.io/gjnoonan) on keybase.
  • I have a public key whose fingerprint is 5FE8 ABB7 2D18 3558 2498 6594 252C 038D A045 2232

To claim this, I am signing this object:

@gjnoonan
gjnoonan / gist:0471762878c89e80fa3d
Created January 5, 2016 14:55
Varnish datadog exception
varnish
-------
- instance #0 [ERROR]: 'no element found: line 1, column 0'
Traceback (most recent call last):
File "/opt/datadog-agent/agent/checks/__init__.py", line 745, in run
self.check(copy.deepcopy(instance))
File "/opt/datadog-agent/agent/checks.d/varnish.py", line 93, in check
self._parse_varnishstat(output, use_xml, tags)
File "/opt/datadog-agent/agent/checks.d/varnish.py", line 178, in _parse_varnishstat
p.Parse(output, True)
### Keybase proof
I hereby claim:
* I am adulteratedjedi on github.
* I am adulteratedjedi (https://keybase.io/adulteratedjedi) on keybase.
* I have a public key whose fingerprint is 30E5 9CF3 E5B5 4AF3 5754 0654 FB63 A734 E9EF 838D
To claim this, I am signing this object:
running PHP 5.3.6 with (/usr/bin/php) >>>
Array
(
[Format] => DVD Video Disc - DVD / Normal
[OriginalLanguage] => Swedish
)
Format: DVD Video Disc - DVD / Normal
@gjnoonan
gjnoonan / memcached.monit
Created January 14, 2011 21:49
A monit script for memcached
check process memcached with pidfile /var/pids/memcached.pid
start program = "/usr/local/bin/memcached -d -P /var/pids/memcached.pid -u root -m 512 -l 127.0.0.1 -p 11211"
stop program = "/bin/kill -9 `cat /var/pids/memcached.pid`; rm /var/pids/memcached.pid"
if failed host 127.0.0.1 port 11211 then restart
if cpu > 60% for 2 cycles then alert
if cpu > 98% for 5 cycles then restart
if 2 restarts within 3 cycles then timeout
group cache
Robin:~ adulteratedjedi$ curl http://github.com/atmos/cider/raw/master/bootstrap.sh -o - | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
104 835 104 835 0 0 2671 0 --:--:-- --:--:-- --:--:-- 5964
Ensuring we have the latest version of cider installed
Cider installed successfully
[Wed, 21 Jul 2010 11:18:35 +0100] INFO: Starting Chef Solo Run
[Wed, 21 Jul 2010 11:18:38 +0100] INFO: Replacing the run_list with ["homebrew", "homebrew::dbs", "homebrew::misc", "ruby", "ruby::irbrc", "node"] from JSON
[Wed, 21 Jul 2010 11:18:38 +0100] INFO: Ran execute[include cider environment into defaults for ~/.bash_profile] successfully
[Wed, 21 Jul 2010 11:18:38 +0100] INFO: Ran execute[include cider environment into defaults for ~/.bashrc] successfully
[2010-07-09 12:15:58] make
handle.c: In function ‘rb_dlhandle_close’:
handle.c:73: warning: format not a string literal and no format arguments
readline.c: In function ‘username_completion_proc_call’:
readline.c:1292: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1292: error: (Each undeclared identifier is reported only once
readline.c:1292: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [mkmain.sh] Error 1
[2010-07-10 16:23:37] make
class Array
def sum
inject(0.0) { |result, el| result + el }
end
def mean
sum / size
end
end
var linkinus = require('linkinus-plugin');
lcore = require('linkinus-core');
var myplugin = linkinus.makeplugin([
// Do some ultra cool stuff
var adulteratedjedi = lcore.whois( "adulteratedjedi" );
if ( adulteratedjedi.last_seen_time > Time.now ) {
return 0;
}
class Address
include MongoMapper::EmbeddedDocument
key :street
key :town
key :county
key :postcode
end
class EmailAddress