View rd-clean.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
 
# setup ~/.pgpass to allow passwordless connection to postgres
# keep last 30 executions for each job
KEEP=30
 
 
cd /var/lib/rundeck/logs/rundeck
 
JOBS=`find . -maxdepth 3 -path "*/job/*" -type d`
View AuthenticationViaFormAction.java
1 2 3 4 5 6 7 8 9 10
package your.package.here;
 
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;
 
import org.jasig.cas.CentralAuthenticationService;
import org.jasig.cas.Message;
import org.jasig.cas.authentication.AuthenticationException;
View camel_elastisearch_mapping.xml
1 2 3 4 5 6 7 8 9 10
<!--
starts first, then stops. All other routes start after this one has completed
Same as: curl -XPUT http://localhost:9200/_template/opennms -d @elmapping.json
-->
<route id="elastisearchTemplateMapping" autoStartup="true" startupOrder="1">
<from uri="timer://runOnce?repeatCount=1&amp;delay=0"/>
<setHeader headerName="CamelHttpMethod">
<constant>PUT</constant>
</setHeader>
<setHeader headerName="CamelContentType">
View logstash.conf
1 2 3 4 5 6 7 8 9 10
input {
file {
type => "accesslog"
path => [ "/var/log/access_logs/access_log" ]
}
}
 
filter {
grok {
match => { "message" => "%{EXTENDEDAPACHELOG}" }
View el_template.json
1 2 3 4 5 6 7 8 9 10
{
"template":"logstash-*",
"settings":{
"index.refresh_interval":"5s"
},
"mappings":{
"_default_":{
"dynamic_templates":[
{
"string_fields":{
View copy_extract.awk
1 2 3 4
BEGIN {start=0}
/^COPY "/ { if(index($0,TBL)!=0) { start=1; } }
// {if(start==1) print $0;}
/\\\./ {start=0;}
View constructor_code.js
1 2 3 4 5 6 7 8 9 10
function assembleLayer(conf) {
var constructorr=window, path=conf.provider.split(".");
// get a reference to the constructor, by walking the provider path
for(var i=0,l=path.length;i<l;i++) { constructorr=constructorr[path[i]]; }
 
// following constructor code from: http://stackoverflow.com/a/1608546/887883
// now invoke it
function F() {
return constructorr.apply(this, conf.args);
View cfg_based.js
1 2 3 4 5
var layers=[
{provider:'OpenLayers.Layer.Bing',args:[{name: "Road",key: "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf",type: "Road"}]},
{provider:'OpenLayers.Layer.Bing',args:[{name: "Hybrid",key: "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf",type: "AerialWithLabels"}]},
{provider:'OpenLayers.Layer.Bing',args:[{name: "Aerial",key: "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf",type: "Aerial"}]}
];
View bing.js
1 2 3 4 5 6 7 8 9 10
var road = new OpenLayers.Layer.Bing({
name: "Road",
key: apiKey,
type: "Road"
});
var hybrid = new OpenLayers.Layer.Bing({
name: "Hybrid",
key: apiKey,
type: "AerialWithLabels"
});
View collectd2snmp.py
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/python -u
import snmp_passpersist as snmp
from collectd_unixsock import *
 
def update():
c = Collectd()
list = c.listval()
for val in list:
stamp, identifier = val.split()
values = c.getval(identifier)
Something went wrong with that request. Please try again.