Skip to content

Instantly share code, notes, and snippets.

View MindPatch's full-sized avatar
🕹️
Take it easy :D

Khaled MindPatch

🕹️
Take it easy :D
View GitHub Profile
@MindPatch
MindPatch / alacritty.yml
Last active December 22, 2022 11:35
my terminal config (new)
font:
normal:
family: Inconsolata
style: Regular
bold:
family: Inconsolata
style: Bold
italic:
@MindPatch
MindPatch / ex.rs
Last active December 9, 2021 18:23
example rust
mod args;
mod requester;
use crate::requester::*;
use crate::args::args;
use serde_json::json;
use indicatif::{ProgressStyle,ProgressBar};
use scoped_threadpool::Pool;
use std::{
fs::File,
io::{
@MindPatch
MindPatch / alacritty.yml
Created September 29, 2021 23:38
my alacritty terminal config file
key_bindings:
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Q, mods: Command, action: Quit }
- { key: N, mods: Command, action: SpawnNewInstance }
- { key: Return, mods: Command, action: ToggleFullscreen }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
- { key: End, chars: "\x1bOF", mode: AppCursor }
@MindPatch
MindPatch / main.py
Created June 27, 2021 02:44
Convert Markdown from right to left python script
import re,sys
# made with ❤️ by @knassar702
# usage: cat file.md | python3 conv.py
class arMarkdown:
def __init__(self,data):
self.data = data
def header(self):
c = self.data.split(' ')[0].count('#')
if c == 0 or c > 6:
@MindPatch
MindPatch / xorg.conf
Created June 3, 2021 19:33
xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 460.39
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 390.143 (dvs-builder@U64-P10-14) Fri Mar 12 07:18:28 UTC 2021
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
@MindPatch
MindPatch / task.py
Created June 1, 2021 16:12
Startpage
from startpage import StartPage
import sys
task = StartPage()
for numb,results in task.search(sys.argv[1],page=10).items():
for res in results:
print(res['link'])
@MindPatch
MindPatch / startpage.py
Created May 31, 2021 21:49
Startpage.com parser
import requests
import sys
import threading
from queue import Queue
from bs4 import BeautifulSoup
def test(c):
req = requests.get(f'https://www.startpage.com/do/search?q={sys.argv[1]}&segment=startpage.brave&page={c}',headers={"User-agent":'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36'}).content.decode()
soup = BeautifulSoup(req, "html.parser")
ancher = soup.find_all('a', {'class': "w-gl__result-url result-link"})
@MindPatch
MindPatch / tp
Created April 20, 2021 08:28
terminal prompt
export PS1="\[\e[32;40m\]\u\[\e[m\]\[\e[31m\]@\[\e[m\]\[\e[33m\]\h\[\e[m\] \w \033[0;31m☭\033[0m "
@MindPatch
MindPatch / install.sh
Created April 16, 2021 13:57
install_deb_voidlinux.sh
ar x $1
mkdir temp
tar xf data.tar.* -C temp
sudo cp -R temp/* /
# https://www.reddit.com/r/voidlinux/comments/6ecc3y/how_to_install_deb_files/
@MindPatch
MindPatch / install.sh
Created April 15, 2021 03:19
my void linux workflow
sudo xbps-install -Sy
sudo xbps-install -u xbps
sudo xbps-install -S vim base-devel libX11-devel libXft-devel libXinerama-devel python3-pip git gcc
mkdir suckless
cd suckless
git clone https://git.suckless.org/dwm
cd dwm
sudo make clean install
cd ../
git clone https://github.com/knassar702/st # st with my patches