Skip to content

Instantly share code, notes, and snippets.

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 8, 2024 21:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@scyto
scyto / proxmox-tb-net.md
Last active May 8, 2024 21:41
Thunderbolt Networking Setup

Thunderbolt Networking

this gist is part of this series

NOTE FOR THIS TO BE RELIABLE ON NODE RESTARTS YOU WILL NEED PROXMOX KERNEL 6.2.16-14-pve OR HIGER

This fixes issues i bugged with the thunderbolt / thunderbolt-net maintainers (i will take everyones thanks now, lol)

Install LLDP - this is great to see what nodes can see which.

  • install lldpctl with apt install lldpd
@vielhuber
vielhuber / script.sh
Last active May 8, 2024 21:37
ffmpeg: Video convert m2ts to mp4, mp4 to webm, mp4 to ogv #tools
MP4 TO MP4 (MEDIUM)
ffmpeg -i input.mp4 -b 1000000 output.mp4
M2TS TO MP4
ffmpeg -i input.m2ts -vcodec libx264 -crf 20 -acodec ac3 -vf "yadif" output.mp4
MP4 TO WEBM (HIGH)
ffmpeg -i input.mp4 -aq 5 -ac 2 -qmax 25 -threads 2 output.webm
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k -c:a libopus output.webm
@scyto
scyto / docker-swarm-architecture.md
Last active May 8, 2024 21:36
My Docker Swarm Architecture
@NordicGamerFE
NordicGamerFE / performancemodsold.md
Last active May 8, 2024 21:36
Performance mods 1.8.9 and below

Performance Mods

A list of performance-enhancing mods for 1.8.9 and below.

Any suggestions/complaints?
Join our discord or use the gist comments.

Mods marked as "Dangerous" might be unstable, and cause some unexpected behaviour.

Home

Forge 1.8.9

@kostyay
kostyay / Caddyfile
Created April 16, 2024 20:47
Rails app with Postgres and Caddy on Hetzner VPS with Docker Compose
{
email my@email.com
}
my.host.com {
encode zstd gzip
log {
output stdout
}
@macklinb
macklinb / Unity-XORShift.md
Created February 25, 2021 11:26
C# implementation of UnityEngine.Random with (almost) 1-to-1 parity

This is a partial C# implementation of UnityEngine.Random with (almost) 1-to-1 parity.

Unity uses Xorshift for psuedorandom number generation. In particular Xorshift128, which uses a state consisting of four unsigned 32-bit integer values. The state is initialized in UnityEngine.Random.InitState using a signed 32-bit integer seed, which is shuffled around with a technique similar to the way a Mersenne Twister is initialized.

This has been tested as far back as Unity 4.7.0f1, and as recent as Unity 2020.1.17f1.

Notes

  • Huge thanks to MoatShrimp for figuring out how Unity initializes the Xorshift state parameters in InitState, and floating point generation.
  • C# - As below. Values may differ in .NET 5.0, but thankfully Unity doesn't yet support that.
  • JavaScript - Check out MoatShrimp's JS implemention (and neat Undermine loot lookup tool) here:
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 21:34
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@amasucci
amasucci / cloud-config.sh
Created March 14, 2023 16:50
Terraform Automation with GitHub Workflows and Workload Identity Federation
export PROJECT_ID="INSERT-PROJECT-ID"
export PROJECT_NUMBER="INSERT-PROJECT-NUMBER"
export STATE_BUCKET="INSERT-STATE-BUCKET-NAME"
gcloud storage buckets create gs://$STATE_BUCKET --project=$PROJECT_ID --default-storage-class=STANDARD --location=EUROPE-WEST1 --uniform-bucket-level-access
gcloud iam workload-identity-pools create github \
--project=$PROJECT_ID \
--location="global" \
@amasucci
amasucci / Workload-identity-federation.md
Created May 29, 2023 14:15
How to configure workload identity federation in GCP and GitHub

workload-identity-federation

We have two buckets:

  • dev-storage-2023
  • prd-storage-2023
export PROJECT_ID="blue-project-378421"
export PROJECT_NUMBER="32549352397"