Skip to content

Instantly share code, notes, and snippets.

@varnav
varnav / adsb-feed-rpi.sh
Last active March 26, 2024 19:31
Script will install multiple ADS-B feeders to Raspberry Pi OS
#!/bin/bash -ex
# Script will install multiple ADS-B feeders to Raspberry Pi OS
# Before running make sure you have your coordinates (lat/lon in a form of DD.DDDD) and antenna height (in both feet and m) handy.
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
/*
A simple Twitter bot that posts random images.
Tutorial: https://botwiki.org/resource/tutorial/random-image-tweet/
*/
const fs = require('fs'),
path = require('path'),
Twit = require('twit'),
config = require(path.join(__dirname, 'config.js'));
@vikrant2mahajan
vikrant2mahajan / esp8266-lcd-1602a-temperature-sensor-dht11
Last active January 6, 2024 21:50
Connect an LCD 1602A with ESP8266 along with DHT11 temperature sensor
/*
DHT Weather server with display integrated for NodeMCU esp8266 and 1602A LCD
Please connect 1602A using I2C backpack.
If you feel display is not showing anything, please take a screwdriver and update contrast
using I2C potentiometer in back of LCD
LCD config
SDA pin - D2
SCL pin - D1
@LeonardoGentile
LeonardoGentile / temp.py
Last active August 10, 2023 20:02
Monitor the raspberry pi temperature and send an email/shutdown in case it's too high
# coding=utf-8
import os
import smtplib
from email.mime.text import MIMEText
critical = False
high = 60
too_high = 80
# At First we have to get the current CPU-Temperature with this defined function
@DenisFromHR
DenisFromHR / RPi_I2C_driver.py
Last active December 1, 2023 21:05
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
@lloeki
lloeki / battery.py
Last active January 10, 2023 16:04
Battery status script for Mac OS X
#!/usr/bin/env python
from __future__ import print_function
from __future__ import division
from subprocess import Popen, PIPE
def ioreg_battery_info():
output = Popen(["ioreg", "-r", "-k", "LegacyBatteryInfo", "-w", "0"], stdout=PIPE).communicate()[0]
try: #python3