Skip to content

Instantly share code, notes, and snippets.

View nogweii's full-sized avatar
🍀

Nogweii nogweii

🍀
View GitHub Profile
@nathanmcgarvey-modopayments
nathanmcgarvey-modopayments / ephemeralContainer.zshrc
Last active February 29, 2024 14:45
Launch ephemeral alpine container with copied volumeMounts, env, and envFrom
function ephemeralContainer() {
pod_name="$1"
container_name="$2"
namespace="${3:-default}"
if [[ -z "${pod_name}" || -z "${container_name}" ]]; then
echo "requires pod name as first argument and container name as second argument"
return 1
fi
pod_json="$(kubectl -n "${namespace}" get pod "${pod_name}" -o json)"
if [[ -z "${pod_json}" ]]; then
@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active March 18, 2024 05:21
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
@BlackPropaganda
BlackPropaganda / U2F_ssh_ecdsa.txt
Created September 22, 2022 21:58
U2F ECDSA SSH Key Generation using Flipper Zero
#
# U2F SSH key generation and installation guide
#
# install U2F libraries on client machine
sudo apt-get install pamu2fcfg libpam-u2f
#
# Currently, there are only two ciphers that support
# 'special keys' or (sk) this is the notation in the
@valiant-code
valiant-code / IronMon-Rules.md
Last active April 16, 2024 19:35
IronMon Rules

The IronMON Challenge

The IronMon challenge is a Pokémon Randomizer Challenge run created by Iateyourpie. Designed to make experiencing the randomizer fun and challenging, while taking away the wild Pokémon grind that come with some other challenges. It was originally made for Fire Red / Leaf Green but the rules can be applied/adjusted for other games as well. If you're interested to find out more about IronMon, join our Discord community!

IronMon has varying levels of difficulties, to keep it more approachable but also provide the toughest challenge possible for those who want it.

@mattmc3
mattmc3 / optparsing_demo.zsh
Last active April 5, 2024 21:22
Zsh option parsing example
# Manual opt parsing example
#
# Features:
# - supports short and long flags (ie: -v|--verbose)
# - supports short and long key/value options (ie: -f <file> | --filename <file>)
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>)
# - does NOT support short option chaining (ie: -vh)
# - everything after -- is positional even if it looks like an option (ie: -f)
# - once we hit an arg that isn't an option flag, everything after that is considered positional
function optparsing_demo() {
@lloeki
lloeki / Gemfile
Last active January 17, 2022 08:53
Bundler 1.17 / Rubygems 3.0 linux-musl resolution
# This fixes the platform value for rubygems 3.x, allowing bundler and gem install
# to properly resolve to: a) linux on linux, and b) to linux-musl on linux-musl
# with a fallback to linux if there's no linux-musl gem published.
#
# This works when there is no extension to build that would try to query the
# current Ruby platform through Rubygems (because building an extension spawns an
# independent Ruby interpreter)
#
# The second file in this gist is a patch to apply to Rubygems 3.0.3.1, e.g for
# official Docker Hub images:
@robvanderleek
robvanderleek / README.md
Last active March 11, 2024 19:56
AWS SSO command-line login script (that also updates .aws/credentials)

AWS SSO command-line login script (that also updates .aws/credentials)

The AWS Command Line Interface tool from Amazon (for macOS available here on Homebrew) makes it possible to login to AWS through a SSO (Single Sign-On) identity provider such as Okta. However, if you login via "aws sso login" the AWS credentials file (located at ~/.aws/credentials) is not updated, this is a problem for tools/libraries that rely on that file.

This script is a wrapper around aws sso login that also updates the .aws/credentials file. It only requires AWS CLI and Python 3 to run.

Configuration

Make sure your .aws/config file has a section (or multiple sections) that have SSO configuation options. For example:

@Phate6660
Phate6660 / lobsters-dark.css
Last active January 16, 2022 08:42
A dark userstyle for https://lobste.rs that aims to be simple and robust.
body, textarea, input, button {
font-size: 11px;
}
a {
color: green;
}
p>a {
color: green !important;