Skip to content

Instantly share code, notes, and snippets.

View fadenb's full-sized avatar

Tristan Helmich fadenb

View GitHub Profile
@fadenb
fadenb / fnord.md
Last active August 29, 2015 14:02
Puppet future parser behavior change

Puppet 3.3.1

normal parser

root@precise64:~# puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian  => "upper case", debian => "lower case",} notify{"Result: ${case}":}'
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.07 seconds
Notice: Result: upper case
Notice: /Stage[main]//Notify[Result: upper case]/message: defined 'message' as 'Result: upper case'
Notice: Finished catalog run in 0.05 seconds
root@precise64:~# puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", debian  => "L case", Debian => "U case",} notify{"Result: ${case}":}'
@Dewep
Dewep / logstash-nginx-error.conf
Created November 21, 2015 14:47
LogStash Grok - Match Nginx error - With multiline errors
input {
stdin {
}
}
filter {
mutate {
replace => {
"type" => "nginx-error"
}
@kbarber
kbarber / gist:6456420
Created September 5, 2013 21:26
Renewing a Puppet CA cert
Renew Puppet CA cert.
Not the perfect idea, but should alleviate the need to resign every cert.
What you need from existing puppet ssl directory:
ca/ca_crt.pem
ca/ca_key.pem
Create an openssl.cnf:
[ca]
@Profpatsch
Profpatsch / build-go-pkg.sh
Created December 5, 2016 12:46
help with packaging go packages in nix
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p go go2nix
# little script to help with the stupid go packaging
# cd into the dir where you want to have the `default.nix`
# go package name (e.g. github.com/go/is-stupid)
PACKAGE="$1"
# git upstream link
GIT="$2"
@Caligatio
Caligatio / iptables.grok
Created August 6, 2016 10:45
iptables Grok Pattern
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for iptables events):
# GROK Patterns for iptables Logging Format
#
# Created 6 Aug 2016 by Brian Turek <brian.turek@gmail.com>
# Most of this was taken from another source but now I cannot find it for credit
#
# Usage: Use the IPTABLES pattern
NETFILTERMAC %{MAC:dest_mac}:%{MAC:src_mac}:%{ETHTYPE:ethtype}
ETHTYPE (?:(?:[A-Fa-f0-9]{2}):(?:[A-Fa-f0-9]{2}))
################################################################
################################################################
## ##
## This module now lives in a repository! ##
## https://github.com/dali99/nixos-matrix-modules ##
## ##
## It has a few fixes, and quite a few more features, ##
## like easy workers and automatic nginx config ##
## ##
################################################################
@dysinger
dysinger / nixos-encrypted-zfs.sh
Last active March 7, 2023 14:51
How I installed Encrypted ZFS root on NixOS
# MOVED HERE https://gist.github.com/dysinger/2a768db5b6e3b729ec898d7d4208add3
@joschi
joschi / graylog_token.txt
Last active September 28, 2023 04:27
Graylog access token login
# Create an access token for user "admin" with name "test-1234"
# POST /users/{username}/tokens/{name}
$ curl -i -u admin:admin -H 'Accept: application/json' -X POST 'http://127.0.0.1:12900/users/admin/tokens/test-1234?pretty=true'
HTTP/1.1 200 OK
X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd
Content-Type: application/json
Date: Mon, 08 Aug 2016 12:12:09 GMT
Content-Length: 139
{
@fadenb
fadenb / 2023-12-21_Apple_Public_Verification_Code.txt
Created December 21, 2023 12:36
My Apple Contact Key Verification Public Verification Code
APKTIDoLV060B_LpPwpXFQqH8HTJF7CcJHMGGIpfDWOPT1dYGU_g
@barentsen
barentsen / gist:bacd4360fb31e7456d659d07b014e834
Created June 21, 2016 09:01
How to get clickshare working on Ubuntu 16.04
sudo apt install libresample1
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb
sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb
sudo dpkg -i libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb
wget https://www.dropbox.com/s/gg2i5wszrqkhzy8/clickshare_01.07.01-79_amd64.deb?dl=0#
sudo dpkg -i clickshare_01.07.01-79_amd64.deb