Skip to content

Instantly share code, notes, and snippets.


Jonne Haß jhass

View GitHub Profile
jhass / gh-pr-status.rb
Last active Jun 20, 2020
Little script to list your pull requests and whether you need to take action on them
View gh-pr-status.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
require "bundler/inline"
gemfile do
source ""
gem "octokit"
gem "terminal-table"
jhass /
Last active May 14, 2020
Crystal shim to redirect malloc & pthread to bdwgc (depends on glibc and
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 Nov 4, 2020
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 Nov 19, 2020 — forked from yorkxin/
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
You can’t perform that action at this time.