Skip to content

Instantly share code, notes, and snippets.

View VerosK's full-sized avatar
🚌
On the road.

Věroš Kaplan VerosK

🚌
On the road.
View GitHub Profile
@VerosK
VerosK / pdns-pipebackend.py
Created March 29, 2022 05:29 — forked from sokratisg/pdns-pipebackend.py
PowerDNS PipeBackend python example
#!/usr/bin/python -u
import sys, os, time
import random
class DNSLookup(object):
"""Handle PowerDNS pipe-backend domain name lookups."""
ttl = 30
@VerosK
VerosK / data.yml
Last active October 18, 2020 19:30 — forked from oskar456/data.yaml
Ansible bug with datetime in data
---
data_1:
- id: 1
key: hello
- id: 2
key: world
data_2:
- id: 1
groups:
- name: datetime
rules:
- record: daily_saving_time_belgium
expr: |
(vector(0) and (month() < 3 or month() > 10))
or
(vector(1) and (month() > 3 and month() < 10))
or
(
@VerosK
VerosK / haproxy-json-log-format.txt
Created January 14, 2019 10:38 — forked from fluential/haproxy-json-log-format.txt
haproxy-json-log-format
log-format: '{"timestamp":%Ts,"frontend_name":"%f","remote_addr":"%ci","bytes_read":%B,"upstream_addr":"%si","backend_name":"%b","retries":%rc,"bytes_uploaded":%U,"upstream_connect_time":"%Tc","session_duration":"%Tt","termination_state":"%ts","srv_queue":%sq,"backend_queue":"%bq","frontend_concurrent_conns":%fc,"backend_concurrent_conns":%bc}'
@VerosK
VerosK / solr-filter.conf
Created November 30, 2018 12:07 — forked from sebnmuller/solr-filter.conf
Logstash config for ingesting Solr logs
input {
file {
path => "/Users/sebastienmuller/comperio/projects/sintef/tmp/logs/indexing_logs_2/solr.log.3"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
# Extract event severity and timestamp
@VerosK
VerosK / riot-matrix-workshop.md
Created November 2, 2018 09:06 — forked from attacus/riot-matrix-workshop.md
Create your own encrypted chat server with Riot and Matrix

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

The goal of this workshop is to teach you how to configure and run your own Matrix/Riot service. By the end of the workshop, you should be able to log into secure chat rooms and invite others to the same server.

@VerosK
VerosK / humanbytes.py
Created August 23, 2017 20:21 — forked from danlmyers/humanbytes.py
python humanize bytes
#Humanize byte size figures
def humanize_bytes(bytesize, precision=2):
abbrevs = (
(1<<50, 'PB'),
(1<<40, 'TB'),
(1<<30, 'GB'),
(1<<20, 'MB'),
(1<<10, 'kB'),
(1, 'bytes')
)
@VerosK
VerosK / centos_bstick.sh
Created August 22, 2017 12:06 — forked from vkanevska/centos_bstick.sh
Custom CentOS 7 bootable ISO / Support UEFI & Secure boot
#!/bin/bash
# create custom bootable iso for CentOS 7 with kickstart
if [ $# -lt 2 ]
then
echo "Usage1: $0 path2iso path2kickstart"
exit 1
else
if [ ! -f $1 ]
then
kubectl get pod -o jsonpath='{.items[?(@.status.phase!="Running")].metadata.name}'
@VerosK
VerosK / letsencrypt_notes.sh
Created November 5, 2016 14:28 — forked from lachesis/letsencrypt_notes.sh
Set up LetsEncrypt using acme.sh without root
# How to use "acme.sh" to set up Lets Encrypt without root permissions
# See https://github.com/Neilpang/acme.sh for more
# This assumes that your website has a webroot at "/var/www/<domain>"
# I'll use the domain "EXAMPLE.com" as an example
# When this is done, there will be an "acme" user that handles issuing,
# updating, and installing certificates. This account will have the following
# (fairly minimal) permissions:
# - Host files at http://EXAMPLE.com/.well-known/acme-challenge