Skip to content

Instantly share code, notes, and snippets.

View scottstamp's full-sized avatar

Scott Stamp scottstamp

  • Hypermine Networks
  • St. John's, Newfoundland
View GitHub Profile
@scottstamp
scottstamp / Explanation.md
Created May 20, 2024 02:59
ESP8266 PN532 NDEF reader/writer

Explanation:

  • Setup WiFi and PN532: Connect to the WiFi network and initialize the PN532 NFC reader.
  • Reading NFC Tags: The readNFC function reads NFC tags, decodes the URI and text fields, and sends them to a specified HTTP endpoint.
  • HTTP Server: The ESP8266 hosts an HTTP server with a /writeNDEF endpoint to receive JSON payloads to write to NFC tags.
  • Writing to NFC Tags: The writeNDEFToTag function writes the received URI and description to a new NFC tag.

Notes:

  • Ensure you replace YOUR_SSID, YOUR_PASSWORD, and http://yourserver.com/endpoint with your actual WiFi credentials and server URL.
  • The code uses NdefRecord for creating URI and text records. Adjust as needed based on your NFC library's API.
@scottstamp
scottstamp / ArrInstaller.sh
Created September 15, 2023 19:06
ArrInstaller w/ Sonarr support
#!/bin/bash
### Description: \*Arr .NET Debian install
### Originally written for Radarr by: DoctorArr - doctorarr@the-rowlands.co.uk on 2021-10-01 v1.0
### Version v1.1 2021-10-02 - Bakerboy448 (Made more generic and conformant)
### Version v1.1.1 2021-10-02 - DoctorArr (Spellcheck and boilerplate update)
### Version v2.0.0 2021-10-09 - Bakerboy448 (Refactored and ensured script is generic. Added more variables.)
### Version v2.0.1 2021-11-23 - brightghost (Fixed datadir step to use correct variables.)
### Version v3.0.0 2022-02-03 - Bakerboy448 (Rewrote script to prompt for user/group and made generic for all \*Arrs)
### Version v3.0.1 2022-02-05 - aeramor (typo fix line 179: 'chown "$app_uid":"$app_uid" -R "$bindir"' -> 'chown "$app_uid":"$app_guid" -R "$bindir"')
### Version v3.0.3 2022-02-06 - Bakerboy448 fixup ownership
@scottstamp
scottstamp / glitched-gift-sender.csx
Created May 28, 2022 00:49
Glitched Gift Sender
/// @name Glitched gifter
/// @desc Sends a glitched gift
/// @author b7
/// @scripter 1.0.0-beta
/// @group Utility
const string
Recipient = "Missing#",
Message = "Testing, Testing, 1... 2... 3...";
const string Gift = GiftFurni.WrapMaroon;
@scottstamp
scottstamp / auto-accept-trades.csx
Created May 18, 2022 00:05
auto-accept-trades.csx
/// @name Auto accept trades
/// @group Trading
/// @desc
/// Automatically accepts trades.
/// The trade window won't be shown in-client,
/// and your inventory won't refresh until the script is canceled.
/// @author b7
/// @scripter 1.0.0-beta
OnIntercept((
/// @name Auto accept trades
/// @group Trading
/// @desc
/// Automatically accepts trades.
/// The trade window won't be shown in-client,
/// and your inventory won't refresh until the script is canceled.
/// @author b7
/// @scripter 1.0.0-beta
OnIntercept((
var root = GetBcCatalog();
ICatalogPage GetBcPageNamed(string name) => GetBcCatalogPage(root.First(x => x.Name == name).Id);
var blockEarnings = true;
var hockey = GetBcPageNamed("gameset_ice_hockey");
var snowboard = GetBcPageNamed("gameset_snowboard");
var rollerskate = GetBcPageNamed("gameset_roller_skates");
var letters = GetBcPageNamed("bc_alphabet");
@scottstamp
scottstamp / ids.txt
Last active March 26, 2022 11:30
Room Raider (Fast)
76929309
77773851
77774129
77774138
77774140
77774141
77774143
77774144
77774145
77774146
/// @name BC Achievement Booster
/// @group Utility
/// @scripter 1.0.0-beta
var count = 0;
OnIntercept((In["Achievement"], In["BuildersClubFurniCount"]), e => {
if (count < 10) {
if (e.Packet.Header == In["Achievement"] && e.Packet.ReadInt() != 196) {
return;
}
/// @name Roller Queue
/// @group Utility
/// @scripter 1.0.0-beta
OnEntitySlide(x => {
var roller = FloorItems.At(Self.Location.XY).NamedLike("Roller").FirstOrDefault();
if (roller != null) {
switch ((Directions)roller.Direction) {
case Directions.North:
if (x.PreviousTile == Self.Location.Subtract(0, 1))
@scottstamp
scottstamp / Program.cs
Created May 2, 2021 03:00
Furnidata schema auto-definition
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Antidote
{
static class Program
{