Skip to content

Instantly share code, notes, and snippets.

View Pixailz's full-sized avatar
🏴‍☠️
bash, Bash, BASH ...

Pixailz Pixailz

🏴‍☠️
bash, Bash, BASH ...
  • 42 Angouleme
  • 02:06 (UTC +02:00)
View GitHub Profile
@Pixailz
Pixailz / attach_and_exec.sh
Created January 31, 2024 00:34
attach to the current pid and remove a readonly var without root
#!/bin/bash
gdb -ex 'call (int)unbind_variable("<VAR_NAME>")' --pid=$$ --batch
#gdb -ex 'shell' --pid=$$ --batch
@Pixailz
Pixailz / clean_file.sh
Created December 6, 2023 12:53
clean for release
#!/bin/bash -ue
# Author: Pixailz
PATTERN=(
"\.git*"
"\.vscode"
"__pycache__"
"*\.o"
"*\.a"
)
@Pixailz
Pixailz / get_includes
Created November 1, 2023 13:37
Get gcc / clang, in C or C++, information
#!/usr/bin/env bash
declare -a includes
function get_includes()
{
local compiler="${1:-gcc}"
local language="${2:-c}"
local data beg_inc end_inc
@Pixailz
Pixailz / clear_screen_test.py
Created October 27, 2023 10:53
testing of clearing a screen with ANSI Esc Seq
#!/usr/bin/env python3
import time
[ print(f"{i + 1} test") for i in range (0, 100) ]
def clear_screen():
print("\x1b[2J\x1b[H", end="")
print("should clear the screen in 3sec")
@Pixailz
Pixailz / OS-RELEASED.md
Last active April 7, 2024 09:36
Some os-release

os-release

UBUNTU

PRETTY_NAME="Ubuntu 23.04"
NAME="Ubuntu"
VERSION_ID="23.04"
VERSION="23.04 (Lunar Lobster)"
VERSION_CODENAME=lunar
# little script found on this repo https://github.com/gpoblon/libft
# need the see whats going one here (even in the make file, style method with tputs for the "cursor")
MYPATH=$(pwd)
CUR_MAKEFILE=$MYPATH/Makefile
if [ -e $CUR_MAKEFILE ]
then
echo "regenerate Makefile"
sed "`grep -n 'SRC =' $CUR_MAKEFILE | sed 's/:.*//'`, \$d" $CUR_MAKEFILE > NEWMAKEFILE
grep 'SRC =' $CUR_MAKEFILE >> NEWMAKEFILE
@Pixailz
Pixailz / cpu_ext.sh
Created April 8, 2022 14:10
list all CPU extension
cat /proc/cpuinfo | sed -nE 's/flag.*:.(.*)/\1/p' | tr ' ' '\n' | sort -u