Skip to content

Instantly share code, notes, and snippets.

View coseos's full-sized avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
@coseos
coseos / iot-501-pir
Last active December 13, 2021 13:52
{ 'timestamp': '14/10/2021 17:17:31', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:17:47', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:17:52', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:18:02', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:18:44', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:18:48', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:18:54', 'state': 'o' }
{ 'timestamp': '14/10/2021 17:22:13', 'state': 'o' }

Razer Book 13 WiFi Intel AX-201 with Debian 11

The Razer Book 13 includes a rather new Intel AX-201 WiFi that is not supported out of the box by Debian 11 on a fresh installation (as of 2021-12-30).

To make your WiFi adapter work, get the (latest) Firmware from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git. Using https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20211216.tar.gz worked well for me.

You have to untar the file and look for the driver files. Copy the files to the /lib/firmware/ folder and reboot your system.

To copy the files from the extracted archive, use:

#!/bin/bash
#
# Show Raspberry Pi eeprom configuration
#
# BOOT_ORDER= specifies the boot order which will allow you to boot from SSD connected over USB
#
sudo rpi-eeprom-config
#!/bin/bash
HOST=${1}
PATH=${2}
telnet ${HOST} 80 <<<EOF
GET ${PATH} HTTP/1.1
HOST: ${HOST}
EOF>>>

RaspyPlay4 with Raspberry Pi

For the RaspyPlay4 to work, you need to edit your /boot/config.txt and add a line:

device_tree_overlay=iqaudio-dacplus

or

@coseos
coseos / eclipse.desktop
Created January 21, 2022 14:53
Gnome Desktop Launcher for eclipse
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=${HOME}/Bin/eclipse/eclipse
Name=eclipse
Comment=eclipse
Icon=${HOME}/Bin/eclipse/icon.xpm

Increase NetBeans fontsize

To increase the fontsize with NetBeans 13, add a --fontsize parameter followed by an integer that specifies the fontsize.

netbeans --fontsize 20

How to use dwm on a Raspberry Pi with RaspiOS

RaspiOS based on Debian Bullseye

Prepare

You should install RaspiOS from the official image or have your Raspberry Pi ready. Sorry, no details for that. There are lot's of helpful resources available.

@coseos
coseos / colorprompt
Created May 27, 2022 06:27
Colorprompt provides a prompt with color
# colorprompt a prompt with color
function colorprompt() {
bo="\[\033[01;38;5;247m\]["
bc="\[\033[01;38;5;247m\]]"
u1="\[\033[01;38;5;196m\]${USER:0:1}"
u2="\[\033[01;38;5;009m\]${USER:1:1}"
u3="\[\033[01;38;5;202m\]${USER:2:1}"
u4="\[\033[01;38;5;208m\]${USER:3:1}"
u5="\[\033[01;38;5;214m\]${USER:4:1}"
@coseos
coseos / Razer-Book-13_with_Debian-Bullseye_Fix-Audio-problem.md
Created June 6, 2022 12:37
Razer Book 13 with Debian Bullseye Fix Audio problem

Razer Book 13 with Debian Bullseye: Fix Audio Problem

The Razer Book 13 is my second Razer notebook. The fine silver makes a nice difference to the beautiful black of the Stealh 13. Even though the technical specs leave some wishes open as 16 GB of RAM is the max, the look and touch is great. In my opinion this is the most beautiful non black notebook available in 2022.

Razor Book 13

Audio may not work out of the box though when you install Debian Bullseye (11) on your Razor Book 13.

When your output lists only the Dummy-device, fix that with the following command (run as root):