Skip to content

Instantly share code, notes, and snippets.

View shortcircuit's full-sized avatar

SDCIII shortcircuit

View GitHub Profile
@aquaductape
aquaductape / zshrc
Last active September 23, 2021 07:57 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
# Prepare Python Env
virtualenv py3 -p $(which python3)
source py3/bin/activate
pip install esptool
# Download Firmware
wget https://github.com/arendst/Sonoff-Tasmota/releases/download/v6.3.0/sonoff.bin
# Backup Shelly Firmware
esptool.py --port /dev/cu.usbserial-1420 read_flash 0x00000 0x100000 shelly1_backup_01.bin
@liz-miller
liz-miller / post-to-ifttt.ino
Last active January 25, 2020 02:45
Arduino to IFTTT using Wemos D1 Mini - POST methods
#include <Arduino.h>
#include <ESP8266WiFi.h>
// WiFi parameters
const char* ssid = "your-ssid"; //replace with your ssid
const char* password = "your-pw";//replace with your pw
// IFTTT Maker parameters:
char MakerIFTTT_Key[] = "your-ifttt-key"; // Obtained when setting up/connecting the Maker channel in IFTTT
char MakerIFTTT_Event[] = "wemos-trigger"; // Arbitrary name for the event; used in the IFTTT recipe.
@duncandoo
duncandoo / espRFIDRelayController.ino
Created January 31, 2017 23:25
Arduino IDE code to run an ESP8266 with a RFID reader to get and keep a list of authorised tags over MQTT. When an authorised tag is presented a relay is activated
/*
espRFIDRelaycontroller by Duncan McPherson
Use a RFID-RC522 and ESP8266-12e to control a relay to activate
a machine for authorised users. Pick up the list of authorised users from an MQTT server.
*/
#include <EEPROM.h> // To read and write PICC's UIDs from/to EEPROM
#include <SPI.h> // RC522 Module uses SPI protocol
@Bucknalla
Bucknalla / get_request.py
Created January 26, 2017 21:32
MicroPython GET Request - Socket
import socket
def http_get(url):
_, _, host, path = url.split('/', 3)
addr = socket.getaddrinfo(host, 80)[0][-1]
s = socket.socket()
s.connect(addr)
s.send(bytes('GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n' % (path, host), 'utf8'))
while True:
data = s.recv(100)
@xbb
xbb / README
Last active June 19, 2025 10:24
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
@jacquesbh
jacquesbh / Use Yubikey (GPG key) for SSH.md
Last active January 3, 2024 14:59
Use my Yubikey with GPG keys to SSH with a guest computer (OSX or Windows)
@marianoguerra
marianoguerra / README.rst
Last active April 1, 2024 15:25
MQTT Generator Script

MQTT Generator

A simple python 3 script to generate sensor data from a config file and send it to an MQTT broker.

Usage

Download mqttgen.py and config.json files (click on the Raw button at the top right and then save the content), edit config.json to fit your needs, if you are using it to run the Event Fabric sensors dashboard then don't change the topic in config.json unless you want to change it in the dashboard too.

@flbuddymooreiv
flbuddymooreiv / passgitgpg.md
Last active June 27, 2025 17:40
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.