Skip to content

Instantly share code, notes, and snippets.

Avatar

Ole Jørgen Brønner olejorgenb

View GitHub Profile
@ddevault
ddevault / Makefile
Last active Nov 18, 2021
Tiny Wayland compositor
View Makefile
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# 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.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@BenoitAverty
BenoitAverty / userChrome.css
Last active Nov 22, 2021
Hide tab bar on firefox 89 when there is only one tab
View userChrome.css
/*
How To:
1. Find your firefox profile folder : https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data
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)
@martijnvermaat
martijnvermaat / nixos.md
Last active Nov 27, 2021
Installation of NixOS with encrypted root
View nixos.md
@nstarke
nstarke / release-android-debuggable.md
Last active Dec 1, 2021
How to make a Release Android App debuggable
View release-android-debuggable.md

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
@johnhw
johnhw / umap_sparse.py
Last active Dec 1, 2021
1 million prime UMAP layout
View umap_sparse.py
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active Dec 2, 2021
Some commands to get git commit log statistics for a repository on the command line.
View git-commit-log-stats.md

git commit stats

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




@willurd
willurd / web-servers.md
Last active Dec 3, 2021
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000