Skip to content

Instantly share code, notes, and snippets.

Avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
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
View iot-rpi-4al
{ 'timestamp': '16/10/2021 14:57:41', 'state': '#' }
{ 'timestamp': '16/10/2021 14:57:43', 'state': '#' }
{ 'timestamp': '16/10/2021 14:58:11', 'state': '#' }
{ 'timestamp': '16/10/2021 14:58:13', 'state': '#' }
View iot-myw-png
{'date':'2021-08-06T20-59-58','message':'1040710'}
{'date':'2021-08-06T21-01-59','message':'1040830'}
View lorem-ipsum.txt
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dictum felis eu pede mollis pretium. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
Aenean commodo ligula eget dolor. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Integer tincidunt.
Cras dapibus. Aenean vulputate eleifend tellus. Vivamus elementum semper nisi. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Donec vitae sapien ut libero venenatis faucibus. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero
View iot-sbc-pir
2021:18:41##_#_#_#_#_#_##_#####_##_##_#_#_#_###_#_##_#_#_#_#_#_#_###_#_##_#_#_##_#_##_#_##_#_#_#_#_##_#_###_#_#_#_#_#_#_#_#_#_#####_##_##_##_###_#_#_#_##_#_#_##_#_##_
7:18:20:30
7:18:20:50
7:18:20:51#
7:18:20:51#
7:18:20:51#_
7:18:20:56#
7:18:20:57#_
7:18:20:59#_
7:18:21:4#_
View recursive_sha256sum_of_files.sh
#!/bin/bash
# Find all files and execute sha256sum on each, report to file checksum.sha256
#
find . -type f -exec sha256sum "{}" + | tee checksum.sha256
View raspi-os_disable-microsoft-telemetry.sh
#!/bin/bash
# Make every deb line a comment, this should disable the microsoft repository referenced in vscode.list
sed -i -e 's/^deb/# deb/' /etc/apt/sources.list.d/vscode.list
# Remove the microsoft gpg key and replace with an empty file
rm /etc/apt/trusted.gpg.d/microsoft.gpg && touch /etc/apt/trusted.gpg.d/microsoft.gpg
# Mark files as immutable to avoid changes from updates
chattr +i /etc/apt/trusted.gpg.d/microsoft.gpg