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 / .ssh_authorized_keys
Last active May 17, 2019
Git shell only for specific SSH key
View .ssh_authorized_keys
command="/home/USER/.ssh/git-shell",no-port-forwarding,no-X11-forwarding,no-pty ssh-rsa YOUR_KEY foo
jhass / hockeyapp_updater.rb
Last active Jun 9, 2017
Update all connected devices and running emulators with the latest version of your app(s) from HockeyApp (install Ruby & bundler first)
View hockeyapp_updater.rb
require "bundler/inline"
gemfile(ARGV.any? {|arg| arg == "--install"}) do
source ""
gem "http", "~> 2.2"
gem "ADB", "~> 0.5.6"
gem "slop", "~> 4.5"
jhass /
Last active Mar 30, 2017
Crystal injecting/replacing IO PoC
struct Slice(T)
def []?(start, count)
if start + count >= size
count = -1
if count < 0
count = size - start + (count + 1)
jhass / barcode.html
Last active Feb 12, 2019
Simple Barcode generator
View barcode.html
<!DOCTYPE html>
<title>Barcode generator</title>
<script src=""></script>
<script src="" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script type="text/javascript">
window.eanHistory = [];
function loadHistory() {
jhass /
Last active Aug 21, 2019 — forked from chitsaou/
Proxy to remote server with CORS support
View for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.


Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.


jhass /
Created Jul 22, 2016
Simple debug HTTP server in Crystal
require "option_parser"
require "http/server"
require "json"
class Settings
property port = 3000
property host = ""
property? show_headers = false
property? show_raw_json = false
jhass /
Created Nov 18, 2015
VMM ( DKIM configuration (only relevant parts shown)
sudo pacman -S opendkim
sudo cp /etc/opendkim/opendkim.conf{.sample,}
sudo mkdir /var/lib/dkim
sudo chown opendkim:mail /etc/opendkim/opendkim.conf /var/lib/dkim
sudo chmod 700 /var/lib/dkim
sudo chgrp mail /var/spool/postfix/private
sudo -u opendkim opendkim-genkey -D /var/lib/dkim -b 2048 -s mail
sudo usermod -a -G mail postfix
jhass /
Last active Nov 5, 2015 helper function
  1. Add to your .${SHELL}rc.
  2. Replace user and password.
  3. Create cat foo | ixio.
  4. Update cat foo | ixio abc.
  5. View your pastes at
jhass /
Last active Sep 10, 2019
Lock (Gnome) session when removing Yubico U2F key


  1. Copy 99-u2f_lock_screen.rules to /etc/udev/rules.d.
  2. Copy gnome_lock_all_sessions to /usr/local/bin.
  3. Mark gnome_lock_all_sessions as executable: chmod +x /usr/local/bin/gnome_lock_all_sessions
  4. Reload udev: udevadm control -R
jhass / .gitignore
Last active Jun 5, 2017
bxctl - Small helper to manage my boxcars configuration
View .gitignore
You can’t perform that action at this time.