Skip to content

Instantly share code, notes, and snippets.

View ar1ja's full-sized avatar
🏳️‍⚧️

Arija A. (Ari Archer) (migrated to https://git.ari.lt/ari) ar1ja

🏳️‍⚧️
View GitHub Profile
@ar1ja
ar1ja / ben.sh
Last active October 3, 2023 22:02
benchmark for shells -- performance and features
#!/usr/bin/env sh
# -*-
# name(ben.sh)
# description(benchmark for shells -- performance and features)
# running(to run it id suggest to keep it fair, i personally did : `env -i bash --norc -i <ben.sh` ( 26 s ) and `env -i busybox ash -i <ben.sh` ( 19 s ))
# author(Ari Archer <[email protected]> [ari-web.xyz])
# license(wtfpl)
# -*-
@ar1ja
ar1ja / colours.h
Created September 21, 2023 20:26
colours.h -- easy coloured ansi text in c
#ifndef _COLOURS_H
#define _COLOURS_H
#define CLR(code) "\33[" code "m"
#define CLR_RESET CLR("0")
#define CLR_BOLD CLR("1")
#define CLR_DIM CLR("2")
#define CLR_UNDERLINE CLR("4")
#define CLR_BLINK CLR("5")
#define CLR_REVERSE CLR("7")
@ar1ja
ar1ja / hw.asm
Created August 27, 2023 20:31
hello worlds i can write from memory
format ELF64 executable 3
segment readable executable
define SYS_exit 60
define SYS_write 1
; fasm
_start:
mov eax, SYS_write
@ar1ja
ar1ja / vfagsa.py
Created June 21, 2023 21:35
very fast and good sorting algo
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""best sorting algorithm"""
from secrets import SystemRandom
from warnings import filterwarnings as filter_warnings
RAND: SystemRandom = SystemRandom()
@ar1ja
ar1ja / lietuva.h
Last active May 21, 2024 16:20
C but in lithuanian
/* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2023 Ari Archer <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ar1ja
ar1ja / uwu.h
Last active May 17, 2023 16:12
#ifndef _UWU_H
#define _UWU_H
#define awignas alignas
#define awignof alignof
#define awa auto
#define bowo bool
#define NOOOOOWOOOOO break
#define cawase case
#define charizardowo char
@ar1ja
ar1ja / a.py
Created May 15, 2023 20:17
simple python bundler
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""a"""
def a() -> None:
print("this is a.py")
@ar1ja
ar1ja / bash_syntax_highlighting.py
Created March 5, 2023 13:35
concept for GNU BASH syntax highlighing in python using linux procFS by Ari Archer
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""concept for GNU BASH syntax highlighing in python
author : Ari Archer <[email protected]> / <https://ari-web.xyz/>
license : GPLv3
this concept works ... almost, theres a problem, we need to somehow
take ownership of the stdin fd, but we cannot, the reason we need to take
ownership or priority over that fd is to make sure were the only ones reading
#include <stdio.h>
#define hey int
#define computer main(void) {
#define can
#define you
#define please
#define say puts
#define thanks ;
#define kys return
#define bye }
@ar1ja
ar1ja / alarm.py
Last active March 6, 2022 12:32
alarm.py
#!/usr/bin/env python3
import sys
from time import sleep
# python3 -m pip install --user beepy
from beepy import beep # type: ignore
if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} <time in minutes>")