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
LoadPlugin java | |
<Plugin "java"> | |
JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar" | |
LoadPlugin "org.collectd.java.GenericJMX" | |
<Plugin "GenericJMX"> | |
# Garbage collector information | |
<MBean "garbage_collector"> | |
ObjectName "java.lang:type=GarbageCollector,*" |
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
SELECT schemaname,relname,n_live_tup | |
FROM pg_stat_user_tables | |
ORDER BY n_live_tup DESC; |
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
//Grooscript Angular.js TODO example from https://angularjs.org/ | |
//You need next release of grooscript to run it (1.0.1) | |
class TodoController implements AngularController { | |
def todos = [ | |
[text:'learn angular', done: true], | |
[text:'build an angular app', done: false] | |
] | |
def addTodo() { | |
scope.todos << [text: scope.todoText, done: false] | |
scope.todoText = '' |
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
# How to print the stacktrace from anywhere : | |
# 1° | |
#------------------------------------------------------------------------------ | |
module Kernel | |
def print_stacktrace | |
raise | |
rescue | |
puts $!.backtrace[1..-1].join("\n") | |
end |