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 / 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 March 16, 2024 08:46
Why AS3 sucks and was a terrible direction for Flash (Actionscript 2 vs Actionscript 3)

Why AS3 was a terrible direction for Flash

tl;dr

  • AS3 requires you be an expert in it.
    • No longer accessible to people without a programming focus (artists).
      • Previously possible projects become too difficult in a reasonable timeframe.
      • I teach Flash to designers [...] the threshold of entry as well as the intimidation factor became too high for design students. What they want to do is make something functional and beautiful without needing to spend weeks learning the basics. AS2 made that possible. AS3, to a huge degree, took it away.

      • I'm a designer. [...] I've spent incomprehensible amounts of time learning and re-learning ActionScript. When AS3 was released I took one look at it and threw in the towel. Since then my life has been much better.

  • > Surely as memory/processor constraints dwindle, programming should be becoming LESS verbose, not more. Write less, do more, quicker. Hide the complexities of common tasks in simple short terms, not have to write a hundred lines t
@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 / Dockerfile
Last active February 20, 2024 02:56 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "podman run -p 8080:8080 -it --rm \$(podman build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | tail -n1)"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@gnat
gnat / photoshop_linux.md
Last active September 17, 2023 10:25
Photoshop on Linux
  • Use Bottles flatpak.
  • Before Install
    • Menu ▶️ Runners ▶️ Get the latest GE Wine
  • Install
    • Custom ▶️ Select latest GE Wine
    • Click new bottle ▶️ Dependencies
      • atmlib
      • msxml3 msxml6
      • vcrun2008 vcrun2010 vcrun2012 vcrun2013
  • Expose directories to flatpak
@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 November 18, 2024 01:01
General Project Layout

Why a base project layout?

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

The intention is to be simple and universal; but feel free to use ideas you like, leave ideas you dislike.

Project Layout

@gnat
gnat / godot.md
Last active October 30, 2024 08:56
Godot 4 Quickstart

Godot 4 Quickstart!

Legend

  • ♻️ Workflow
  • 🛠️ Tool
  • 📦 Asset or Library
  • ⭐ Guides
  • 🎨 Pattern
  • 🔥 Hot Tip