Skip to content

Instantly share code, notes, and snippets.

View anoduck's full-sized avatar
🦆
Quackity, Quack!

Anoduck, The Anonymous Duck anoduck

🦆
Quackity, Quack!
View GitHub Profile
@anoduck
anoduck / upgrade_godns.sh
Created May 12, 2025 07:55
update godns: Script to check if godns version is the same as the newest release, if not, then download and install the release.
#!/usr/bin/env bash
function upgrade_godns() {
PROFILE="TimothyYe"
PROJECT="godns"
OUTFILE="godns.tar.gz"
ENDFILE="godns"
VERSION=$(curl -s "https://api.github.com/repos/$PROFILE/$PROJECT/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
@anoduck
anoduck / rfc.org
Created April 6, 2025 19:41
Request For Change in Org Mode

#+Start Date: (fill me in with today’s date, DD-MM-YYYY) #+RFC MR: (leave this empty)

(RFC title goes here)

Summary

> One paragraph explanation of the change.

Motivation

@anoduck
anoduck / adr.org
Last active April 6, 2025 19:37
Architectual Design Record in Org Mode

#+decision-makers: {list everyone involved in the decision}

{short title, representative of solved problem and found solution}

@anoduck
anoduck / builder-utils.ts
Created February 3, 2025 09:28
LoremFlickr - Working version from Elia A Taylor
import {join} from 'path';
import {en, Faker} from '@faker-js/faker';
import axios from 'axios';
import fs from 'fs';
import {get} from 'https'; // Use 'http' if needed
import {Readable} from 'stream'; // Ensure compatibility with Node.js 18+
const faker = new Faker({
locale: [en],
@anoduck
anoduck / init.lua
Created December 1, 2024 22:24
Nvim Configuration file for remote installations.
-------------------------------------------
-- _ _ _ ___ ___ --
-- | \| |_ _(_)_ __ | _ \/ __| --
-- | .` \ V / | ' \| / (__ --
-- |_|\_|\_/|_|_|_|_|_|_\\___| --
-- ____ _ --
-- | _ \ ___ _ __ ___ ___ | |_ ___ --
-- | |_) / _ \ '_ ` _ \ / _ \| __/ _ \ --
-- | _ < __/ | | | | | (_) | || __/ --
-- |_| \_\___|_| |_| |_|\___/ \__\___| --
@anoduck
anoduck / 1-zig-cheatsheet
Created November 21, 2024 21:47 — forked from jdmichaud/1-zig-cheatsheet
Zig cheatsheet
https://ziglang.org/documentation/master/#Pointers
*T - single-item pointer to exactly one item.
Supports deref syntax: ptr.*
[*]T - pointer to unknown number of items. (eq. of *T in C)
Supports index syntax: ptr[i]
Supports slice syntax: ptr[start..end]
Supports pointer arithmetic: ptr + x, ptr - x
@anoduck
anoduck / setup-ivre.sh
Last active August 14, 2024 06:46
Ivre Setup for Kali / Debian
#!/usr/bin/env bash
# contrived from https://doc.ivre.rocks/en/latest/install/fast-install-and-first-run.html
# Ensure user has suid permissions
if [ "$EUID" -ne 0 ]
then echo "You must run this with root permissions."
exit
fi
@anoduck
anoduck / create_tun.py
Created July 12, 2024 05:58
A simply pthon script to create a tunnel interface.
#!/usr/bin/env python3
import fcntl
import struct
import os
from scapy.layers.inet import IP
from warnings import warn
from dataclasses import dataclass, field
from typing import List
import subprocess
@anoduck
anoduck / resource_error_test.py
Last active November 25, 2023 21:16
Script repeating `trio.ClosedResourceError`
import trio
from aioresult import ResultCapture
import string
async def task(receiver):
new_list = []
list_nums = []
alpha_nums = []
async with receiver:
@anoduck
anoduck / build_goneovim.sh
Created September 4, 2023 06:58
Sh script to build goneovim and desktop environment for testing goneovim.
#!/usr/bin/env sh
SNDBX="$HOME/Sandbox"
WORKDIR="$HOME/Sandbox/goneovim"
export GO111MODULE=off
export QT_PKG_CONFIG=true
export GOPATH="$(go env GOPATH)"
export GOBIN="$GOPATH/bin"
export PATH="$PATH:$GOBIN"
QSET="$(go env GOPATH)/bin/qtsetup"