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 / 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: /
zealot128 /
Last active Jun 4, 2018
Rails 5.2. be_success -> be_successful

Rails 5.2. be_success -> be_successful

using ag or fgrep

sed -i 's/be_success$/be_successful/g' `ag be_success$ spec -l`

image_tag resolver

zealot128 /
Created Jun 2, 2018
Strava personal heatmap
zealot128 /
Created Apr 3, 2018
Fix out of space problem after unattended upgrades clogged up boot with linux kernel images
sudo apt-get autoremove;sudo apt-get autoclean;sudo apt-get clean
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
sudo apt-get update && sudo apt-get upgrade
# source:
zealot128 /
Created Oct 8, 2017
ffmpeg cut of from start and back - ruby convert script

Cut of from start/back of file

Useful for postprocessing various youtube videos with jingles/ad "follow us" stuff at the end.

ffmpeg has an easy way to cut off from beginning, but not to say "cut of 20s from the end". So one has to use to do arithmetics with duration. Here, using ruby script.


zealot128 /
Created Jul 14, 2017
Change LDAP/Samba account information from command line
# Use ldapmodify and copy carefully
# 1. Unblock user - set expiration to never:
$ ldapmodify -H 'ldaps://' -D 'cn=Administrator,cn=Users,dc=pdc,dc=pludoni,dc=com' -x -W
Enter LDAP Password:
dn: CN=Firstname Lastname,CN=Users,DC=pdc,DC=pludoni,DC=com
changetype: modify
replace: accountExpires
accountExpires: 9223372036854775807
zealot128 / filter.js
Created May 9, 2017
Vue2 filter thousand seperator / rounded (german comma)
View filter.js
Vue.filter('formatNumber', function (value) {
const rounded = Math.round(value * 100) / 100
return rounded.toString().replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ".");
You can’t perform that action at this time.