Skip to content

Instantly share code, notes, and snippets.

@mfrister
mfrister / jenkins gitlab plugin.log
Created April 4, 2017 09:11
Jenkins Gitlab Plugin Log - Two pushes within seconds
Apr 03, 2017 4:02:43 PM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
WebHook called with url: /project/docker_api_foo-features
Apr 03, 2017 4:02:43 PM FINE com.dabsquared.gitlabjenkins.webhook.build.PushBuildAction
Push: {
"object_kind" : "push",
"event_name" : "push",
@mfrister
mfrister / remote-unlock.md
Created December 18, 2015 20:01
Remote unlock via SSH for encrypted root volume (Ubuntu 14.04.3)

Remote unlock via SSH for encrypted root volume

Ubuntu 14.04.3

Install dropbear SSH server with automated hooks for being included in an initramfs.

apt-get install dropbear

Remove default private/public key for login, clear dss key (would be regenererated otherwise), remove insecure 1024-bit RSA host key and generate a new 2048-bit RSA host key (we'll have to keep the DSA-key, dropbear won't start otherwise - make sure to use RSA when connecting):

@mfrister
mfrister / raml-api-console-for-development.md
Last active November 11, 2015 10:36
RAML API Console for Development

Installation

npm install -g http-server

API Console unfortunately is not available on NPM. See its README for installation instructions.

You might have to run grunt after installation. Grunt opens a web page, just close it.

Run:

@mfrister
mfrister / ruby-flamegraphs.md
Last active August 31, 2015 06:54
Ruby Flamegraphs

ruby-prof Flamegraphs

ruby-prof

require 'ruby-prof'
require 'ruby-prof-flamegraph'
result = RubyProf.profile do

 # code to profile
@mfrister
mfrister / concurrent_spawn.rb
Last active January 20, 2017 22:39
Concurrently spawn Ruby processes, collect their output and wait for them to exit
module ConcurrentSpawn
def self.run(commands, &block)
processes = spawn(commands)
collect_output(processes, &block)
end
def self.spawn(commands)
processes = commands.map do |cmd|
r, w = IO.pipe
@mfrister
mfrister / install
Last active October 5, 2020 18:25
Fix Ubuntu VMs not suspending in VMware Fusion
# Paste into a root shell on your Ubuntu VM
curl -L https://gist.githubusercontent.com/meeee/5e252e93ba4589e67cf3/raw/faa25d74545ca527d713df2b843da43af3cf92ea/network > /etc/init.d/network && \
chmod +x /etc/init.d/network && \
echo "Suspend fix installed."