Skip to content

Instantly share code, notes, and snippets.

View dieseltravis's full-sized avatar
🆗
I'm ok

Travis Hardiman dieseltravis

🆗
I'm ok
View GitHub Profile
@dieseltravis
dieseltravis / josh-allen.svg
Last active October 16, 2023 04:14
Josh Allen's "Potato" (2018) but recreated in a simpler svg format. Note: the 7 <path> nodes could be reduced to 4
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dieseltravis
dieseltravis / emojis-hash.json
Last active August 31, 2023 06:41
get-emoji-kitchen-images.ps1 : download all emoji combination images from the emoji kitchen
{
"u1faa6": "headstone",
"u0038-ufe0f-u20e3": "keycap-8",
"u1f469-u200d-u1f9b1": "woman-curly-hair",
"u1f96b": "canned-food",
"u1f362": "oden",
"u2620-ufe0f": "skull-and-crossbones",
"u1f1ff-u1f1f2": "flag-zambia",
"u1f5e8-ufe0f": "left-speech-bubble",
"u1f3ae": "video-game",
@dieseltravis
dieseltravis / mast.sh
Last active August 31, 2023 05:26
script that gets latest from hodgesmr/mastodon_digest, generates a digest, and opens it in firefox
#!/bin/bash
set -euo pipefail
INFO='\e[38;05;14m'
NC='\033[0m' # No Color
# https://github.com/hodgesmr/mastodon_digest
cd ~/Projects/github/mastodon_digest/
echo -e "${INFO}🐘 getting latest...${NC}";
git fetch && git pull
echo -e "${INFO}generating content index...${NC}";
@dieseltravis
dieseltravis / TimelineListener.py
Created November 26, 2022 23:59
TimelineListener class using StreamListener from Mastodon.py
#!/usr/bin/python3
from mastodon import Mastodon, StreamListener
# etc...
class TimelineListener(StreamListener):
def __init__(self):
print("Listener created.")
def on_notification(self, notification):
@dieseltravis
dieseltravis / 🐘💨.css
Last active November 20, 2022 06:10
replace "publish" buttons on some mastodon domains with "🐘💨"
/*
https://userstyles.world/style/7330/default-slug
https://gist.github.com/dieseltravis/77c99bef0312486639d5aad46139eb22
*/
a.button[href='/publish'],
.compose-form__publish-button-wrapper button.button.button--block {
display: flex;
align-items: center;
justify-content: center;
@dieseltravis
dieseltravis / itch-deploy.sh
Last active August 31, 2023 05:25
Deploying Godot exports to Itch.io using Butler
#!/bin/bash
set -euo pipefail
# itch.io user name
user=travishardiman
# itcg.io project name
project=turtles
itch="$user/$project"
# base folder where each of the export folders are
folder=~/Projects/godot-projects/turtlescript/bin/deploy
# project.godot file
@dieseltravis
dieseltravis / hexagon-dinguses.css
Created January 28, 2022 16:49
hexagon dingus avatar CSS
div[aria-label='NFT profile picture and Opens NFT details'] > div,
div[aria-label='NFT profile picture'] > div {
background-image: url('data:image/jpeg;base64,/9j/4QBKRXhpZgAATU0AKgAAAAgAAwEaAAUAAAABAAAAMgEbAAUAAAABAAAAOgEoAAMAAAABAAIAAAAAAAAAAAEsAAAAAQAAASwAAAAB/9sAQwAgFhgcGBQgHBocJCIgJjBQNDAsLDBiRko6UHRmenhyZnBugJC4nICIropucKDaoq6+xM7Qznya4vLgyPC4ys7G/9sAQwEiJCQwKjBeNDRexoRwhMbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbG/8IAEQgAgACAAwEiAAIRAQMRAf/EABgAAAMBAQAAAAAAAAAAAAAAAAABAgME/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/9oADAMBAAIQAxAAAAHkqSByxpot4he3MzpWW0SqKvp5CWBvWZV5rmqCRghgmBrrzdUJirQ4A6ojrlxOhzXLPZByz15JgqViuLM62VnQcuUdG3JrNdDwua0jFWbRDTKdMrGrRk0WMQbax1Z1nVTLC0sxW0VllsIlrgYAayDR0b82+dVFCq4IqGVAZ2dHIpQAsYIrs4eqW6mpqM95BXiKGXOSasABpoNJZ2mWmdtPIeSLAbTOOjnsFQf/xAAjEAACAgEEAgIDAAAAAAAAAAAAAQIRIAMQEiETMTBBIiNA/9oACAEBAAEFAslR+K2iO9rPZFd2LG8LOQpIdHRZbOKKiVE6+FP+HmkvKjzHAqJNoqzgcGcGcWVj9UzhIt7RzawUuJ5pHmkcNNH6kdc83lOVysj2UKxneEtkSWMDiIZRRWz2ianrDSwW72XtGpjpllliLwXv0m7eGn7zezyTpiaieSI5xL3fwwdqu6R
@dieseltravis
dieseltravis / Add-Firewall-Ip.ps1
Created October 14, 2021 15:24
Powershell script to add an IP address to the list of IPs in Remote Desktop firewall rules
# From cmd:
# powershell.exe -file Add-Firewall-Ip.ps1 -newIp "8.8.8.8"
# From Powershell:
# & ./Add-Firewall-Ip.ps1 -newIp "8.8.8.8"
param($newIp = "")
$rules = Get-NetFirewallRule -DisplayName "Remote Desktop*"
foreach ($r in $rules) {
# get list of IPs as an array
$ips = @(($r | Get-NetFirewallAddressFilter).RemoteAddress)
@dieseltravis
dieseltravis / alpaca.js
Last active September 11, 2021 04:04
find 10-digit primes in verious hash values
// this doesn't work:
/*
h = this.GetHash();
x = {last 10-digit prime found in consecutive digits of h in base-10};
requests.post('https://api.alpaca.markets/v2/puzzle/202108/solve', json={'answer': account.id.int * x, 'email': your_waitlist_email})
*/
// get basic hashes with Powershell
//@('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5') | % { Get-FileHash -Path ~\Downloads\110-days-after-lehman-collapsed.jpg -Algorithm "$_" }
@dieseltravis
dieseltravis / bookmarklet.html
Last active April 14, 2021 05:34
rotate all the post images on mltshp clockwise
<!doctype html>
<html><body>
<a href='javascript:[...document.querySelectorAll(".the-image img")].forEach(img=>img.setAttribute("style",(img.getAttribute("style")||"").replace(/transform:rotate\((\d+\.?\d*)turn\)/,(m,p1)=>"transform:rotate("+(+p1+0.25)+"turn)")||"transform:rotate(0.25turn)"));'>🔃</a>
</body></html>