Skip to content

Instantly share code, notes, and snippets.

Stefan Wienert zealot128

Block or report user

Report or block zealot128

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
zealot128 /
Last active May 1, 2019
Bootstrap 3 -> 4 simplistic migration script (Rails based paths and file types)
  1. Run against code base to make the most labor intensive work
  2. Totally redo navigation from scratch
  3. maybe add -xs stuff, like col-xs- or btn-xs, thats missing from BS4
zealot128 /
Last active Apr 9, 2019
Gitlab Autoscaling Infrastructure on Hcloud with internal caching

Order and provision a Hetzner Cloud based Gitlab-Runner Docker-machine autoscaling infrastructure

See my blog for more information.

  • Adjust settings in
  • Run with terraform init && terraform apply


zealot128 /
Last active Apr 2, 2019
Gitlab runner with docker by cloud init on Hetzner Cloud

Quick Terraform script to deploy Gitlab runner with docker onto Hetzner Cloud (Hcloud)

  1. Create other terraform stuff
  • tf-backend,
  • with hcloud_token
  • ssh key: mkdir keys; ssh-keygen -f id_rsa
  1. modify cloudinit.yml:
  • change gitlab url
  • ADD_YOUR_REGISTRY_TOKEN -> Set to the Gitlab Runner Registration Token
  • Add more allowed images/services, if using gitlab registry, like that:*, change base image etc.
zealot128 /
Created Dec 20, 2018
pngquant - optimize all png inplace in a folder
find -type f -name '*.png' | xargs -I@ pngquant -f -o '@' '@'
zealot128 /
Last active Oct 17, 2018
ActiveStorage migration guide and caveats from Carrierwave (similar starting point for Paperclip)

Migrate Carrierwave to ActiveStorage

Migrate, e.g. organisation.logo (Carrierwave "LogoUploader") to organisation.logo2 (ActiveStorage)

require 'migrate_attachment'
  klass: Organisation, 
  attachment_attribute: :logo, 
  carrierwave_uploader: LogoUploader, 
View DirectUpload.vue
<template lang='pug'>
div.drop-zone(:class='{dragging: isDragging }'
div(:class='{ hidden: uploadInProgress }' @click='openFileBrowser')
i {{label}}
input(type='file' :multiple='multiple' ref='input' style='display: none')
zealot128 / vornamen.rb
Last active Sep 24, 2018
Vornamen finder - Populaere Vornamen (Berliner OpenData) greppen nach Namensbestandteilen, z.B. `ruby vornamen.rb m scha` alle Namen mit scha im Namen.
View vornamen.rb
require 'csv'
unless ARGV.count == 2
puts "USAGE: #{__FILE__} [GENDER: m|f] SEARCH"
gender = ARGV[0]
require 'open-uri'
all = []
View ActiveStorageUpload.vue
<template lang='pug'>
div.drop-zone(:class='{dragging: isDragging }'
div(:class='{ hidden: uploadInProgress }')
zealot128 /
Last active Jun 21, 2018
Ruby: check for domain name certificate expirations (supports starttls smtp and tls/https)


check for domain tls certificate expirations.

Pass any number of domain:port pairs to the program, it will try to fetch all and present a little table with the soonest to expire on top.

On port 25 it will use Starttls for validation, otherwise SNI TLS.

ruby check.rb
zealot128 / vimrc.vim
Last active Jun 19, 2018
VIM replace ruby 1.9 Hash literals to 2+
View vimrc.vim
command! ReplaceRuby19Hash :%s/:\([a-z_]\+\) *=> */\1: /
You can’t perform that action at this time.