Skip to content

Instantly share code, notes, and snippets.

@kog
kog / docker-compose.yml
Created November 27, 2018 07:12
docker-compose.yml for Influx/Grafana
version: '3.5'
services:
influxdb:
image: influxdb
ports:
- "8086:8086"
- "2003:2003"
- "8083:8083"
environment:
- INFLUXDB_GRAPHITE_ENABLED=true
@kog
kog / schema.sql
Created October 5, 2018 18:40
interview: book/author
drop table if exists book;
drop table if exists author;
drop table if exists book_author;
CREATE TABLE book (
id bigint NOT NULL,
name character varying(255) NOT NULL,
description character varying(255) NOT NULL
);
@kog
kog / run.sh
Created September 21, 2018 05:07
#!/bin/bash
docker run --name charybdis4 -d -p 6667:6667 -it kogatwork/charybdis4
@kog
kog / request.log
Created March 25, 2018 08:16
Sample request log
123.4.5.6 - asdf [01/Mar/2018:10:16:17 +0000] "GET /jetty/tut/XmlConfiguration.html HTTP/1.1" 200 76793 "http://localhost:8080/jetty/tut/logging.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8" 342
123.4.5.6 - asdf [01/Mar/2018:10:16:18 +0000] "GET /jetty/tut/XmlConfiguration.html HTTP/1.1" 200 76793 "http://localhost:8080/jetty/tut/logging.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8" 342
123.4.5.6 - asdf [01/Mar/2018:10:16:19 +0000] "GET /jetty/tut/XmlConfiguration.html HTTP/1.1" 200 76793 "http://localhost:8080/jetty/tut/logging.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8" 342
123.4.5.6 - asdf [01/Mar/2018:10:16:20 +0000] "GET /jetty/tut/XmlConfiguration.html HTTP/1.1" 200 76793 "http://localhost:8080/jetty/tut/logging.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8" 342
@kog
kog / Vagrantfile
Created February 26, 2016 00:27
Vagrant box: ElasticSearch 2.0 (plugins: HQ, head), Kibana 4.4.0 (plugins: marvel w/ demo license, sense), Topbeat + Packetbeat + Dashboards
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network :forwarded_port, guest: 9200, host: 9200
config.vm.network :forwarded_port, guest: 5601, host: 5601
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 4096
v.cpus = 2
end
@kog
kog / Vagrantfile
Created November 7, 2015 00:19
Vagrant box: CentOS7 2 CPU/4GB RAM: ElasticSearch 2.0 with head/HQ/Marvel, Kibana 4.2.0 with Marvel/Sense
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network :forwarded_port, guest: 9200, host: 9200
config.vm.network :forwarded_port, guest: 5601, host: 5601
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 4096
v.cpus = 2
end
@kog
kog / go.bat
Last active August 29, 2015 14:18
Builds enough of Roslyn and packages in 7zip format
set "startPath=%CD%"
rmdir /q /s Binaries\Debug
del c:\tmp\Microsoft.*
del c:\tmp\System.*
del c:\tmp\assemblies.7z
@kog
kog / app.config
Created November 4, 2013 04:45
Webhook configuration using secure transport layer
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
@kog
kog / logstash.conf
Last active December 18, 2015 17:58
Logstash Config for SpikeLite logs. When configured to do so, the bot will log all raw IRC traffic at the TRACE level, which means you can hook up something like the UDP appender. In this case the UDP appender is appending to LogStash, which is listening on port 4444 and parses the logs accordingly.
input
{
# We're primarily fed by Log4NET over UDP.
udp
{
port => 44444
type => "log4netudp"
format => "plain"
}
}