Skip to content

Instantly share code, notes, and snippets.

View Felix-Kyun's full-sized avatar
💭
¯\_(ツ)_/¯

0×FELIX Felix-Kyun

💭
¯\_(ツ)_/¯
View GitHub Profile
@Felix-Kyun
Felix-Kyun / dl.sh
Last active May 4, 2022 12:51
simple script to downlad music using yt-dl
#!/bin/bash
# usage
# dl.sh link sub-directory(optional)
# by default it uses yt-dlp change the $BIN to change it.
# script stores cache in .cache dir
# and keeps a archive just to prevent duplicate downloads
# archive is located in Music directory named ".download.txt"
# it also downloads thumbnails by default
@Felix-Kyun
Felix-Kyun / termux_charge_limit
Created May 9, 2022 19:12
battery charge limiter for termux, NEEDS ROOT!
#! /usr/bin/env bash
# TODO: add a light weight loader
MIN=70
MAX=85
CONTROL_FIlE=/sys/class/power_supply/battery/charging_enabled
REFRESH_INTERVAL=60
BIN=termux-battery-info
@Felix-Kyun
Felix-Kyun / lcrypt.lua
Created September 5, 2022 18:25
a minimal and fast lua based text encrypter
#! /usr/bin/env lua
--[[ made by 0×FELIX ]]
local function show_help()
io.write [[
lcrypt - v0.0.1-alpha
a fast lua based text encrypter
@Felix-Kyun
Felix-Kyun / arch-btrfs-mbr-bios-setup.md
Last active October 27, 2022 06:37
simple guide to install and setup arch on a bios/mbr machine with btrfs

Install

i've written this on obsidian so the format may be a bit weird on github

Pre Configure

  • set font
setfont ter-124n
@Felix-Kyun
Felix-Kyun / picom-template
Created October 31, 2022 19:54
pijulius picom template for xbps-src
# Template file for 'picom-pijulius'
pkgname=picom-pijulius
version=8
revision=2
wrksrc=picom
build_style=meson
configure_args="-Dwith_docs=true"
hostmakedepends="git pkg-config asciidoc"
makedepends="MesaLib-devel dbus-devel libconfig-devel libev-devel pcre-devel pixman-devel xcb-util-image-devel xcb-util-renderutil-devel libxdg-basedir-devel uthash"
depends="desktop-file-utils"
@Felix-Kyun
Felix-Kyun / swap_args.sh
Last active November 7, 2022 16:47
calculate kernel args for swap file on btrfs
# taken from https://superuser.com/questions/1581885/btrfs-luks-swapfile-how-to-hibernate-on-swapfile
wget "https://raw.githubusercontent.com/osandov/osandov-linux/61679ecd914d653bab14d0e752595e86b9f50513/scripts/btrfs_map_physical.c" &&
gcc -O2 -o btrfs_map_physical btrfs_map_physical.c &&
./btrfs_map_physical $1 | sed -n "2p" | awk "{print \$NF}" >/tmp/swap_physical_offset
SWAP_PHYSICAL_OFFSET=$(cat /tmp/swap_physical_offset)
SWAP_OFFSET=$(echo "${SWAP_PHYSICAL_OFFSET} / $(getconf PAGESIZE)" | bc)
SWAP_UUID=$(findmnt -no UUID -T $1)
@Felix-Kyun
Felix-Kyun / arch_install.md
Created July 21, 2023 13:58
a simple guide to install arch on uefi with encrypted btrfs root with snapper and systemd-boot

Aim

  • btrfs root with snapper
  • luks encrytpion on root partition
  • systemd-boot
  • hyprland
  • zram + swap

Lets get Started Then

@Felix-Kyun
Felix-Kyun / nord_tty.sh
Created July 25, 2023 10:46
Nord Theme for TTY (vconsole)
# nord-tty
# format \\e]PXRRGGBB
# where X is terminal color
# RRGGBB is a hexcolor
echo -en \\e]P02E3440
echo -en \\e]P1BF616A
echo -en \\e]P2A3BE8C
echo -en \\e]P3EBCB8B
echo -en \\e]P481A1C1
@Felix-Kyun
Felix-Kyun / omz_setup.md
Created August 4, 2023 16:49
fast zsh setup with omz and p10k and some plugins

💻 Fast Copy Paste Command To Setup

install zsh git and wget/curl

zsh git curl 

install omz

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@Felix-Kyun
Felix-Kyun / lcrypt.c
Last active August 6, 2023 16:52
lcrypt.lua ported to c, simple no nonsense super fast file encryption
/* INFO:
* made by Felix
* original source lcrypt.lua ->
* `https://gist.github.com/Felix-Kyun/5c9cb2eb5a40289825cb2705bd1f1654`
* @arg -> 0:@mode{e, d} 1:@file_name[i] 2:@file_name[o] 3:@pass
* example:",
* `$ lcrypt e file.txt encrypted_file.txt felix@crypt`",
* `$ lcrypt d encrypted_file.txt file.txt felix@crypt`",
* @mode <- only 'e' or 'd' meaning encrypt and decrypt respectivly",
* @pass has to be supplied with no space"};