Skip to content

Instantly share code, notes, and snippets.

View gist:63a54774e01f223703d5
def exists(self, key):
"""Check for existence in cache
:param key: Unique key to check
:type key: str
:rtype: bool
"""
return self.__contains__(key)
View gist:9149227

Keybase proof

I hereby claim:

  • I am tabletcorry on github.
  • I am tabletcorry (https://keybase.io/tabletcorry) on keybase.
  • I have the public key with fingerprint FFD9 5F42 0A26 3E54 6948  2D54 0F9A 98A6 5E3B 2327

To claim this, I am signing this object:

View gist:3908944
$ bundle exec ruby bin/logstash agent -vvv -e 'input { stdin { type => 'cow' } } output { redis { host => ['localhost', 'localhost:6380'] key => 'logstash' data_type => 'list' } }'
{"message":"Read config","level":"info","file":"agent.rb","line":"310","method":"run"}
{"message":"Start thread","level":"info","file":"agent.rb","line":"313","method":"run"}
Error at line 1, column 79: ":6380] key => logstash data_type => list } }\n"
Error at line 1, column 79: ":6380] key => logstash data_type => list } }\n"
RuntimeError: Invalid Configuration. Check syntax of config file.
parse at /Users/chaines/github/logstash/lib/logstash/config/grammar.rb:552
parse at /Users/chaines/github/logstash/lib/logstash/config/file.rb:28
parse_config at /Users/chaines/github/logstash/lib/logstash/agent.rb:266
run_with_config at /Users/chaines/github/logstash/lib/logstash/agent.rb:368
@tabletcorry
tabletcorry / gist:3374317
Created Aug 16, 2012
Multiline on non-dates
View gist:3374317
multiline {
negate => true
pattern => "^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}"
what => "previous"
type => "kittens"
}
@tabletcorry
tabletcorry / Parser
Created Jan 31, 2012
logstash 1.1.0 configs
View Parser
input {
file {
type => "syslog"
# Wildcards work, here :)
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
}
amqp {
# ship logs to the 'rawlogs' fanout queue.
type => "all"
@tabletcorry
tabletcorry / log4j
Created Jan 31, 2012
logstash output
View log4j
DEBUG 13:34:50,845 [Giganto] Disconnected from [[#zen_unicast_1#][inet[localhost/127.0.0.1:9300]]]
DEBUG 13:34:50,847 [Giganto] Connected to node [[#zen_unicast_1#][inet[localhost/127.0.0.1:9300]]]
DEBUG 13:34:53,848 [Giganto] ping responses:
--> target [[Grog the God-Crusher][J7ZUBwUcQ12J2J0uIa0eeQ][inet[/72.14.XXX.XX:9302]]{client=true, data=false}], master [null]
DEBUG 13:34:53,849 [Giganto] Disconnected from [[#zen_unicast_1#][inet[localhost/127.0.0.1:9300]]]
DEBUG 13:34:53,851 [Giganto] Connected to node [[#zen_unicast_1#][inet[localhost/127.0.0.1:9300]]]
DEBUG 13:34:56,851 [Giganto] ping responses:
--> target [[Grog the God-Crusher][J7ZUBwUcQ12J2J0uIa0eeQ][inet[/72.14.XXX.XX:9302]]{client=true, data=false}], master [null]
@tabletcorry
tabletcorry / bar-__init__.py
Created Jul 15, 2011
Fabric namespace recursion
View bar-__init__.py
from fabric.api import *
@task
def bar_noop():
return
@tabletcorry
tabletcorry / fabfile.py
Created Jul 14, 2011
Fab decorator issue
View fabfile.py
from fabric.api import *
import test
@task
def noop():
return
You can’t perform that action at this time.