Skip to content

Instantly share code, notes, and snippets.

View Nezteb's full-sized avatar
💣
hello world'); DROP TABLE Statuses;--

Noah Betzen Nezteb

💣
hello world'); DROP TABLE Statuses;--
View GitHub Profile
  1. Create a Droplet on e.g. DigitalOcean.
    • Make sure it has at least 1 vCPU and 1 GB of memory.
    • Mine has: 1 vCPU, 1 GB, 35 GB NVMe SSD, Premium Intel CPU, Ubuntu 24.04 LTS for $8/month on Digital Ocean
    • Choose SSH KEY AUTHENTICATION and create a new SSH key.
    • Remember the server's IPv4 address.
  2. Sign up for a Container Registry e.g. on Digital Ocean for $5/mo (the 500MB free plan won't cut it)
    • Remember your username on the registry
  3. Create an API Token at https://cloud.digitalocean.com/account/api/tokens for pushing images to the registry.
    • It needs to have these scopes: registry (4): delete, update, read, create
  4. Install Kamal with gem install kamal
@FreyaHolmer
FreyaHolmer / GpuPrinter.cginc
Last active December 24, 2024 22:34
A unity shader .cginc to draw numbers in the fragment shader - see the first comment below for example usage!
///////////////////////////////////////////////////////////////////////////////
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader
// AUTHOR: Freya Holmér
// LICENSE: Use for whatever, commercial or otherwise!
// Don't hold me liable for issues though
// But pls credit me if it works super well <3
// LIMITATIONS: There's some precision loss beyond 3 decimal places
// CONTRIBUTORS: yes please! if you know a more precise way to get
// decimal digits then pls lemme know!
// GetDecimalSymbolAt() could use some more love/precision
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@quad
quad / 0-service-start.md
Last active December 13, 2023 09:17
Why can't I start a service?

Why can't I start a service?

  • I can start a thread, if I want shared memory parallelism
  • I can start a process, if I want shared storage parallelism
  • I cannot start a service, if I want shared network parallelism

What would it take to add a start API?

Overly literal examples

@tyalie
tyalie / 01_readme.md
Last active November 9, 2024 19:01
Atuin ZSH up/down arrow integration

Simple script for zsh which gives us a more native up/down arrow behavior for the [atuin magial shell history][1] plugin with behavior similar to e.g. [zsh-history-substring-search][2]. This is an improved reimplemtation of [@Nezteb's gist][3] for the same issue.

Behavior

Note

This assumes default keybindings

First and foremost: The script is aware of multiline buffers. So when going up or down, the script will first try to step through the lines of a multiline buffer, before going to the next history entry.

When pressing up the shell will iteratively go through the previous atuin history and have each result directly in the command buffer / command line. Any text in the initial buffer will be used as a search query.

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

#!/usr/bin/env python3
# Conway's Game of Chess
# Copyright (C) 2023 Eric Lesiuta
import argparse
import atexit
import curses
import hashlib
import os
import pickle
@osy
osy / tpm-rant.md
Last active December 10, 2024 18:59
TPM provides zero practical security

TPM provides zero practical security

TPM (Trusted Platform Module) is as useful for preventing real attackers as the TSA is at preventing real terrorists. The architecture is fundamentally flawed and most existing implementations are completely broken. I thought this argument was settled decades ago[1] when "trusted computing" was introduced mostly as a way to provide DRM and ownership capabilities to organizations. It has largely failed to impact the consumer market when it was introduced back in the early 2000s. However, recently there seems to be a movement by certain parties to reintroduce this failed product back to the market. Microsoft argues that in order to use Windows 11, you need TPM 2.0 compatible hardware because[2]:

The Trusted Platform Module(TPM) requirement ena

@alextremblay
alextremblay / .bashrc
Last active March 21, 2024 18:47
atuin up-arrow mod
# replace the default:
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash)"
# with this:
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash --disable-up-arrow)"
export ATUIN_ARROW_INDEX=-1
export ATUIN_CYCLE_MODE=0
@zachdaniel
zachdaniel / libraries_and_frameworks.md
Last active June 29, 2023 16:42
EEF Working Group Proposal: Libraries and Frameworks Working Group

Libraries and Frameworks Working Group

Mission Statement

  • To provide resources for library and framework authors to ensure that BEAM languages have a rich, vibrant ecosystem with a high degree of developer experience. Main Objectives
  • Provide and maintain best practices on library and framework standardization, documentation, code, and distribution. Collaborate to work on and make proposals for underlying tooling that improve the experience for library/framework authors and users.
  • Provide more visibility into the library ecosystem of Elixir on behalf of both authors and users.
  • (if Build and Packaging want to move this here, we could also take this over) Improve the user experience in generating and accessing documentation from the shell, IDEs, web pages, and more.