Skip to content

Instantly share code, notes, and snippets.


Stefan Botzenhart basiszwo

View GitHub Profile
basiszwo /
Last active Jun 14, 2021
Dump Redis rdb file from Google Cloud MemoryStore

Dumping a redis rdb file from a Google Cloud MemoryStore is easier than expected using redis-cli


redis-cli -h <IP of MemoryStore Instance> --rdb dump.rdb
basiszwo / active_record_query_locator.rb
Created Apr 23, 2018
Find active record query location
View active_record_query_locator.rb
module ActiveRecord
class QueryLocator
def call(name, started, finished, unique_id, payload)
# filter caller locations to application backtrace (filter all gem calls)
# see for more options
caller_names = { |line| line.to_s =~ /#{Rails.root.to_s}/ }
# use the last caller in backtrace
caller_name = caller_names.first
Rails.logger.debug ["Notification:", name, started, finished, unique_id, caller_name, payload].join(" - ")
basiszwo /
Last active Jan 23, 2018
Load local json and feed to accumulo instance
package one.flak.flinkgeomesa;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
basiszwo / fizzbuzz.rb
Created Aug 8, 2017
FizzBuzz Implementation
View fizzbuzz.rb
fizz = ["", "", "Fizz"].lazy.cycle
buzz = ["", "", "", "", "Buzz"].lazy.cycle
pattern =
p pattern.take(15).to_a.join(", ")
numbers = (1..Float::INFINITY)
fizzbuzz =
basiszwo /
Last active Jan 2, 2016
Create Installation Image from OS X AppStore Update

How to create an OSX installation image (USB stick)

  • download upgrade from appstore
  • prepare an USB stick with ~ 5GB space; format journaled with GUID partition table
  • use the following command
sudo /Applications/Install\ OS\ X\ --volume /Volumes/Stick --applicationpath /Applications/Install\ OS\ X\ --nointeraction