Skip to content

Instantly share code, notes, and snippets.

Jonne Haß jhass

Block or report user

Report or block jhass

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
jhass / .gitignore
Last active Sep 24, 2015
powerdns remote backend for
View .gitignore
jhass / git-merge-diaspora-stable
Last active Oct 28, 2018
Little helper to merge pull requests to the stable for diaspora/diaspora. Requires github/hub. Handy alias: git config alias.mds merge-diaspora-stable
View git-merge-diaspora-stable
set -e
if [ -z "$1" ]; then
echo "No PR given"
exit 1
parts=(${1//\// })
jhass /
Last active Nov 12, 2015
Platform indepedent standard library for Crystal
lib LibC
# Common bindings go here
fun chdir(...)
fun printf(...)
fun wprintf(...)
fun atoi(...)
fun watoic(...)
ifdef windows
jhass /
Last active Dec 31, 2019
My Ruby setup on Archlinux

Ruby on Archlinux

I thought I would document my setup, since it's somewhat non-standard but working quite well for me.

What this does

  • Install major Ruby versions at their latest patch release
  • Allow to switch between them seamlessly
  • Use chruby
  • Encourage bundler usage
jhass / .rubocop.yml
Last active Feb 16, 2020
My preferred Rubocop config
View .rubocop.yml
RunRailsCops: true
# Commonly used screens these days easily fit more than 80 characters.
Max: 120
# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
jhass / vmm-change-password[slash]index.php
Last active Aug 29, 2015
Afterlogic WebMail VMM password change plugin
View vmm-change-password[slash]index.php
* Afterlogic WebMail VMM password change plugin
* Based upon
* VMM:
* WebMail lite:
* The plugin calls doveadm pw.
* You should create a dedicated role and add it to the mailsys role.

Keybase proof

I hereby claim:

  • I am jhass on github.
  • I am jhass ( on keybase.
  • I have a public key whose fingerprint is 2BA4 8007 D6F8 3856 3165 B0D7 F347 E0EB 47AC 70D6

To claim this, I am signing this object:

jhass / mod_auth_diaspora.lua
Last active Mar 15, 2018
Prosody authentication for Diaspora. Tested with Prosody 0.9.4. See
View mod_auth_diaspora.lua
-- Based on Simple SQL Authentication module for Prosody IM
-- Copyright (C) 2011 Tomasz Sterna <>
-- Copyright (C) 2011 Waqas Hussain <>
-- 25/05/2014: Modified for Diaspora by Anahuac de Paula Gil -
-- 06/08/2014: Cleaned up and fixed SASL auth by Jonne Haß <>
-- 22/11/2014: Allow token authentication by Jonne Haß <>
local log = require "util.logger".init("auth_diaspora")
local new_sasl = require "util.sasl".new
View populations.json
"Antigua and Barbuda" : 90604,
"United Kingdom" : 63375707,
"China" : 1391193266,
"St. Lucia" : 183292,
"Netherlands" : 16790052,
"Tuvalu" : 9888,
"Iraq" : 34419098,
"Cambodia" : 15312752,
"Canada" : 35417147,
jhass / diaspora_spam.rb
Last active Mar 27, 2019
Deletes spam comments, posts and local spam accounts. Place into Diasporas root, edit and run. Don't forget to set necessary environment variables.
View diaspora_spam.rb
#!/usr/bin/env ruby
# List of spam accounts
spam_accounts = %w(spamacc@podA spamacc@podB spamacc@mypod)
# Delete comments even if spammer isn't a local user or spam isn't on a
# local users account.
# And delete posts of users in spam_accounts that aren't local.
always_delete = true
You can’t perform that action at this time.