Skip to content

Instantly share code, notes, and snippets.

View nektro's full-sized avatar
🌻
if you know, you know

Meghan Denny nektro

🌻
if you know, you know
View GitHub Profile
@nektro
nektro / main.zig
Created April 26, 2022 21:36
x11 opengl demo
const std = @import("std");
const c = @cImport({
@cInclude("X11/Xlib.h");
@cInclude("X11/Xutil.h");
@cInclude("X11/keysymdef.h");
@cInclude("GL/gl.h");
@cInclude("GL/glx.h");
});
const extras = @import("extras");
pub fn amInside() !bool {
return try extras.doesFileExist(null, "/.dockerenv");
}
@nektro
nektro / Progress.zig
Last active February 24, 2022 02:16
A single line progress bar
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,
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJL/Tmw2oZFIZVoW1CBq5RQWOD9ntGxXWCOLksaiGAWy hello+limitless@nektro.net
@nektro
nektro / quotes.md
Last active February 23, 2024 22:08

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.

#!/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
#!/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)
function fib(n, i = 0, a = 0, b = 1) {
if (n === i) { return a; }
return fib(n, i + 1, b, a + b);
}
@nektro
nektro / Dockerfile
Created March 19, 2021 08:57
minimal requirements to build and install zig from scratch with docker
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