Skip to content

Instantly share code, notes, and snippets.

View bzed's full-sized avatar
🇺🇦
❤️ 🇩🇪 🇦🇹

Bernd Zeimetz bzed

🇺🇦
❤️ 🇩🇪 🇦🇹
View GitHub Profile
@bzed
bzed / build_cura_and_slic3r.sh
Last active October 23, 2017 08:21
Simple script to build cura and slic3r-prusa in Debian. You need to fix the target directory.
replaced by
https://github.com/bzed/3d-printer-tools-build
Cmnd_Alias PBUILDER = /usr/sbin/pbuilder,/usr/sbin/cowbuilder,/usr/bin/linux32 /usr/sbin/cowbuilder
Defaults!PBUILDER env_keep+=HOME
Defaults!PBUILDER env_keep+=ARCH
Defaults!PBUILDER env_keep+=DIST
Defaults!PBUILDER env_keep+=CUSTOM
Defaults!PBUILDER env_keep+=HOOKDIR
$user ALL=(ALL) NOPASSWD: SETENV: PBUILDER
#!/bin/bash
# Idea stolen at https://wiki.ubuntu.com/PbuilderHowto
# Enhanced to support experimental, backports and oldstable.
# Does not build with non-free by default anymore.
# DIST NONFREE ARCH CUSTOM should be added to env_keep in your sudoers config.
OLDOLDSTABLE="squeeze"
OLDSTABLE="wheezy"
OLDSTABLE_ARCHIVED="false"
[Unit]
Description=HAProxy CPU usage agent
[Socket]
ListenStream=7777
ReusePort=true
Accept=true
[Install]
WantedBy=sockets.target
[Unit]
Description=MySQL Clustercheck for HAProxy
[Service]
StandardInput=socket
ExecStart=/usr/bin/hagent
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"math"
"net"
"strconv"
@bzed
bzed / ssl_certificate_handling.make
Last active November 6, 2018 16:13
Makefile to handle ssl certs/intermediate files/DHs
#!/usr/bin/make -f
CRTS := $(wildcard *.crt)
PEMS := $(shell echo $(CRTS) | sed 's,\.crt,.pem,g')
OCSPS := $(shell echo $(CRTS) | sed 's,\.crt,.ocsp,g')
DHS := $(shell echo $(CRTS) | sed 's,\.crt,.dh,g')
all: $(PEMS) $(OCSPS) $(DHS)
chmod 600 *.key
BEGIN;
create schema if not exists random;
create temp table word_copy(word TEXT);
COPY word_copy from '/usr/share/dict/ngerman' ENCODING 'UTF8';
create table random.words(id BIGSERIAL PRIMARY KEY, word TEXT);
insert into random.words(word) SELECT word from word_copy;
create schema if not exists random;
create temp table word_copy(word TEXT);
COPY word_copy from '/usr/share/dict/ngerman' ENCODING 'UTF8';
create table random.words(id BIGSERIAL PRIMARY KEY, word TEXT);
insert into random.words(word) SELECT word from word_copy;
create or replace function random.random_ids(

Keybase proof

I hereby claim:

  • I am bzed on github.
  • I am bzed (https://keybase.io/bzed) on keybase.
  • I have a public key whose fingerprint is ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F

To claim this, I am signing this object: