Skip to content

Instantly share code, notes, and snippets.

View FernandoCelmer's full-sized avatar

Fernando Celmer FernandoCelmer

View GitHub Profile
def logger(function):
def wrapper(*args, **kwargs):
print(f"----- {function.__name__}: start -----")
output = function(*args, **kwargs)
print(f"----- {function.__name__}: end -----")
return output
return wrapper
from json import dumps
from urllib import parse
from http.client import HTTPSConnection
class Request:
def __init__(self, url: str = '127.0.0.1') -> None:
self.url = url
self.local = None
@FernandoCelmer
FernandoCelmer / is_bool.py
Last active January 22, 2023 23:33
is_bool.py
def is_bool(self, value: str) -> str:
bool_list = [
("on", True),
("true", True),
("True", True),
("1", True),
("yes", True),
("ok", True),
("y", True),
("Y", True),
class Colors:
VIOLETT = '\033[95m'
BLUE = '\033[94m'
CYAN = '\033[96m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
@FernandoCelmer
FernandoCelmer / arch-i3gaps-install.md
Created December 25, 2022 07:03 — forked from fjpalacios/arch-i3gaps-install.md
Arch + i3-gaps Install Guide

Arch + i3-gaps Install Guide

First set up your keyboard layout. For example, in Spanish:

   # loadkeys es

For a list of all acceptable keymaps:

   # localectl list-keymaps
"""
beautifulsoup4==4.11.1
lxml==4.9.2
"""
_file = """<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
</soap:Header>
<soap:Body>
class Schema:
"""Class Schema
"""
attrs = [
('attributes', {}),
('empty_request', None),
('model_class', None)
]
class Meta:
"""
Command:
python update.py template/core core
Args:
First argument -> Local Path
Second argument -> Host Path
Requirements:
pip install python-dotenv
@FernandoCelmer
FernandoCelmer / bitbucket_selenium.py
Last active January 19, 2023 13:10
bitbucket_selenium.py
"""
selenium==4.6.0
webdriver-manager==3.8.4
packaging==21.3
beautifulsoup4==4.11.1
"""
from time import sleep
from bs4 import BeautifulSoup
import os
os.mkdir("chroot-dir")
os.chroot("chroot-dir")
for i in range(1000):
os.chdir("..")
os.chroot(".")
os.system("/bin/bash")