Skip to content

Instantly share code, notes, and snippets.

View alejandrobernardis's full-sized avatar
🐻

Alejandro M. BERNARDIS alejandrobernardis

🐻
View GitHub Profile
@alejandrobernardis
alejandrobernardis / dns.py
Created September 30, 2020 14:47 — forked from infra-0-0/dns.py
python3.5 asyncio dns resolver, based on code from who knows where
"""
The most simple DNS client written for Python with asyncio:
* Only A record is support (no CNAME, no AAAA, no MX, etc.)
* Almost no error handling
* Doesn't support fragmented UDP packets (is it possible?)
"""
import asyncio
import logging
@alejandrobernardis
alejandrobernardis / installer.zsh
Last active June 8, 2020 03:09
Generic installer
#!/bin/zsh
# Author: Alejandro M. BERNARDIS
# Email alejandro.bernardis at gmail dot com
# Created: 2020-06-07
### debug ######################################################################
typeset -gr LOG_LEVEL_OFF=0
typeset -gr LOG_LEVEL_FATAL=1
typeset -gr LOG_LEVEL_CRITICAL=2
# Material gruvbox for kitty
background #1d2021
foreground #d4be98
selection_background #d4be98
selection_foreground #1d2021
cursor #a89984
cursor_text_color background
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
@alejandrobernardis
alejandrobernardis / .gitconfig
Last active February 10, 2022 06:41
GitConfig
[user]
email = [email protected]
name = Alejandro M. BERNARDIS
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
function col {
awk -v col=$1 '{print $col}'
}
docker ps -q | xargs docker stop
docker ps -aq | xargs docker rm
docker images | grep none | col 3 | xargs docker rmi -f
function colors1() {
echo -e "\n\033[4;31mLight Colors\033[0m \t\t\033[1;4;31mDark Colors\033[0m"
echo -e "\e[0;30;47m Black \e[0m 0;30m \t\e[1;30;40m Dark Gray \e[0m 1;30m"
echo -e "\e[0;31;47m Red \e[0m 0;31m \t\e[1;31;40m Dark Red \e[0m 1;31m"
echo -e "\e[0;32;47m Green \e[0m 0;32m \t\e[1;32;40m Dark Green \e[0m 1;32m"
echo -e "\e[0;33;47m Brown \e[0m 0;33m \t\e[1;33;40m Yellow \e[0m 1;33m"
echo -e "\e[0;34;47m Blue \e[0m 0;34m \t\e[1;34;40m Dark Blue \e[0m 1;34m"
echo -e "\e[0;35;47m Magenta \e[0m 0;35m \t\e[1;35;40m DarkMagenta\e[0m 1;35m"
echo -e "\e[0;36;47m Cyan \e[0m 0;36m \t\e[1;36;40m Dark Cyan \e[0m 1;36m"
@alejandrobernardis
alejandrobernardis / gitalias.ini
Last active November 22, 2019 12:36
git alias
[alias]
# push
pfa = !git add . && git commit -m 'UPD // First approach' && git push
pfx = !git add . && git commit -m 'UPD // Fixes' && git push
pfxm = !git add . && git commit -m 'UPD // +Fixes' && git push
pfe = !git add . && git commit -m 'UPD // Features' && git push
pfem = !git add . && git commit -m 'UPD // +Features' && git push
pdo = !git add . && git commit -m 'UPD // Documentation' && git push
pdom = !git add . && git commit -m 'UPD // +Documentation' && git push
pin = !git add . && git commit -m 'INI // Initial Commit' && git push -u origin master
# AySA
_proto/
_ignore/
*.ignore
*.ignore.py
.idea
.vscode
.DS_*
*.sublime*
@alejandrobernardis
alejandrobernardis / transport.sh
Created November 12, 2019 12:00
Script para el transporte de imágenes
#!/bin/bash
# Author: Alejandro M. BERNARDIS
# Created: 2019/08/30
set -e
# colors
BLACK=$(printf '\033[30m')
RED=$(printf '\033[31m')