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 / PS-BGInfo.ps1
Last active April 23, 2024 15:16
update wallpaper background image with powershell (like Sysinternals BGInfo)
# PS-BGInfo
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it.
# run as a lower priority task
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'
# Configuration:
# Font Family name
$font="Input"
@dieseltravis
dieseltravis / fetch.sh
Last active January 30, 2024 15:57
various update checking shell scripts: `~/fetch.sh` or `sudo ~/update.sh`
#!/bin/bash
set -euo pipefail
INFO='\e[38;05;14m'
NC='\033[0m' # No Color
# apt
echo -e "${INFO}apt update${NC}";
sudo apt update && echo -e "${INFO}apt list --upgradable${NC}" && apt list --upgradable;
# snap
@dieseltravis
dieseltravis / CryptoHelper.cs
Last active October 31, 2023 07:26
sample app that uses PGP Encryption using Bouncy Castle's C# API
// Assembly BouncyCastle.Crypto, Version=1.8.1.0
using Org.BouncyCastle.Bcpg;
using Org.BouncyCastle.Bcpg.OpenPgp;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Text;
namespace EncryptionSample
{
@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 / amp.mustache
Created November 21, 2016 03:29
amp mustache template for suo
<!doctype html>
<html amp lang="{{parent.lang}}" class="no-js">
<head>
<meta charset="utf-8" />
<script async src="https://cdn.ampproject.org/v0.js"></script>
<meta name="viewport" content="width=device-width,minimum-scale=1" />
<title>{{title}}</title>
<meta name="description" content="{{{coalesce description ''}}}" />
<meta name="author" content="{{{coalesce author parent.author}}}" />
<meta name="copyright" content="{{{coalesce copyright parent.copyright}}}" />
@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 / 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 / stars.md
Created January 16, 2020 17:54
Awesome Stars
@dieseltravis
dieseltravis / cs.bat
Created June 29, 2012 14:51
compile and run small blocks of C# in the command-line
@echo off
:: see if %1 exists, if not check for %1.cs
set CODE=%1
IF NOT EXIST %CODE% set CODE=%1.cs
:: init paths
set NETPATH=%systemroot%\Microsoft.NET\Framework64\v4.0.30319
set TEMP_CS=%temp%\~temp.%random%.cs
set TEMP_EXE=%temp%\~temp.%random%.exe
:: init source class
echo using System; class P { static void Main() { > %TEMP_CS%