Skip to content

Instantly share code, notes, and snippets.

View mika's full-sized avatar

Michael Prokop mika

View GitHub Profile
@mika
mika / keybase.md
Created May 12, 2014 13:10
Keybase verification

Keybase proof

I hereby claim:

  • I am mika on github.
  • I am mika (https://keybase.io/mika) on keybase.
  • I have a public key whose fingerprint is 33CC B136 401A FEC8 43A3 8763 96A8 7872 B7EA 3737

To claim this, I am signing this object:

#!/bin/bash
#
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
#
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master
@mika
mika / README.txt
Created July 31, 2014 07:35
Fun with shell code
Code broken in all Zsh versions and Bash versions older than 4.3:
% cat ./foo.sh
DISK_LIST=$(for i in $AVAILABLE_DISKS ; do
for file in /dev/disk/by-id/* ; do
case "$(realpath $file)" in
/dev/"$i") disk_info="${file#/dev/disk/by-id/}" ; break ;;
*) disk_info="${file}" ;;
esac
done
# You do need to talk to an NTP server or two (or three).
server time.metrologie.at iburst
server ts1.aco.net
server ptbtime1.ptb.de iburst
server ntp.siq.si
server ntp2.belwue.de
server time1.euro.apple.com
server ntp1-rz.rrze.uni-erlangen.de
server Time1.Stupi.SE
server ntp0.nl.uu.net
@mika
mika / README.txt
Created August 29, 2014 21:31
Packaging of docker-registry for Debian/wheezy
Packaging modules from PyPI
---------------------------
wget https://pypi.python.org/packages/source/r/rsa/rsa-3.1.4.tar.gz
py2dsc rsa-3.1.4.tar.gz
sudo cowbuilder --build --basepath /var/cache/pbuilder/base-wheezy-amd64.cow deb_dist/rsa_3.1.4-1.dsc
wget https://pypi.python.org/packages/source/b/blinker/blinker-1.3.tar.gz
py2dsc blinker-1.3.tar.gz
sudo cowbuilder --build --basepath /var/cache/pbuilder/base-wheezy-amd64.cow deb_dist/blinker_1.3-1.dsc
@mika
mika / notes.txt
Last active August 29, 2015 14:14
Notes from Lennart Poettering's "What's new in systemd, 2015 Edition" talk at FOSDEM15
https://fosdem.org/2015/schedule/event/whats_new_in_systemd,_2015_edition/
* kdbus integration
* powerful nspawn (qemu-like feature to test qcow2 images)
* systemctl is container aware
* better btrfs integration
* cgroup net class (with IDs) to allow or disallow incoming/outgoing network access
* console support in user space (font management, drm,...) via consoled (to e.g. have Unicode support + not being limited to 512 characters and to also support high resolutions [also with 80x25 then if you want])
* systemctl add/edit newly added, opens $EDITOR and is nice for sysadmins
* nssmyhostname: also resolves localhost now and you can automatically identify the routing gateway
@mika
mika / example output.txt
Last active August 29, 2015 14:14
puppetdb<->ansible
[int]
inta1-web01.in...
inta1-nfs01.in...
inta1-db02.in...
[prod]
proda1-api02.in...
proda1-scripts01.in...
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.common.*;
import hudson.security.ACL
import hudson.scm.SubversionSCM
def jenkins = Jenkins.instance
jenkins.allItems.each { job ->
def scm = job.scm;
@mika
mika / j-d-g-ubuntu.txt
Created April 9, 2015 09:10
j-d-g: build Debian *and* Ubuntu on plain Debian systems with jenkins-debian-glue
$ sudo apt-get -y install ubuntu-archive-keyring
$ grep '^PBUILDER' /etc/jenkins/debian_glue
PBUILDER_CONFIG=/etc/jenkins/pbuilderrc
$ cat /etc/jenkins/pbuilderrc
DEBIAN_SUITES=("wheezy" "jessie" "sid")
DEBIAN_MIRROR="cloudfront.debian.net"
UBUNTU_MIRROR="mirrors.kernel.org"