Skip to content

Instantly share code, notes, and snippets.

@lathspell
lathspell / HOWTO.git-sync-with-upstream.adoc
Last active January 5, 2020 17:11
Howto keep Git repo with pull requests in sync with upstream

Rebasing

Init Upstream

# Add secondary remote "upstream" for original repository
git remote add upstream https://github.com/exercism/kotlin

Following Upstream

@lathspell
lathspell / __etc__logstash__conf.d__local.conf
Created November 9, 2014 03:04
Logstash configuration (playing around)
#
# Resources:
# - Logstash manual at http://logstash.net/
# - Grok Pattern Debugger at http://grokdebug.herokuapp.com/
# - Other patterns at /opt/logstash/pattern/
#
input {
syslog {
@lathspell
lathspell / __etc__logstash__patterns__dpkg.conf
Last active December 3, 2020 16:05
Logstash grok pattern file for /var/log/dpkg.log
DPKG_TIMESTAMP %{TIMESTAMP_ISO8601:timestamp}
DPKG_PACKAGE [-+~\.0-9a-zA-Z]+
DPKG_ARCH [a-z0-9]+
DPKG_PKGARCH %{DPKG_PACKAGE:package}(:%{DPKG_ARCH:arch})?
DPKG_VERSION [-+~<>\.0-9a-zA-Z]+
DPKG_ACTION0 (startup archives|startup packages|conffile)
DPKG_ACTION1 (configure|remove|upgrade|purge|status (config-files|installed|not-installed|triggers-awaited|triggers-pending|unpacked|half-installed|half-configured))
DPKG_ACTION2 (trigproc|upgrade)
DPKG_0_VERSIONS %{DPKG_ACTION0:action}
DPKG_1_VERSIONS (%{DPKG_ACTION1:action} %{DPKG_PKGARCH} %{DPKG_VERSION:version})$
@lathspell
lathspell / call.pl
Last active August 29, 2015 14:08 — forked from maximevalette/call.pl
#!/usr/bin/env perl
#
# Forked from https://gist.github.com/tupinek/6605090
#
use strict;
use warnings;
use Getopt::Long qw(:config posix_default bundling);
use Net::SIP;
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select