Skip to content

Instantly share code, notes, and snippets.

View PSandro's full-sized avatar
:shipit:
Working from home

Sandro PSandro

:shipit:
Working from home
View GitHub Profile
@andrebrait
andrebrait / keychron_linux.md
Last active May 27, 2024 01:03
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

How to create a Wake-on-LAN API Endpoint with OpenWRT LuCI

Disclaimer

I'm stuck on OpenWRT 18.06, and these info may soon be obsoleted by newer versions, and/or the more detailed ACL scheme in LuCI2.

Motivation

The motivation So i have this server at home, that serves http://hq.strfry.org , which i sometimes switch off at night.

# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@samdoshi
samdoshi / .gitignore
Last active May 23, 2024 12:11
Running SuperCollider/Jack2 inside Docker with ALSA pass-through
/jackdrc
@kriswill
kriswill / vcprompt.py
Created August 24, 2018 19:26
vcprompt
#!/usr/bin/env python
"""
Usage: vcprompt [options]
Version control information in your prompt.
Attribution: possible original author <Matthias Riegler https://github.com/xvzf>?
Options:
-f, --format FORMAT The format string to use.
@jeffsharpe
jeffsharpe / arch-install-gpt-luks_on_lvm.sh
Created October 22, 2015 19:26
Arch Linux Installation Notes - GPT LUKS on LVM (multiple drives)
# # boot to arch linux boot prompt
# installation
# setup networking
ping -c 3 www.google.ca
# eth connections just work or me, so…
wifi-menu # select and log in
ping -c 3 www.google.ca