Skip to content

Instantly share code, notes, and snippets.

probonopd

  • Germany
Block or report user

Report or block probonopd

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
View appimage_golang.md

AppImage in Golang

Wondering whether it would be a good idea to re-implement AppImage tools in Golang.

Advantages:

  • Maintainable, easy code (unlike "modern C++")
  • Short compilation times
  • Statically linked binaries, no dependencies
  • Synergies with snap?
  • Fun?
@probonopd
probonopd / raspberry_pi_keyboard.md
Last active Nov 29, 2019
Automatic USB keyboard language detection
View raspberry_pi_keyboard.md

Automatic USB keyboard language detection

The official Raspberry Pi keyboard can automatically tell the operating system the language, something all keyboards should have done since the introduction of USB.

Kudos to the genius at the Raspberry Pi Foundation who made this happen, finally. I only wish I could plug this keyboard into any computer system and have it just work.

How is it working, actually? Does anybody know?

@probonopd
probonopd / Ender-2.ini
Created Aug 11, 2019
Ender-2 profile for PrusaSlicer
View Ender-2.ini
# generated by PrusaSlicer 2.1.0-alpha1+linux64 on 2019-08-11 at 17:37:33
bed_custom_model =
bed_custom_texture =
bed_shape = 0x0,160x0,160x160,0x160
before_layer_gcode =
between_objects_gcode =
cooling_tube_length = 5
cooling_tube_retraction = 91.5
default_filament_profile = ""
default_print_profile =
View making_deb_file.md

Making a deb, the no-nonsense way

Let's say we want to package /usr/bin/foo and /usr/bin/bar.

Easy:

sudo apt-get -y install equivs

touch foo bar
@probonopd
probonopd / satisfying-twister.scad
Created Jun 10, 2019
Parametrized for holding Euro coins. Need to rotate along Y axis
View satisfying-twister.scad
// Customizable twister
// Copyright (C) 2017 Lars Christensen
// Idea from Make Anything
// Which one would you like to see?
part = "outer"; // [inner:Inner twister,outer:Outer twister,both:Both twisters,assembled:Assembled]
// Height of twisting part (mm)
height = 40; // [5:600]
@probonopd
probonopd / squash_gh_pr.md
Last active Jan 6, 2019
Squash GitHub pull requests as the sender
View squash_gh_pr.md

Combine existing GitHub pull requests into one commit

By the "receiver" of the pull request

If you would like to see only one entry for the Pull Request in your project's history, then please enable this GitHub functionality on your repo. It allows you to squash (combine) the commits when merging.

By the "sender" of the pull request

Unfortunately, the "sender" of the pull request does not have a button in the GitHub GUI to squash the commits in an existing pull request. Instead, they need to to it by hand using the command line, which is unfortunately cumbersome but can be done like this:

View kernelci-local.md

Locally reproducing kernelci.org boots

Work in progress.

#!/bin/bash

# Let's say I want to recreate the boot described on
# https://kernelci.org/boot/id/5bd738a859b514802674be00/
# with my local hardware and an SD card
@probonopd
probonopd / ptouch-770.py
Last active Nov 3, 2018
Python script to print multiple lines of text on the Brother PT-H500, P700, E500 label printers
View ptouch-770.py
#!/usr/bin/python3
# Based on https://github.com/SquirrelCZE/ptouch-770
# Trying to add multi-line capabilities.
# Font size calculation/positioning apparently not correct.
# On 12mm tape, the topmost 20px are not printed, the following 84 px are printed
# (as determined by experimentation using calibrate_12mm_tape.pbm made with GIMP)
from PIL import Image, ImageFont, ImageDraw
import argparse
View mxq.md

Linux on MXQ (PCB: S805Q_V2.0) m8b_m201_v1@23a35625

Seems to be also known as the HD18Q "black box". https://www.ebay.de/itm/153205410117 ("NEU MXQ S805 Smart 1GB+ 8GB Smart TV Box Android 4.4 Quad Core 1.5 G WIFI", seller "SILVESTRAS RUNTA Network Tech Co. Ltd"), EUR 14,99

I can boot with meson8b_m201d.dtb and wired Ethernet works.

U-boot thinks it is a 512 MB device. Linux does, too. The SDK used seems to be named "s805_0701_512M":

root@vegas805:~# strings /mnt/lib/hw/camera.amlogic.so | grep home/
You can’t perform that action at this time.