Skip to content

Instantly share code, notes, and snippets.

Avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
View iot-tfk-001
{ 'timestamp': '26/12/2021 11:36:54', 'state': '_' }
{ 'timestamp': '26/12/2021 11:40:13', 'state': '
{ 'timestamp': '26/12/2021 11:44:26', 'state': '_' }
{ 'timestamp': '26/12/2021 11:48:42', 'state': '_' }
{ 'timestamp': '26/12/2021 11:52:59', 'state': '_' }
{ 'timestamp': '26/12/2021 11:57:14', 'state': '_' }
{ 'timestamp': '26/12/2021 12:01:29', 'state': '_' }
{ 'timestamp': '26/12/2021 12:05:44', 'state': '_' }
{ 'timestamp': '26/12/2021 12:10:00', 'state': '_' }
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 iot-501-pir
{ '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' }
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
View config.txt
#
# Raspberry Pi / Raspi OS, /boot/config.txt
#
# With 'gpio=26=op,dh', GPIO 26 is set to output a signal when the Raspberry Pi is turned on.
#
gpio=26=op,dh
View config.txt
#
# Raspberry Pi / Raspi OS, /boot/config.txt
#
# With 'dtoverlay=gpio-shutdown', GPIO 3 is used as a power on/off switch.
#
dtoverlay=gpio-shutdown
View get-public-ip
#!/bin/bash
PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo`
echo $PUBLIC_IP