Skip to content

Instantly share code, notes, and snippets.

@DeflateAwning
DeflateAwning / AWS Batch Upgrades.user.js
Last active December 2, 2024 20:07
Tampermonkey script to improve AWS Batch: Calculate AWS Batch job time since started and total execution time (on the "Job attempts" tab). Set the tab title to include the job name and execution status. Fix the bug where you logout and lose the job you had open. Add links to log streams, with commands to easily download them locally.
// ==UserScript==
// @name AWS Batch Upgrades
// @namespace https://gist.github.com/DeflateAwning/d8d42a082cb27b7d01df751d0dc26f31
// @version 0.4.1
// @description Calculate AWS Batch job time since started and total execution time (on the "Job attempts" tab). Set the tab title to include the job name and execution status. Fix the bug where you logout and lose the job you had open. Add links to log streams, with commands to easily download them locally.
// @author DeflateAwning
// @match https://*.console.aws.amazon.com/batch/home?*
// @grant GM_addStyle
// ==/UserScript==
@DeflateAwning
DeflateAwning / calling_var_name.py
Created August 1, 2023 17:19
A simple python function to get the name of a variable from a calling scope
def calling_var_name(obj) -> str:
""" Returns the name of the variable that was passed in. """
caller_frame = inspect.currentframe().f_back.f_back
while hasattr(caller_frame, 'f_locals'):
list_of_obj_names = ([name for name, value in caller_frame.f_locals.items() if value is obj])
if len(list_of_obj_names) > 0:
return list_of_obj_names[0]
{
"packages": [
{
"name": "ATTinyCore",
"maintainer": "Spence Konde",
"websiteURL": "https://github.com/SpenceKonde/ATTinyCore",
"email": "",
"help": {
"online": ""
},
@DeflateAwning
DeflateAwning / pixieset-scrape.js
Last active April 24, 2025 15:57 — forked from antiops/pixieset-scrape.js
pixieset.com dumper
/* pixieset.com full size image scraper
*
* Rips all images in highest quality
*
* To use, scroll to the very bottom of the album and press F12 then paste the below snippet in and press enter.
* The full file list will be copied to your clipboard. You can use jdownloader to easily download the full list.
*/
(() => {
const data = document.querySelectorAll('img')
@DeflateAwning
DeflateAwning / Last Updated Table.m
Created June 27, 2022 15:33
Power BI - Last Updated Table
let
Source = #table(type table[Refresh Date Time=datetime], {{UTC_to_MountainTime(DateTimeZone.RemoveZone(DateTimeZone.UtcNow()))}}),
#"Add Date Only Col" = Table.AddColumn(Source, "Refresh Date", each Date.From([Refresh Date Time])),
#"Add Date Month Name" = Table.AddColumn(#"Add Date Only Col", "Month Name", each Date.MonthName([Refresh Date])),
#"Add 'Refresh Date Time (UTC)'" = Table.AddColumn(#"Add Date Month Name", "Refresh Date Time (UTC)", each DateTimeZone.RemoveZone(DateTimeZone.FixedUtcNow()))
in
#"Add 'Refresh Date Time (UTC)'"
@DeflateAwning
DeflateAwning / Startpage Upgrades.user.js
Last active March 27, 2023 06:22
Tamper Monkey script to hide ads and add links to Startpage searches
// ==UserScript==
// @name Startpage Upgrades
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Hide Ads on Startpage search results page, add links to other search engines, set title tag better
// @author You
// @include https://startpage.com/*
// @include https://*.startpage.com/*
// @run-at document-idle
@DeflateAwning
DeflateAwning / google-home-issues.md
Last active June 27, 2022 15:34
My complaints about the Google Home (or Nest or whatever)

Google Home Complaints

  • In Spotify, it doesn't cache enough music. Intermitent network outages (<15 seconds) are noticable with pauses in the music.
  • Sometimes randomly plays on other households' devices. The number of times I've wanted it to play on another household's device is 0.
    • Not on my IP subnet? Don't control that device!
@DeflateAwning
DeflateAwning / Setup-copyq.md
Last active February 20, 2025 13:53
Guide to setup copyq clipboard manager

Setup copyq

This guide details how to setup copyq on Ubuntu/Debian systems to behave at least as well as Windows+V on Windows.

Setup Instructions

  1. Install with sudo apt update && sudo apt install copyq.
  2. Launch copyq from the start menu or with copyq.
  3. Go File > Settings > Check "Autostart".
  4. Go File > Commands/Global Shortcuts > Add > Show/hide main window > Ok > Click the plus button next to "Global Shortcut" > Press Windows+V (aka Super+V).

Step 3: Profit

Random Color =
VAR minColorVal = 128
VAR cR =
RANDBETWEEN ( minColorVal, 255 )
VAR cG =
RANDBETWEEN ( minColorVal, 255 )
VAR cB =
RANDBETWEEN ( minColorVal, 255 )
VAR RedP0 =
@DeflateAwning
DeflateAwning / LookupClosestLatLong.bas
Created April 23, 2021 21:16
An Excel VBA macro used to jump to a row of a spreadsheet containing a latitude and a longitude column, where that row is closest to a target lat/long.
Option Explicit ' require strict variable 'dim' statements to avoid typos
Public Sub LookupClosestLatLong()
' Runs a procedure that prompts the user a few times, and takes them to the row of a pipe tally closest to some input coords.
' @since 2021-04-15
' Note to self: Range.Cells(row number, col number) is 0-index. Cells(2,1) = B3. Good luck.
Dim LatColNum As Long
Dim LonColNum As Long