Skip to content

Instantly share code, notes, and snippets.

View gnat's full-sized avatar
:shipit:
ez pz lemon squeezy

Nathaniel Sabanski gnat

:shipit:
ez pz lemon squeezy
View GitHub Profile
@gnat
gnat / davinci_resolve_linux.md
Last active April 27, 2025 06:42
Davinci Resolve Install Linux

Davinci Resolve Nvidia on Linux / Ubuntu / Kubuntu 24.04 25.04

  • Install
  • Remove old built-in libraries sudo rm -r /opt/resolve/libs/libgio* ; rm -r /opt/resolve/libs/libglib* ; rm -r /opt/resolve/libs/libgmodule* ; rm -r /opt/resolve/libs/libgobject*
  • Restore control bars on KDE Window Rules ➡️ Description / Class: resolve ➡️ Appearance & fixes: No titlebar and frame = NO ➡️ Force On
  • No sound? sudo apt install pipewire-alsa Reboot.
  • No .mp4 rendering (h.264 / h.265) ? Microsoft / Apple license these. Free: No ): Studio: Yes.
    • Studio: Awesome NVENC accellerated AV1 support in .MP4 using 4000+ series Nvidia on Linux.
@gnat
gnat / dhcp_ubuntu.md
Created February 10, 2025 23:49
Release Renew IP / DHCP on Ubuntu Kubuntu 24.04 24.10 25.04

Desktop? Can use the Networks GUI in the tray.

Ubuntu uses NetworkManager in 2025.

Refresh IP using NetworkManager:

  • nmcli connection show
    • Copy UUID.
  • nmcli connection down <UUID>
  • nmcli connection up <UUID>
@gnat
gnat / index.html
Last active August 24, 2024 22:13
<html>
<head>
<title>iOS test</title>
</head>
<body>
<thing>Yo</thing>
<thing_test>Yo</thing_test>
<thing_-test>Yo</thing_-test>
<_thing_test>Yo</_thing_test>
<-thing_test>Yo</-thing_test>

Programming Language Design

Do I need a tokenizer?

Many "languages" can get away without one, however, if your language has one of:

  • strings
  • comments
@gnat
gnat / flash_as2_vs_as3.md
Last active January 23, 2025 07:08
Why AS3 sucks and was a terrible direction for Flash (Actionscript 2 vs Actionscript 3)

Why AS3 was a terrible direction for Flash

https://www.youtube.com/watch?v=sGzulYJnTCo

tl;dr

  • Events were no longer cleaned up automatically in AS3. Remove a MovieClip, but the events would remain and continue listening / firing: major cause of project killing bugs and time wasters. AS2 cleaned up everything automatically.
  • Simple calls in AS2 are often blown up to multiple lines involving multiple objects in AS3. DX was not emergent anymore.
  • Too much complexity imposes copy/paste (or autocomplete) for experienced programmers.
    • Long term lowers maximum scripted functionality of app/game.
  • AS2 code was scoped 1:1 with what you could see.
@gnat
gnat / index.html
Last active July 7, 2024 01:55
3D Card (Surreal + CSS Scope Inline)
<html>
<head>
<script src="https://gnat.github.io/css-scope-inline/script.js"></script>
<script src="https://gnat.github.io/surreal/surreal.js"></script>
</head>
<body>
<style>
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
body { font-family: system-ui, sans-serif; perspective: 1500px; background: linear-gradient(#666, #222); }
@gnat
gnat / photoshop_linux.md
Last active April 26, 2025 11:14
Photoshop on Linux

🔥 First, consider doing the work in:

  • Figma (linux fonts: 🔴 web: 🟢 saves: 🔴 oss: 🔴)
    • Penpot (linux fonts: 🟢 web: 🟢 saves: 🟢 oss: 🟢)
    • Lunacy (linux fonts: 🟢 web: 🔴 saves: 🟢 oss: 🔴)
  • Photopea (slow for large images)
  • Krita (text tools eventually in 5.3)

Photoshop is a classic UX, but it'll be less interoperable than the above.

Install

@gnat
gnat / sublime_build_on_save.md
Last active September 12, 2023 08:35
Sublime Build on Save

Sublime Build on Save

Sublime in 2023 only has "Save on Build" not "Build on Save" built in.. use: https://github.com/alexnj/SublimeOnSaveBuild

Setting up a build.

  • Tools ➡️ Build System ➡️ New Build System...

run_on_save.sublime-build

{
@gnat
gnat / index.html
Last active September 9, 2023 07:28
Inline Stylus CSS demo
<html>
<head>
<title>Inline real time stylus demo</title>
<script>
function stylus_to_css(string){
var cursor=0
// Remove excess indentation (dedent).
var indent=''
while (cursor < string.length) {
@gnat
gnat / project_layout.md
Last active April 10, 2025 12:55
General Project Layout

Why a base project layout?

  • ⭐ Works for many different project types: game, website, app.
  • /main lets us have supporting files excluded from Caddy, Godot, etc with zero extra config!
  • ⭐ Avoids industry jargon.

Use ideas you like, leave ideas you dislike. The intention is to be simple adaptable starting point.

Project Layout