Skip to content

Instantly share code, notes, and snippets.

@nimjor
nimjor / argocd-labeler-plugin.md
Created January 14, 2025 17:09
ArgoCD labeler plugin via kustomize

ArgoCD Labeler Plugin

Ever wish you could pass some label to an ArgoCD application and have every child resource pick up that label? This is probably of most interest to cluster operators who may not directly control the contents of manifests deployed to their clusters via ArgoCD, but need a way to enforce some standard labeling scheme.

The solution? A simple ArgoCD plugin, easier to setup than you might think.

Write the plugin.yaml

@thesamesam
thesamesam / xz-backdoor.md
Last active April 7, 2025 09:15
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import matplotlib.pyplot as plt
from matplotlib import animation, rc
rc('animation', html='html5')
plt.style.use('seaborn-whitegrid')
@alexrecuenco
alexrecuenco / chromecast-volume.py
Last active December 16, 2023 23:19
Using PyChromecast to change the volume of a chrome cast device (Useful since VLC doesn't provide volume controls)
#!/usr/bin/env python3
# requirement: PyChromecast==12.1.4
# version 0.1
import pychromecast
import argparse
from typing import List, Union
import dataclasses
UP = "up"
DOWN = "down"
@alexrecuenco
alexrecuenco / multiple_ssh_setting.md
Created January 18, 2019 14:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@maxfischer2781
maxfischer2781 / async_read.py
Last active April 7, 2025 02:10
example implementation for an async event loop
import time
import select
import socket
class AsyncSleep:
"""Event and action to sleep ``until`` a point in time"""
def __init__(self, until):
self.until = until
@VictorTaelin
VictorTaelin / promise_monad.md
Last active October 24, 2024 01:25
async/await is just the do-notation of the Promise monad

async/await is just the do-notation of the Promise monad

CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.

In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.

First, let's illustrate the 3 styles by implementing

@steveosoule
steveosoule / wget--crawl.sh
Created May 31, 2017 17:05
Wget - Options & Sample Crawler
#!/bin/sh
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com
### V1
# wget \
# --recursive \
# --no-clobber \
# --page-requisites \
# --html-extension \