Skip to content

Instantly share code, notes, and snippets.

View PrimeSeventyThree's full-sized avatar
💭
There is an art to flying: learning to throw yourself at the ground and miss.

Andrei Grichine PrimeSeventyThree

💭
There is an art to flying: learning to throw yourself at the ground and miss.
View GitHub Profile

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@PrimeSeventyThree
PrimeSeventyThree / remove_notification_channel.sh
Created April 19, 2024 16:21
Script to remove a notification channel from all alert policies in Google Cloud
#!/bin/bash
# To remove a notification channel from all alert policies using a single CLI command
# in Google Cloud is not straightforward because gcloud does not support bulk updating
# of alert policies directly. However, you can achieve this by scripting a combination
# of gcloud commands to iterate through each policy, remove the notification channel,
# and update the policy.
#
# This script will list all policies, check if the specified notification channel is set,
# and then update each policy to remove that channel.

iOS Developer Test Assignment

Objective:

Develop a chat web app using TypeScript on the Firebase platform. Integrate this chat web app into a basic iOS app using WKWebView. The chat should interface with the Chat GPT 4 model (CodyAI) through its API and display responses in real-time. The content should be relevant to an artist and their current song.

Requirements:

1. Chat Web App Development:

@PrimeSeventyThree
PrimeSeventyThree / Pins_Arduino.h
Created January 25, 2023 12:03 — forked from nog3/Pins_Arduino.h
Oak pins for ESP8266 Arduino Core
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2007 David A. Mellis
Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015.
Modified for Oak by Digistump, 2016.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@PrimeSeventyThree
PrimeSeventyThree / gist:85d4962ca769ba158260238398efc054
Created January 5, 2021 15:02
Brother HL-3040cn on Raspberry PI
# Usual preparation:
sudo apt update
sudo apt upgrade
# Get qemu user support:
sudo apt install qemu-user-binfmt
# Prepare for needed i386 files:
sudo apt install debootstrap
sudo mkdir -p /foreign/rootfs-i386
sudo debootstrap --foreign --arch=i386 buster /foreign/rootfs-i386/
sudo ln -s /foreign/rootfs-i386/lib/ld-linux.so.2 /lib/
@PrimeSeventyThree
PrimeSeventyThree / getopts.sh
Created November 16, 2020 18:28 — forked from rosterloh/getopts.sh
An example of how to use bash getopts
#!/bin/bash
######################################################################
#This is an example of using getopts in Bash. It also contains some
#other bits of code I find useful.
#Author: Linerd
#Website: http://tuxtweaks.com/
#Copyright 2014
#License: Creative Commons Attribution-ShareAlike 4.0
#http://creativecommons.org/licenses/by-sa/4.0/legalcode
@PrimeSeventyThree
PrimeSeventyThree / gist:874eef502222a220bcdf71be80d64c42
Last active September 25, 2018 22:40
an Applescript to batch change picture modification date based on an actual capture date via EXIF
-- This code comes from https://gist.github.com/PrimeSeventyThree
-- Open in AppleScript Editor and save as Application
-- ------------------------------------------------------------
use scripting additions
use framework "Foundation"
use framework "AppKit" --for image stuff
tell application "Finder"
set all_files to every item of (choose file with prompt "Choose the Files you'd like to update:" with multiple selections allowed) as list
--now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file.