Skip to content

Instantly share code, notes, and snippets.

View clstokes's full-sized avatar
☁️

Cameron Stokes clstokes

☁️
View GitHub Profile
@clstokes
clstokes / gist:3821288
Created October 2, 2012 17:14
watchdog timeout
Skipping capture since it is not a named capture and named_captures_only is true. {"field":"MINUTE","level":"debug","file":"/opt/logstash/logstash-1.1.1-monolithic.jar!/logstash/filters/grok.rb","line":"210","method":"filter"}
Skipping capture since it is not a named capture and named_captures_only is true. {"field":"SECOND","level":"debug","file":"/opt/logstash/logstash-1.1.1-monolithic.jar!/logstash/filters/grok.rb","line":"210","method":"filter"}
Exception in thread "LogStash::Runner" Skipping capture since it is not a named capture and named_captures_only is true. {"field":"URIPATH","level":"debug","file":"/opt/logstash/logstash-1.1.1-monolithic.jar!/logstash/filters/grok.rb","line":"210","method":"filter"}
org.jruby.exceptions.RaiseException: (SystemExit) watchdog timeout
at org.jruby.RubyThread.join(org/jruby/RubyThread.java:509)
at Agent.wait(file:/opt/logstash/logstash-1.1.1-monolithic.jar!/logstash/agent.rb:326)
at logstash.runner.main(logstash/runner.rb:42)
at org.jruby.RubyArray.each(org/jruby/
@clstokes
clstokes / logstash.log
Created October 1, 2012 18:38
Logstash - single log file
input {
file {
type => "akamai"
path => "/mnt/logs/processing/www_182149.esclf_U.201209270000-2400-0"
}
}
filter {
grok {
type => "akamai"
@clstokes
clstokes / tomcat7
Created September 25, 2012 21:06
Enable JMX in Tomcat 7 on Ubuntu
#
# Since I have to look this up every time...
#
# Add the following in /etc/default/tomcat7
#
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=9991"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
@clstokes
clstokes / gist:1475022
Created December 14, 2011 02:46
Trying to normalize 'Nøgne Ø' to 'Nogne O'
groovy:000> java.text.Normalizer.normalize('Nøgne Ø', java.text.Normalizer.Form.NFD);
===> Nøgne ?o?
groovy:000> java.text.Normalizer.normalize('Nøgne Ø', java.text.Normalizer.Form.NFC);
===> Nøgne Ø
groovy:000> java.text.Normalizer.normalize('Nøgne Ø', java.text.Normalizer.Form.NFKD);
===> Nøgne ?o?
groovy:000> java.text.Normalizer.normalize('Nøgne Ø', java.text.Normalizer.Form.NFKC);
===> Nøgne Ø
groovy:000>
@clstokes
clstokes / vmstat
Created December 8, 2011 00:22
'vmstat -S' from a Solaris 10 machine
kthr memory page disk faults cpu
r b w swap free si so pi po fr de sr m1 m1 m1 m1 in sy cs us sy id
1 0 67 11686688 245176 0 0 1377 3902 3945 1336 8082 0 116 1 15 5827 72630 5721 18 5 78
0 1 67 11684856 220736 0 0 3531 5677 6796 536 24106 2 265 0 2 4390 4206 4743 14 4 82
0 3 67 11686680 228288 0 0 3044 8739 9184 0 17463 2 258 0 1 3805 2725 3550 10 3 87
0 3 67 11686680 241976 0 0 2856 9523 9674 0 8885 7 252 0 1 4064 2857 3630 10 3 87
0 5 67 11686680 244720 0 0 3637 5867 5867 0 7819 4 275 1 0 3563 2097 3229 7 2 91
0 5 67 11684568 241688 0 0 2988 7204 7203 12040 13301 6 232 4 0 4698 24440 4145 14 5 81
0 5 67 11679848 240440 0 0 2925 6453 6371 14984 19331 9 265 3 6 4204 10337 3946 17 6 78
1 2 67 11658904 201352 0 0 2407 6960 8395 8864 42789 11 302 1 1 5045 37979 4538 56 7 37
require 'fileutils'
require 'date'
require 'yaml'
require 'rexml/document'
include REXML
doc = Document.new File.new(ARGV[0])
FileUtils.mkdir_p "_posts"
@clstokes
clstokes / slideshow-javascript.html
Created January 23, 2011 15:51
A solution to the JavaScript problem posed in observation 3 at http://bit.ly/gCmjbR.
<!doctype html>
<head>
<meta charset="utf-8">
<title></title>
</head>