Skip to content

Instantly share code, notes, and snippets.

View nealey's full-sized avatar
🐢

Neale Pickett nealey

🐢
View GitHub Profile
@nealey
nealey / slack-emoji-bulk-delete.js
Last active May 25, 2023 23:09
Bulk delete every custom emoji in Slack
//
// I just found out that we have a bunch of NSFW emoji in our bulk-imported set of >4000 emoji.
// Rather than weed them out, I want to start with a blank slate. This code does that.
//
// Navigate to your "Custom Emoji" page, the one with all the delete buttons.
// Delete one of them and acknowledge that it's going away forever.
// Then open the JavaScript console and paste this in.
//
// At some point your JavaScript console will start spewing errors.
// Reload the Emoji page, delete one emoji by hand again, and paste this in again to resume.
@nealey
nealey / raspbian-cgi-apache.sh
Last active December 23, 2022 22:23
Raspbian: set up Apache with CGI
#! /bin/sh
# Let the user write to the HTML directory
sudo chown pi /var/www/html
# Set up Apache
sudo apt update
sudo apt install apache2
sudo a2enmod cgi
sudo apache2ctl graceful
@nealey
nealey / docker-tags.sh
Last active October 28, 2022 03:08 — forked from robv8r/docker_tags.sh
List Docker Image Tags using Bourne shell (including Bash)
#! /bin/sh
image="$1"; shift
if [ -z "$image" ] || [ "$image" == "--help" ]; then
echo "Usage: $0 IMAGE"
echo
echo "Prints all tags associated with IMAGE in a docker repository"
exit 1
fi
@nealey
nealey / stunnel.conf
Created December 1, 2016 16:09
stunnel configuration to connect to SSL+IRC
[slashnet]
client = yes
accept = 58697
connect = us.slashnet.org:6697
@nealey
nealey / djb2hash.awk
Last active May 29, 2022 12:33
djb / dbj2 hash in awk
function ord(c) {
for (i = 0; i < 256; i += 1) {
if (sprintf("%c", i) == c) {
return i
}
}
return 256
}
function hash(str) {
@nealey
nealey / GoldenClicker.js
Last active October 1, 2021 21:55
A Cookie Clicker mod to automatically click the golden cookie
let Millisecond = 1
let Second = 1000 * Millisecond
let Minute = 60 * Second
let Hour = 60 * Minute
class GoldenClicker {
heartbeat() {
for (let s of Game.shimmers) {
if (s.type == "golden") {
s.pop()
/* Solarized */
#define SOL_BASE03 0x002b36ff
#define SOL_BASE02 0x073642ff
#define SOL_BASE01 0x586e75ff
#define SOL_BASE00 0x657b83ff
#define SOL_BASE0 0x839496ff
#define SOL_BASE1 0x93a1a1ff
#define SOL_BASE2 0xeee8d5ff
#define SOL_BASE3 0xfdf6e3ff
#define SOL_YELLOW 0xb58900ff
@nealey
nealey / README.md
Last active November 3, 2019 22:03
feisworx.com mobile-friendlier (tampermonkey user script)

Feisworx Mobile Mode

This fiddles around with FeisWorx pages to make them a little more usable on mobile devices like phones and tablets.

Danger Will Robinson

Loading things like TamperMonkey allows scripts to mess with your web pages. This is almost always a bad idea. If you aren't a developer who can read JavaScript, or know one who can look this over to make sure I'm not doing something awful, you should steer clear of this and all other user scripts.

How To Install

/* e-paper display lib */
#include <GxEPD.h>
//Use the GxGDEW029T5 class if you have Badgy Rev 2C. Make sure you are on GxEPD 3.05 or above
#include <GxGDEW029T5/GxGDEW029T5.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
#include <Fonts/FreeSansBold9pt7b.h>
#include <Fonts/FreeSansBold12pt7b.h>
#include <Fonts/FreeSansBold24pt7b.h>
@nealey
nealey / dvdrip.sh
Created April 20, 2019 19:27
Rip (transcode) DVD chapters into individual mp4 files
#! /bin/sh
# If you have more than 50 chapters, you'll need to bump this value up.
# It doesn't hurt anything to have the number too high, though.
for i in $(seq -w 1 50); do
echo "== Chapter $i"
HandBrakeCLI \
--input /mnt/chromeos/removable/No\ Label/ \
--crop 0,0,0,0 \
--chapters $i \