Skip to content

Instantly share code, notes, and snippets.

András Retzler ha7ilm

Block or report user

Report or block ha7ilm

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
ha7ilm /
Last active Sep 6, 2019
A one line hexdump function for python
def xxd(d): return reduce(lambda x,y:x+y+" ", map(lambda p:("0" if ord(p)<=0xf else "")+hex(ord(p))[2:],d), "")
print xxd("cat")
print xxd("\x0f\x05\x01")

This code sample was made by Andras Retzler, and is released under the MIT license.

ha7ilm / 61-zbook-kbd.hwdb
Last active Jul 17, 2019
HP Zbook 15v hbdw file for keyboard
View 61-zbook-kbd.hwdb
#This is based on:
#Paste this into your .zshrc:
function ranger-cd {
tempfile="$(mktemp -t tmp.XXXXXX)"
/usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"

How to make formulas appear larger in Jupyter notebooks? Just add \Large to the beginning of the formula block.

E.g. $\Large \sigma$


Custom battery module for polybar

I made this hack as the built-in battery module failed to display the battery status correctly after waking up from suspend.

type = custom/script
exec = acpi -b | cut -d' ' -f3-5 | sed 's/Unknown/Charging/g' | sed 's/^/  /'
tail = true
interval = 30
ha7ilm /
Last active Dec 18, 2018
Setting up OpenWebRX on Ubuntu 14.04 LTS
#Install dependencies
sudo apt-get install build-essential git libfftw3-dev cmake libusb-1.0-0-dev
#Fetch and build rtl-sdr, skip if already done (subdirectories will be created under the current directory).
git clone git://
cd rtl-sdr/
mkdir build
cd build
ha7ilm /
Last active Mar 26, 2018
Fix for broken W520 battery clips

I've broken the clips of my Thinkpad's aftermarket battery.

These clips hold the battery in the laptop. Without those, it can slide out, so the battery is not much useful. They were very weak indeed (probabily because the battery is not an original one, but I don't know because this is the only one I disassembled).

I've fixed it with some stick-on velcro (that has glue on its other side).

This should be very cheap, and you are likely to find it in the nearest fabric store.

The velcro seems to keep the battery in the laptop quite stable.


How to compile and install Mixxx from source on Ubuntu 14.04?

You need to do this if you need the freshest version of Mixxx. However, it might have bugs. Consider installing the stable version from the repository.

First, clone the repo:

git clone
cd mixxx

Next, install all of the dependencies detailed at:


How to debug any (non-Qt) executable with QtCreator

  1. Create .gdbinit in the same directory as executable, with the following contents:
set breakpoint pending on
b main
  1. Run this:
View osmocom_source.grc
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.8'?>
<timestamp>Sun Feb 14 23:22:04 2016</timestamp>
You can’t perform that action at this time.