Skip to content

Instantly share code, notes, and snippets.


Aleksandr Sytar CrazyLionHeart

  • Sberbank
  • Moscow
View GitHub Profile
GAS85 /
Last active March 24, 2023 19:05
Harden Nextcloud 17+ with Fail2Ban, GUI and WebDAV - Ubuntu 20.04

Fail2ban and Nextcloud


  • Ubuntu 20.04
  • nextcloud, fail2ban and e.g. iptables are installed


nuna-alan /
Created September 25, 2017 19:34
Bash script to remove VMWare Airwatch Agent for macOS
[[ $EUID == 0 ]] || { echo "Must be run as root."; exit; }
touch $LOG
chmod a+rw $LOG
george-hawkins /
Last active March 14, 2023 23:49
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU

QEMU arm64 cloud server emulation

This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.

Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from

Download the UEFI firmware image QEMU_EFI.fd from

Determine your current username and get your current ssh public key:

rafaeltuelho /
Last active March 15, 2023 07:16
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
oc create clusterquota user-qa \
niun / root-ro
Last active February 6, 2023 13:55
Read-only Root-FS with overlayfs for Raspian
View root-ro
# Read-only Root-FS for Raspian
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
# Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10.
# This version can be found here:
leftclickben / gist:322b7a3042cbe97ed2af
Last active March 22, 2023 02:20
Steps to migrate from SVN to GitLab
View gist:322b7a3042cbe97ed2af

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.


  • SVN is hosted at
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at and:
massar / server-git.conf
Created March 6, 2014 21:14
Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
View server-git.conf
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# -
server {
listen [2001:db8::1]:80;
# Redirect all non-HTTPS traffic to the HTTPS variant
return 301 https://$host$request_uri;
garrettreid /
Created January 9, 2014 05:26
Create a salted SHA512 password hash for use with Dovecot
import os
import hashlib
import getpass
import base64
password1 = None
password2 = None
nitely /
Created September 15, 2013 04:30
Python 3 Token bucket
#! /usr/bin/python3
from time import time
from threading import Lock
class TokenBucket:
An implementation of the token bucket algorithm.
View Performance of Flask, Tornado, GEvent, and their

Performance of Flask, Tornado, GEvent, and their combinations

Wensheng Wang, 10/1/11


When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:

1, Pure Flask (