Skip to content

Instantly share code, notes, and snippets.

View zeroby0's full-sized avatar
🐒
α••( ᐛ )α•—

Aravind Reddy V zeroby0

🐒
α••( ᐛ )α•—
View GitHub Profile
@zeroby0
zeroby0 / nftables.conf
Created September 17, 2024 13:19
my nftables conf to make devices connected via ethernet get internet via wifi. Remember to enable masquerading https://tailscale.com/kb/1103/exit-nodes?tab=linux
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority filter;
}
chain forward {
type filter hook forward priority filter;
@zeroby0
zeroby0 / oklab-range.md
Created March 6, 2023 10:15
Range of the OKLAB colour space

https://bottosson.github.io/posts/oklab/

c Min Max Range
L 0.0 6.341325663998628 6.341325663998628
a -1.4831572863679208 1.7515803991801318 3.2347376855480525
b -1.9755014508238542 1.2591954894854225 3.2346969403092767
@zeroby0
zeroby0 / pi-headless.md
Last active November 3, 2022 10:46
Pi Headless Setup

Static IP

/etc/dhcpcd.conf

interface eth0
static ip_address=192.168.100.02/16
static routers=192.168.3.254
static domain_name_servers=1.1.1.1 1.0.0.1
@zeroby0
zeroby0 / bluez-monitor.conf
Created August 14, 2021 12:43
Pipewire Bluetooth Headphones configuration file.
# Bluez monitor config file by Aravind Voggu @ zeroby0
# /etc/pipewire/media-session.d
# Disables all codecs except aac, so microphone on your
# Bluetooth headphones will not work. But if it can save
# me from ever hearing gravel voices at 5000Hz sampling rate
# on SBC, it's all worth it.
properties = {
bluez5.msbc-support = false
bluez5.sbc-xq-support = false
@zeroby0
zeroby0 / dirdiff.py
Last active July 27, 2021 21:35
Exactly what is says on the tin. Checks if dirs are different.
import hashlib
from sys import argv
from pathlib import Path
if len(argv) != 3:
print('The arguments should be paths to the folders you want to compare')
print('python3 dirdiff.py folder1 folder2')
exit(-1)
# https://stackoverflow.com/a/44873382
@zeroby0
zeroby0 / code-print.tex
Created May 17, 2019 06:25 — forked from sgmonda/code-print.tex
Simple LaTeX template to print beautiful black&white Javascript source code
\documentclass[a4paper, 12pt]{article}
\usepackage[letterpaper, margin=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{beramono}
\usepackage{listings}
\usepackage{xcolor}
\newcommand\realnumberstyle[1]{}
@zeroby0
zeroby0 / License
Created February 6, 2019 14:03
License. Adapted from css-tricks.com.
SUPER IMPORTANT LEGAL DOCUMENT
------------------------------
I don't give two hoots what you do with any of the code you find here.
Actually, I do. I hope you take it and use it, uncredited, on a super commercial website and get
wicked rich off it. I hope you use it at work and your boss is impressed and you get a big
promotion. I hope it helps you design a software and that software impresses somebody you think is
super hot and you get married and have smart, chill babies. I hope you use the code in a blog post
you write elsewhere and that website gets way more popular and awesome than this one.
@zeroby0
zeroby0 / b2c.py
Last active February 6, 2019 14:11
Brainfuck to C transpiler written in Python.
# This program compiles brainfuck to C
#
# License: Public Domain
# Find the full license text here: https://gist.github.com/zeroby0/5de2005674d234b48f41ff75181f07a3
#
#
# Essentially, this program is just creating a large array
# with memory = (int*) calloc(MAX_PROG_MEMORY, sizeof(int));
# and writing commands to modify it as specified in
# the input source-code. The Variable PC is the index to
@zeroby0
zeroby0 / gitbackup.sh
Last active May 28, 2025 07:43
Automatic, periodic commit and push to GitHub.
#
# This program automatically commits changes to github every
# 10 seconds. Because I've been clumsy in the past and lost
# changes I made to a document. I use it when I'm writing an
# article or something like that. I used it when writing a
# paper for my HSS course. https://github.com/zeroby0/Vegas
#
# Btw, this code is released into the public domain.
# Read https://gist.github.com/zeroby0/5de2005674d234b48f41ff75181f07a3
# for the full text.
@zeroby0
zeroby0 / rpi-Milan.md
Last active February 6, 2019 14:16
Login to IIITB Milan WiFi with raspberry-pi.
  • Add these lines to your /etc/wpa_supplicant/wpa_supplicant.conf
network={
        ssid="IIITB-Milan"
        proto=RSN
        key_mgmt=WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        identity="iiitb\user.name"
 password="Your password"