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 / 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 / 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 / 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 / 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 / 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 / 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
Last active December 22, 2022 11:35
my terminal config (new)
font:
normal:
family: Inconsolata
style: Regular
bold:
family: Inconsolata
style: Bold
italic: