Skip to content

Instantly share code, notes, and snippets.

View andyeff's full-sized avatar

Andy F andyeff

View GitHub Profile
@andyeff
andyeff / settings.json
Created May 14, 2024 10:16
VS code "stop moaning about my cfn yaml!"
{
"yaml.customTags": [
"!And",
"!And sequence",
"!If",
"!If sequence",
"!Not",
"!Not sequence",
"!Equals",
"!Equals sequence",
@andyeff
andyeff / fixup.cmd
Created May 3, 2024 20:12
Manual fixup of yt-dlp download of live twitch stream
@echo off
if "%~1"=="" echo Filename not specified - exiting && goto :eof
ffmpeg -hide_banner -y -i %1 -c copy -f mp4 "-bsf:a" aac_adtstoasc "%~n1-fixup.mp4"
@andyeff
andyeff / whereami.go
Created April 11, 2024 13:15
Where did my app start from
package main
import (
"fmt"
"log"
"os"
"path/filepath"
)
func main() {
@andyeff
andyeff / def_vol.txt
Created June 26, 2023 13:03
media default volume (firefox)
Tired of media playing at 100% volume?
Change the media.default_volume setting in about:config to something more manageable, e.g. 0.2 !
@andyeff
andyeff / Cargo.toml
Created June 19, 2023 05:45
size-optimised rust profile
# from https://tech.lgbt/@noboilerplate/110547957199820610
[profile.release]
opt-level = 'z' # Optimize for size
lto = true # Enable link time optimisation
codegen-units = 1 # Reduce number of codegen units (?)
panic = 'abort' # Abort on panic
strip = true # Strip symbols
@andyeff
andyeff / shorts.js
Created May 15, 2023 15:17
greasemonkey youtube shorts to normal
// ==UserScript==
// @name Youtube Shorts to normal page
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Gives you the normal page
// @author You
// @match https://www.youtube.com/shorts/*
// ==/UserScript==
(function() {
@andyeff
andyeff / Cargo.toml
Last active September 13, 2023 08:43
Clearing Windows 10 Clipboard
[package]
name = "clearclip"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[dependencies.windows]
@andyeff
andyeff / check_cert.py
Created February 10, 2022 16:31
Python SSL Cert Checker for AWS Lambda
"""
SSL Cert inspection function
OpenSSL is available from the PyOpenSSL package
"""
import json
import logging
from datetime import datetime
import boto3
from botocore.exceptions import ClientError
@andyeff
andyeff / get-gh-cli.sh
Created March 11, 2021 13:28
Get the URL for latest github cli release - debian
curl https://api.github.com/repos/cli/cli/releases/latest | jq '.assets[] | select(.name | contains("amd64.deb") ) | .browser_download_url'
@andyeff
andyeff / pyenv-for-dev.txt
Created March 2, 2021 14:15
Configuring Pyenv
---
Installing pyenv for arbitrary python version development
# create a user, add to sudoers
useradd andy
visudo # do changes
su - andy
sudo dnf -y install make gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel
curl https://pyenv.run | bash