Skip to content

Instantly share code, notes, and snippets.

@radut
radut / introrx.md
Created June 13, 2019 22:05 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for
@radut
radut / ffmpeg-web-video-guide.md
Created May 9, 2019 19:58 — forked from jaydenseric/ffmpeg-web-video-guide.md
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

@radut
radut / encoding-video.md
Created May 9, 2019 19:53 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@radut
radut / ansible_variable_precedence.md
Created April 22, 2019 16:32 — forked from ekreutz/ansible_variable_precedence.md
Ansible variable precedence (order, hierarchy)
@radut
radut / self-signed-certificate-with-custom-ca.md
Created March 23, 2019 09:58 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@radut
radut / rbd-map-rbd-svr03-pgsql.service
Created March 14, 2019 19:57 — forked from jcollie/rbd-map-rbd-svr03-pgsql.service
systemd services to map RADOS block devices and mount a filesystem
[Unit]
Description=Map RBD disk svr03-pgsql
Requires=network-online.target
After=network-online.target
ConditionPathExists=!/dev/rbd/rbd/svr03-pgsql
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rbd map --pool rbd svr03-pgsql
@radut
radut / SystemdNotify.java
Created March 11, 2019 23:20 — forked from juur/SystemdNotify.java
system sd_notify wrapper for Java
// Based on this answer https://stackoverflow.com/a/36945256/784804
/*
* Copyright (c) 2018 Ian Kirk
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@radut
radut / java-sd_notify.java
Created March 11, 2019 23:19 — forked from yrro/java-sd_notify.java
The poor Java programmer's alternative to calling sd_notify
package systemd;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Paths;
import java.util.function.Supplier;
@lombok.extern.slf4j.Slf4j
@radut
radut / jinja_variables_types.yml
Created March 10, 2019 16:48 — forked from spiette/jinja_variables_types.yml
Test the variables types in jinja2 templates, used here with ansible
---
- hosts: all
gather_facts: no
vars:
string: "string"
list:
- item1
- item2
dict:
key1: value1