Skip to content

Instantly share code, notes, and snippets.

# Source: https://gist.github.com/fca66711eaf0440483eba42ee013311a
#####################################
# How to Apply GitOps to Everything #
# Combining Argo CD and Crossplane #
# https://youtu.be/yrj4lmScKHQ #
#####################################
# Referenced videos:
# - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
@professorik
professorik / admob.gd
Created July 16, 2023 13:56
AdMob Godot 4.1
@icon("res://admob-lib/icon.png")
class_name AdMob
extends Node
signal banner_loaded
signal banner_failed_to_load(error_code)
signal interstitial_failed_to_load(error_code)
signal interstitial_loaded
signal interstitial_opened
signal interstitial_closed
@andreacoi
andreacoi / .zshrc
Created December 27, 2021 18:49
ZSH - Kali Linux like configuration file
# ~/.zshrc file for zsh interactive shells.
# see /usr/share/doc/zsh/examples/zshrc for examples
setopt autocd # change directory just by typing its name
#setopt correct # auto correct mistakes
setopt interactivecomments # allow comments in interactive mode
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
setopt nonomatch # hide error message if there is no match for the pattern
setopt notify # report the status of background jobs immediately
setopt numericglobsort # sort filenames numerically when it makes sense
@jgcmarins
jgcmarins / setup-env.ts
Created April 24, 2024 20:44
vitest config with setup and process.env mock
// https://github.com/vitest-dev/vitest/issues/1575#issuecomment-1439286286
export const setup = () => {
process.env.TZ = 'UTC';
process.env.NODE_ENV = 'test';
// add process.env mocks
};
@diyfr
diyfr / readme.md
Created September 29, 2023 14:39
AdGuard Home + Traefik

edit traefik.yml

entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"
  dot: # <- ADD THIS
    address: ":853"  # <- ADD THIS
@RhetTbull
RhetTbull / vision.py
Last active April 24, 2024 21:05
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@madan712
madan712 / WindowsProcessKiller.java
Created October 31, 2013 08:44
Java program to kill a runnning windows process
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class WindowsProcessKiller {
// command used to get list of running task
private static final String TASKLIST = "tasklist";
// command used to kill a task
private static final String KILL = "taskkill /IM ";
@hizkifw
hizkifw / cloudflare-worker-youtube-dl.js
Last active April 24, 2024 21:03
Download YouTube videos with Cloudflare Worker
/**
* cloudflare-worker-youtube-dl.js
* Get direct links to YouTube videos using Cloudflare Workers.
*
* Usage:
* GET /?v=dQw4w9WgXcQ
* -> Returns a JSON list of supported formats
*
* GET /?v=dQw4w9WgXcQ&f=251
* -> Returns a stream of the specified format ID
@tomfanning
tomfanning / userdata.sh
Last active April 24, 2024 21:00
AWS EC2 userdata script to set root pw, allow pw logon, auto updates, and set selinux permissive.
#!/bin/bash -e
rootpw="mypassword"
cat /etc/ssh/sshd_config | sed "s/PasswordAuthentication no/PasswordAuthentication yes/" | sed "s/#PermitRootLogin yes/PermitRootLogin yes/" > /etc/ssh/sshd_config
echo "
MaxAuthTries 10" >> /etc/ssh/sshd_config
systemctl restart sshd
echo root:$rootpw | chpasswd