Skip to content

Instantly share code, notes, and snippets.

View undefinedhuman's full-sized avatar

Alexander Padberg undefinedhuman

View GitHub Profile
@undefinedhuman
undefinedhuman / setup.sh
Created January 11, 2023 23:59 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@undefinedhuman
undefinedhuman / kns.sh
Last active September 19, 2023 15:32
[k8s] Namespace switch alias - This script can be included in the .zshrc to have an alias for switching Kubernetes namespaces with an optional context.
kns() {
local contextFlag="--current"
local namespace=""
while [[ $# -gt 0 ]]; do
case "$1" in
-c|--context)
if [[ -z "$2" ]]; then
echo "Usage: kns [-c|--context <context>] <namespace>"
return 1
@undefinedhuman
undefinedhuman / Timeline.java
Created September 23, 2023 22:21
[Java] [Swing] Timeline component
class Keyframe {
int start, end;
public Keyframe(int start, int end) {
this.start = start;
this.end = end;
}
}
@undefinedhuman
undefinedhuman / KeyframeTimeline.java
Last active September 24, 2023 22:44
[Java] [Swing] Keyframe timeline component
import de.undefinedhuman.projectcreate.engine.utils.Utils;
import de.undefinedhuman.projectcreate.engine.utils.math.Vector2i;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
class Keyframe {