Skip to content

Instantly share code, notes, and snippets.


Ole Jørgen Brønner olejorgenb

View GitHub Profile
bmaupin /
Last active Aug 27, 2022
Alternatives to Llama for Android


Find a replacement for Llama (R.I.P. 😢)


🦙 Keep using Llama! 🦙

  • Llama still works and no other application seems to match Llama in terms of ease of use and cell-tower location (Llama's killer feature)
  • Cell-tower location UX seems to be unmatched by the alternatives (training new locations, ignoring towers, seeing location events)
mkows /
Created Jul 31, 2019
Allow CORS with python Simple HTTP Server – for Python 3
Based on (in Python 2) -> quick-migrated to Python 3
Usage: python server-cors
import http.server as httpserver
class CORSHTTPRequestHandler(httpserver.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
johnhw /
Last active Sep 22, 2022
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
import random
ddevault / Makefile
Last active Sep 13, 2022
Tiny Wayland compositor
View Makefile
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
BenoitAverty / userChrome.css
Last active Sep 27, 2022
Hide tab bar on firefox 89 when there is only one tab
View userChrome.css
How To:
1. Find your firefox profile folder :
2. create a "chrome" folder if it doesn't exist
3. Paste content of this gist in a "userChrome.css" file
4. Go to about:config and set toolkit.legacyUserProfileCustomizations.stylesheets to true
5. Restart Firefox
Don't hesitate to say if there are bugs, I only tested this for my workflow : I don't use tabs
at all but I want to see the bar if I open a tab by mistake (otherwise I sometimes lose a tab)
garoto / mpvhistory.lua
Last active Aug 11, 2022
Simple media logger Lua script for mpv
View mpvhistory.lua
-- Not my code: originally from (author deleted; failed to ask for permission).
-- Only tested on Windows. Date is set to dd/mmm/yy and time to machine-wide format.
-- Save as "mpvhistory.lua" in your mpv scripts dir. Log will be saved to mpv default config directory.
-- Make sure to leave a comment if you make any improvements/changes to the script!
local HISTFILE = (os.getenv('APPDATA') or os.getenv('HOME')..'/.config')..'/mpv/mpvhistory.log';
mp.register_event('file-loaded', function()
local title, logfile;
aherrmann /
Last active Aug 23, 2020
Fully persistent Nix shell
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
martijnvermaat /
Last active Sep 10, 2022
Installation of NixOS with encrypted root
nstarke /
Last active Jul 21, 2022
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
eyecatchup /
Last active Sep 29, 2022
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.