Skip to content

Instantly share code, notes, and snippets.

excuse me, is this facebook

Piotr Dobrowolski Informatic

excuse me, is this facebook
Block or report user

Report or block Informatic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Informatic / tagify-cookbook
Created Aug 5, 2019
Quickly add git version tags for specified chef cookbook (could easily be adapted to any other piece of infrastructure, eg. npm package.json file, as long as one is able to extract unique version identifier on specified git ref)
View tagify-cookbook
#!/usr/bin/env bash
# Creates local version tags based on cookbook metadata.rb change history
# Usage: bash tagify-cookbook [cookbook_name]
git log --pretty=format:"%h" cookbooks/$cookbook/metadata.rb | while read ref; do
tag="$cookbook-$(git show $ref:cookbooks/$cookbook/metadata.rb | grep "^version '" | sed -E "s/.* '(.*)'/\1/g" )"
echo "ref: $ref -> $tag";
View ipmiview.nix
{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped, freetype, fontconfig, liberation_ttf }:
stdenv.mkDerivation rec {
name = "IPMIView-${version}";
version = "2.16.0";
buildVersion = "190528";
src = fetchurl {
url = "${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
sha256 = "0pz4q8vsnv6wqpiy6am333c2cgsdjmxc6w9vm4hi8qyaavfbq0w2";
View chromium-vaapi.nix
{ config, pkgs, lib, ... }:
unstableTarball =
nixpkgs.config = {
packageOverrides = pkgs: {
Informatic /
Last active Mar 24, 2019
Minimal janus-gateway REST API python client
# Reference:
import requests
import json
import pprint
import random
import string
Informatic / network.nix
Created Jan 20, 2019
NixOS OVH IP Failover virtual machine configuration
View network.nix
# [...]
# Assuming failover IP being and host primary IP being
networking.interfaces.ens3.ipv4.addresses = [ {
address = "";
prefixLength = 32;
} ];
networking.interfaces.ens3.ipv4.routes = [ {
address = "";
Informatic / domain.xml
Last active Oct 10, 2019
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
View domain.xml
<domain type='kvm' xmlns:qemu=''>
<!-- ... -->
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
Informatic /
Created Jul 22, 2018
stunnel transparent proxy (server) on localhost. use transparent=source; connect= in stunnel configuration (mostly borrowed from sslh documentation)
set -e
# Set route_localnet = 1 on all interfaces so that ssl can use "localhost" as
# destination
sysctl -w net.ipv4.conf.default.route_localnet=1
sysctl -w net.ipv4.conf.all.route_localnet=1
# DROP martian packets as they would have been if route_localnet was zero
Informatic / JanusStream.vue
Last active Jun 20, 2018
Quick and dirty Janus WebRTC Gateway Streaming plugin component for Vue.js based on
View JanusStream.vue
<video controls></video>
/* Note: you may need to add `externals: { ws: "WebSocket"},` to Your webpack configuration for this to work properly */
import { Janus, StreamingJanusPlugin } from '@techteamer/janus-api'
export default {
props: ['config', 'stream'],
Informatic /
Created Feb 24, 2018
Raspberry Pi xscreensaver DPMS fix

This script will watch for xscreensaver blanking event and disable actual HDMI output accordingly.

Informatic / bundle-conf
Created Oct 29, 2017
Simple OpenVPN+EasyRSA configuration bundler
View bundle-conf
#!/usr/bin/env bash
set -e
panic() { echo $* >&2; exit 1; }
[ -z "$CLIENT" ] && panic "usage: ./bundle-conf [CLIENT]"
You can’t perform that action at this time.