Skip to content

Instantly share code, notes, and snippets.

@jerrac
jerrac / gitlab2elk.yml
Created March 23, 2015 22:19
Logstash and Logstash-Forwarder config for GitLab logs
# YAML config for these Ansible roles:
# https://github.com/LaneCommunityCollege/aspects_logstash
# https://github.com/LaneCommunityCollege/aspects_logstash_forwarder
#
# Since it's just straight config blocks, you should be able to just copy and paste what you need if you don't use
# those Ansible roles.
#
# End result is multiline logs combined into one, and dates are parsed correctly.
aspects_logstash_rules:
@jerrac
jerrac / subdict.py
Created May 6, 2014 22:56
ansible plugin to loop through sub dictionaries the way subelements loops through sub lists.
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
@jerrac
jerrac / gist:6382702
Created August 29, 2013 19:58
Apache vhost that proxies elasticsearch for Kibana. Make sure Kibana's config.js points to your vhost on port 443. Need proxy and proxy_http apache modules enabled.
<VirtualHost *:80>
ServerAdmin admin@example.org
ServerName elasticsearch.domain.tld
ServerAlias kibana.domain.tld
DocumentRoot /path/to/kibana/docroot
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /path/to/kibana/docroot>
@jerrac
jerrac / roughtdraftpuppetuserwrapper.pp
Created May 8, 2013 21:42
Rough draft of userwrapper puppet module
sshpubkeys/username.json
{
"type": "id_rsa",
"key": "really long key",
"name": "blah@blah"
}
sshpubkeys/reagand.json
{
"type": "id_rsa",
"key": "really long key",
@jerrac
jerrac / jquerytablefilter.html
Created November 7, 2012 00:35
Quick filtering of a table with jQuery
<html>
<head>
<title>jquery filter test</title>
</head>
<body>
<label>Filter: </label> <input id="inputfilter" type="text"></input>
<table id="filterme">
<thead>
<tr>
<th>