Skip to content

Instantly share code, notes, and snippets.

Avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
@coseos
coseos / colorprompt
Created May 27, 2022
Colorprompt provides a prompt with color
View colorprompt
# 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}"
View iot-tfk-001
{ "ini": "" }
{ 'timestamp': '07/05/2022 11:59:06', 'state': '
{ 'timestamp': '07/05/2022 12:03:19', 'state': '_' }
{ 'timestamp': '07/05/2022 12:07:34', 'state': '_' }
{ 'timestamp': '07/05/2022 12:11:48', 'state': '_' }
{ 'timestamp': '07/05/2022 12:16:03', 'state': '_' }
{ 'timestamp': '07/05/2022 12:20:18', 'state': '_' }
{ 'timestamp': '07/05/2022 12:24:33', 'state': '_' }
{ 'timestamp': '07/05/2022 12:28:48', 'state': '_' }
View dwm on RPi Bullseye with RaspiOS.md

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.

View increase-netbeans-font-size.md

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
@coseos
coseos / eclipse.desktop
Created Jan 21, 2022
Gnome Desktop Launcher for eclipse
View eclipse.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=${HOME}/Bin/eclipse/eclipse
Name=eclipse
Comment=eclipse
Icon=${HOME}/Bin/eclipse/icon.xpm
View RaspyPlay4.md

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

View use-telnet-for-http-access.sh
#!/bin/bash
HOST=${1}
PATH=${2}
telnet ${HOST} 80 <<<EOF
GET ${PATH} HTTP/1.1
HOST: ${HOST}
EOF>>>
View gist:746cb159e274128e32b62539853078f6
#!/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
View Razer Book 13 WiFi Intel AX-201 with Debian 11.md

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:

View sb-components_rfid_read.py
#!/usr/bin/python3
# Use this python script to read RFID tag with sb components RFID reader
#
# The original script is located at https://github.com/sbcshop/RFID-Breakout
#
# Added shebang to make the script executable on its own using python3
import serial #import serial module