Skip to content

Instantly share code, notes, and snippets.

View mika's full-sized avatar

Michael Prokop mika

View GitHub Profile
@mika
mika / jenkins.log
Created February 12, 2012 20:02
jenkins plugin reload failure on nfs
hudson.util.IOException2: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1137)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:955)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: Unable to delete /var/lib/jenkins/plugins/xunit/WEB-INF/lib/.nfs00000000000e80ba0000000b
@mika
mika / mcollective_debian.rst
Last active December 14, 2015 01:09
Deploying MCollective on Debian - problems in the official docs
@mika
mika / jenkins-job-builders.org
Created March 25, 2013 13:34
Jenkins Job creators + editors
#!/usr/bin/env python
from __future__ import print_function
import sys
import argparse
def brute_search(dev, search_string, max_lines, bufsize):
oldbuf = b''
found = False
data = None
@mika
mika / rubygem_mirror.sh
Last active December 18, 2018 05:42
generate a (partial) rubygems mirror
## Purpose: create a partial Rubygems mirror on Debian (7 AKA wheezy)
## Design goal: no system wide gems other than Debian packages
# make sure bundler, ruby-builder (required for generate_index) + rubygems-integration (required for gem<->builder integration) are available:
% sudo apt-get install ruby-bundler ruby-builder rubygems-integration
# We use gem-mirror (http://rubygems.org/gems/gem-mirror / https://github.com/YorickPeterse/gem-mirror), so
# install gem-mirror gem itself (requires ruby >=1.9) in local directory for execution via bundler:
% cat Gemfile
source 'https://rubygems.org/'
@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