Skip to content

Instantly share code, notes, and snippets.

Avatar
🌻
if you know, you know

Meghan nektro

🌻
if you know, you know
View GitHub Profile
@nektro
nektro / Progress.zig
Last active Feb 24, 2022
A single line progress bar
View Progress.zig
const std = @import("std");
const string = []const u8;
const Progress = @This();
const ansi = @import("ansi");
const range = @import("range").range;
const extras = @import("extras");
total: usize,
current: usize = 0,
@nektro
nektro / .gitignore
Last active Aug 30, 2022
A data-oriented-design built tokenizer
View .gitignore
zig-*
.zigmod
deps.zig
View authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJL/Tmw2oZFIZVoW1CBq5RQWOD9ntGxXWCOLksaiGAWy hello+limitless@nektro.net
View quotes.md

Any community that gets its laughs by pretending to be idiots will eventually be flooded by actual idiots who mistakenly believe that they're in good company.

Poe's law is an adage of Internet culture stating that, without a clear indicator of the author's intent, it is impossible to create a parody of extreme views such that it cannot be mistaken by some readers for a sincere expression of the views being parodied.

If you come in last place it doesn't mean you're bad, it just means everyone else is better than you.

Peace is not the absence of conflict, but the ability to deal with it in a peaceful way.

Having knowledge and not doing anything with it is just the same as having no knowledge.

View git-rebase-failed-prs.sh
#!/usr/bin/env bash
set -e
for number in $(gh pr list --search "status:failure -is:draft" --json 'number' | jq '.[].number')
do
echo '## Checking out PR' $number
gh pr checkout $number
echo
View find_todos.sh
#!/usr/bin/env bash
todo='0'
echo "[" > todo_data.json
git log --reverse --oneline |
while IFS= read -r commit
do
hash=$(echo $commit | cut -d' ' -f1)
View efficient_fibonacci.js
function fib(n, i = 0, a = 0, b = 1) {
if (n === i) { return a; }
return fib(n, i + 1, b, a + b);
}
View commands.md
@nektro
nektro / Dockerfile
Created Mar 19, 2021
minimal requirements to build and install zig from scratch with docker
View Dockerfile
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /root
COPY . .
RUN apt update
RUN apt -y upgrade
RUN apt -y install apt-utils apt-transport-https ca-certificates
RUN apt -y install wget gpg
View update_zig.sh
#!/usr/bin/env bash
set -e
arch=$(uname -m)
os=$(uname -s | tr '[:upper:]' '[:lower:]')
double="$arch-$os"
if [[ $1 == *"dev"* ]]; then
wget -q --show-progress https://ziglang.org/builds/zig-linux-x86_64-$1.tar.xz