Skip to content

Instantly share code, notes, and snippets.

@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>
@dieseltravis
dieseltravis / inline.js
Last active January 31, 2021 20:48
get t.co destination URL
document.addEventListener("mouseover", function tCo(ev) {
const l = ev.target.closest("a[href^='https://t.co/']");
// only run when target is a link with a t.co href
if (l) {
fetch(l.href, { method: "GET" })
.then(function fetchResponse(res) { return res.text(); }) // get response html
.then(function fetchHtml(html) {
//console.log("html:", html);
if (html) {
const u = new DOMParser() // convert response to node
@dieseltravis
dieseltravis / mltshp-420.svg
Last active October 24, 2020 02:20
for @/ba on mltshp by request
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dieseltravis
dieseltravis / mltshp-canada.svg
Last active October 23, 2020 03:36
a Mltshp version of the Canadian flag, CC0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dieseltravis
dieseltravis / functions.sql
Last active March 6, 2020 18:35
Parse aspnet_Profile PropertyNames and PropertyValuesString data with TSQL original source is https://www.karpach.com/Get-asp-net-profile-value-MS-SQL-database-using-T-SQL.htm
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Description: parse aspnet_profile, see also [dbo].[GetProfileElement] via https://www.karpach.com/Get-asp-net-profile-value-MS-SQL-database-using-T-SQL.htm
-- =============================================
CREATE FUNCTION [dbo].[GetElement]
@dieseltravis
dieseltravis / tab.txt
Created February 29, 2020 06:14
tab test
x
c c
t t t