Skip to content

Instantly share code, notes, and snippets.

@thimslugga
thimslugga / setup-docker-al2023.md
Last active February 15, 2025 21:25
Setup Docker on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

The following guide is for setting up Docker with docker-compose v2 on Amazon Linux 2023. The steps are intendend for AL2023 on EC2 but should mostly work for the AL2023 VMs running on other hypervisors.

Overview of Updating Amazon Linux 2023

Check for new updates

Get the hosts current Amazon Linux 2023 release:

@volfegan
volfegan / Ocean_waves_XOR.pde
Last active May 27, 2022 18:20
High altitude view of some 8bit XOR blue ocean waves
//remix https://www.dwitter.net/d/23922
float a, b, d, m, r, w, z, t, X, Y;
void setup() {
size(1280, 720);
noStroke();
fill(0,128,255);
}
void draw() {
background(-1);
t+=.02;
@selalipop
selalipop / GameState.cs
Last active September 9, 2022 20:29
Using Server-Sent-Events in Unity
using Newtonsoft.Json;
///Use of Newtonsoft.Json is fully optional
namespace Backend
{
[JsonObject]
public struct GameState
{
[JsonProperty("maxPlayers")] public int MaxPlayers;
[JsonProperty("imposterCount")] public int ImposterCount;
#!/bin/bash
#
# This script will launch and configure a step-ca SSH Certificate Authority
# on AWS in an Ubuntu / Debian-based VM with OIDC and AWS provisioners
#
# See https://smallstep.com/blog/diy-single-sign-on-for-ssh/ for full instructions
OIDC_CLIENT_ID="[OAuth client ID]" # from Google
OIDC_CLIENT_SECRET="[OAuth client secret]" # from Google
ALLOWED_DOMAIN="[the domain name of accounts your users will use to sign to Google]"
@artizirk
artizirk / gnupg_scdaemon.md
Last active February 28, 2025 08:37
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@kingcody
kingcody / teensyduino.sh
Created December 11, 2018 07:34
Update teensyduino.sh PID Detection
#!/bin/bash
sleep 2
export HOME=$2
$1 & TEENSYPID=$!
sleep 5
xdotool search --class "teensyduino" \
windowfocus \
@keijiro
keijiro / 00_blot6.md
Created March 8, 2018 13:36
KodeLife fragment shader sketch

gif

@codingtim
codingtim / UdpServer.kt
Created April 5, 2017 10:44
Simple udp server with netty 4.1 and kotlin
import io.netty.bootstrap.Bootstrap
import io.netty.channel.ChannelHandlerContext
import io.netty.channel.SimpleChannelInboundHandler
import io.netty.channel.nio.NioEventLoopGroup
import io.netty.channel.socket.nio.NioDatagramChannel
import io.netty.util.CharsetUtil
import io.netty.util.concurrent.DefaultThreadFactory
import kotlinx.coroutines.experimental.async
import kotlinx.coroutines.experimental.newFixedThreadPoolContext
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active February 27, 2025 01:41
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@NeuroWinter
NeuroWinter / ffmpeg cheatsheet for glitching
Last active February 12, 2025 11:20
ffmpeg cheatsheet for glitching
FFMPEG '-i', file, '-c:v', 'libopenjpeg', "jpeg2000\\" + name + ".jp2"\
Convert image to jpeg2000
ffmpeg -i in.png -c:v libopenjpeg out.jp2
Hex Edit out.jp2
ffmpeg -i in.jp2 -c:v png out.png
General Edit
ffmpeg -i input.avi -c:v mpeg2video -g 999 -q:v 1 output.avi
*edit in avidemux/whatever*