Skip to content

Instantly share code, notes, and snippets.

@Cryptkeeper
Cryptkeeper / ebaydl.sh
Last active May 4, 2021 02:08
Download and timestamp all images from a given eBay listing URL
#!/bin/sh
function _ebaydl_find_hashes {
local URL="$1"
local DIR="$2"
local SIZES=(64 500 1600)
curl --silent "$URL" | grep -E -o "https?://i.ebayimg.com/images/g/[0-9A-Za-z~-]{15,16}/s-l[0-9]{2,}.[a-z]{3,4}" | sort | cut -d"/" -f6 | uniq | while read -r HASH
do
echo "$HASH"
for SIZE in ${SIZES[@]}
do
@Cryptkeeper
Cryptkeeper / generate_lor_devices.sh
Last active June 6, 2020 23:26
Generate a C header file containing definitions derived from LOR_DeviceFile.txt
#!/bin/sh
DEVICE_FILE=LOR_DeviceFile.txt
HEADER_FILE=model.h
# Download and overwrite $DEVICE_FILE using quiet mode
echo "Downloading $DEVICE_FILE"
wget http://www1.lightorama.com/downloads/LOR_DeviceFile.txt -q -O $DEVICE_FILE
# Generate a sha1sum of the downloaded file
# This is stored in the generated header file for validation purposes

fsequtils macOS Compile Guide

This guide uses Homebrew for installation of dependencies. You may instead manually install them if you wish. Experience with the CLI is expected and that common development tools (make, git, a C++ compiler) are pre-installed (they may also be installed through Homebrew).

  1. Install zstd, jsoncpp and sha1sum dependencies using brew install zstd jsoncpp md5sha1sum
  2. Get the current jsoncpp version using brew info jsoncpp | head -n 1
  3. jsoncpp will be installed with a different path to /usr/local/include than the fpp source code is importing. Create a symlink using ln -s /usr/local/Cellar/jsoncpp/CURRENT_JSONCPP_VERSION/include/ /usr/local/include/jsoncpp/
  4. Test the symlink was successfully created using ls /usr/local/include/ | grep jsoncpp
  5. Clone the FalconChristmas/fpp repository with git clone https://github.com/FalconChristmas/fpp
  6. Move into the cloned source code directory with cd fpp/src/