Skip to content

Instantly share code, notes, and snippets.

View alejandrobernardis's full-sized avatar
🐻

Alejandro M. BERNARDIS alejandrobernardis

🐻
View GitHub Profile
podman run -w /root -ti --rm fedora:39 sh -uelic '
dnf update -y && dnf install neovim bat git tree nodejs lua wget go -y
dnf groupinstall "Development Tools" "Development Libraries" -y
git clone https://github.com/NvChad/NvChad ~/.config/nvim
nvim
'
@alejandrobernardis
alejandrobernardis / 01-generate-ed25519-ssh-key.sh
Created September 8, 2023 23:40 — forked from grenade/01-generate-ed25519-ssh-key.sh
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@alejandrobernardis
alejandrobernardis / harbor.sh
Created November 9, 2022 21:03 — forked from kacole2/harbor.sh
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
@alejandrobernardis
alejandrobernardis / enacom.py
Created October 24, 2022 13:39
ENACOM Argentina Códigos de Área
import csv
import re
import requests
import time
from bs4 import BeautifulSoup
url = 'https://www.enacom.gob.ar/areaslocales/busqueda/{pos}'
field = 'campo='
pos = 1
HISTSIZE=1000
HISTFILESIZE=0
HISTCONTROL=ignoreboth
alias c='clear'
alias cl='clear;ls'
alias cpl='clear;pwd;ls'
alias :q='exit'
alias reload='exec $SHELL -l'
alias cp='cp -i'
run:
python simple_server.py

SSH Config

# directorio de trabajo
mkdir -p ~/.ssh/config.d/ssh
# configuración principal
touch ~/.ssh/config
# configuración empresa
touch ~/.ssh/config.d/company.conf
@alejandrobernardis
alejandrobernardis / class-pedro-2021-06-03.py
Created June 3, 2021 21:58
Class -- Pedro 2021-06-03
#!/usr/bin/env python
# Author: Alejandro M. BERNARDIS
# Email alejandro.bernardis at gmail dot com
# Created: 2021-06-03
# le asigno el valor en formato string a la variable mensaje.
mensaje = 'A mi me encanta programar en python.'
# imprimo el total de caracteres
print('Cuántos caracteres tengo?:', len(mensaje))
@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