Skip to content

Instantly share code, notes, and snippets.

@jloleysens
jloleysens / console-put-nginx-pipieline.txt
Created July 17, 2020 08:41
Kibana Console PUT NGINX pipeline
PUT _ingest/pipeline/nginx
{
"description": "Pipeline for parsing Nginx ingress controller access logs. Requires the geoip and user_agent plugins.",
"processors": [
{
"grok": {
"description": "test",
"field": "message",
"patterns": [
"(%{NGINX_HOST} )?\"?(?:%{NGINX_ADDRESS_LIST:nginx.ingress_controller.remote_ip_list}|%{NOTSPACE:source.address}) - (-|%{DATA:user.name}) \\[%{HTTPDATE:nginx.ingress_controller.time}\\] \"%{DATA:nginx.ingress_controller.info}\" %{NUMBER:http.response.status_code:long} %{NUMBER:http.response.body.bytes:long} \"(-|%{DATA:http.request.referrer})\" \"(-|%{DATA:user_agent.original})\" %{NUMBER:nginx.ingress_controller.http.request.length:long} %{NUMBER:nginx.ingress_controller.http.request.time:double} \\[%{DATA:nginx.ingress_controller.upstream.name}\\] \\[%{DATA:nginx.ingress_controller.upstream.alternative_name}\\] (%{UPSTREAM_ADDRESS}|-) (%{NUMBER:nginx.ingress_controller.upstream.response.length:long}|-) (%{NUMBER:nginx.ingress_controll
@benley
benley / linkerd.conf.yml
Last active November 8, 2016 10:27
example: linkerd config for aurora job backends
# Example linkerd.conf for aurora jobs
admin: { port: '31218' }
namers:
- kind: io.l5d.serversets
prefix: /zk/dal09
zkAddrs:
- { host: zk1.dal09.prod.example.com, port: '2181'}
- { host: zk2.dal09.prod.example.com, port: '2181'}
@mhitza
mhitza / Makefile
Last active April 6, 2024 17:20
Programming Arduino Uno (ATmega386P) in assembly
%.hex: %.asm
avra -fI $<
rm *.eep.hex *.obj *.cof
all: $(patsubst %.asm,%.hex,$(wildcard *.asm))
upload: ${program}.hex
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$<
monitor:
@zircote
zircote / AuroraStuff.md
Last active August 22, 2016 17:11
My early gotchas with Apache Aurora

The mustache gotcha

When using “bound” objects in an .aurora file it is an absolute that you do not have spaces in the “mustaches”.

Examples:

  • Bad: {{ profile.my_var }}
  • Good: {{profile.my_var}}

Docker Container Snafus

When running a docker container, you must ensure that all of the dependent library for the thermos_executor.pex are present in the docker container itself. The thermos_executor runs in the container not the mesos slaves environment.

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@puppe
puppe / absender.lco
Last active July 30, 2023 20:14
Deutsche Briefvorlage für LaTeX (scrlttr2) (ACHTUNG: Aktualisierte Version jetzt unter https://codeberg.org/puppe/german-latex-letter-template/)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
@stain
stain / TestFOAFPROV.java
Created November 20, 2012 15:46
OWLAPI loading and saving OWL individiuals using FOAF and PROV
package com.example.owlapitest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Set;