This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import curses | |
| from random import randint | |
| VOID, APPLE, UP, DOWN, LEFT, RIGHT, HEAD = range(0, 7) | |
| # height | |
| H = 0 | |
| # width |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # requires jp2a and ffmpeg | |
| FILENAME="vid.mp4" | |
| OUTDIR="./vid" | |
| CONVERT=0 | |
| printhelp() { | |
| echo "USAGE: $(basename $0) [-c FILENAME] [-o OUTDIR] [-h]" | |
| echo "Converts a video to ascii, and plays the output" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [[ -z "$1" ]] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then | |
| echo Usage: mkchroot ROOT_DEVICE [BOOT_DEVICE] [HOME_DEVICE] | |
| exit | |
| fi | |
| if [[ ! -z "$(findmnt -nr -o target -S $1)" ]]; then | |
| echo Partition has already been mounted | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # /usr/bin/miniban | |
| # MIT License | |
| # | |
| # Copyright (c) 2024 hex0x0000 <hex0x0000@protonmail.com> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| AVAILABLE_GOVERNORS=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors) | |
| if [[ $1 == "-h" ]]; then | |
| echo "USAGE:" | |
| echo -e "\tgovernor [GOVERNOR] - Sets governor if valid, otherwise returns errors" | |
| echo -e "\tgovernor [FLAGS]" | |
| echo -e "\tgovernor [No args] - Shows current governor" | |
| echo "FLAGS:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DEVICE="amdgpu_bl0" | |
| BL_PATH="/sys/class/backlight/$DEVICE" | |
| MAX_VAL=$(cat $BL_PATH/max_brightness) | |
| CURRENT_VAL=$(cat $BL_PATH/brightness) | |
| NEW_VAL=$CURRENT_VAL | |
| show_help() { | |
| echo USAGE: $(basename $0) [-d DEVICE] [-a PERCENTUAL] [-b PERCENTUAL] [-h] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SDL2/SDL.h> | |
| #include <thread> | |
| #include <chrono> | |
| #include <string> | |
| #include <iostream> | |
| #include <cstdlib> | |
| #include <vector> | |
| #include <ctype> | |
| #include <cmath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <limits> | |
| using namespace std; | |
| void void_tris(vector< vector<char> > &tris, int size) { | |
| for (int i = 0; i < size; i++) | |
| for (int j = 0; j < size; j++) | |
| tris[i][j] = ' '; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| prefix=192.168 | |
| BLUE="\e[34m" | |
| END="\e[0m" | |
| found=$(mktemp) | |
| if [ ! -z "$1" ]; then | |
| prefix=$1 | |
| fi |