Skip to content

Instantly share code, notes, and snippets.

m-radzikowski /
Last active May 12, 2021
Minimal safe Bash script template - see the article with full description:
#!/usr/bin/env bash
set -Eeuo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
ayyybe / ccdl.command
Last active May 14, 2021
Adobe Offline Package Generator v0.1.2 (macOS only)
View ccdl.command
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at


Keep it simple, stupid. You ain't gonna need it.

ivanvermeyen /
Last active Apr 1, 2021
Multiple MySQL versions on MacOS with Homebrew

Update - 4 september 2020

Making multiple MySQL versions work with Homebrew was tricky to say the least. Fortunately there are 2 new easy ways that I learned of to achieve this.

DBngin app

As @4unkur and @henrytirla commented below, there is this extremely easy to use app called DBngin, which lets you setup multiple databases (not only MySQL) simultaneously using different ports:

CansecoDev /
Created Nov 22, 2018
VMaNGOS deploy script for Ubuntu 16.04
#description :VMaNGOS deploy script for Ubuntu 16.04
#date :20181122
#version :0.8.1
## Utilities
pecigonzalo /
Last active May 11, 2021 — forked from weavenet/
Delete all versions (except latest) of all files in s3 versioned bucket using AWS CLI and jq.
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions | .[] | select(.IsLatest | not)'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
pawelztef / _flash.html.erb
Last active Oct 5, 2020
rails flash messages with bootstrap 4
View _flash.html.erb
<div class="container">
<% flash.each do |type, msg| %>
<div class="alert <%= bootstrap_class_for_flash(type) %> alert-dismissable fade show">
<%= msg %>
<button class="close" data-dismiss="alert">x</button>
<% end %>
export IFS=$'\n'
# Find all boxes which have updates
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 2>/dev/null)
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then
chezou / Gemfile
Last active May 11, 2019
Example code of ruby with Amazon Polly
View Gemfile
source ''
gem 'nokogiri', '~>1.6'
gem 'aws-sdk', '~> 2'
MyklClason / Gemfile.rb
Last active Jun 5, 2019
Search/Sort/Paginate with Ransack and Kaminari
View Gemfile.rb
gem 'kaminari'
gem 'ransack'