Skip to content

Instantly share code, notes, and snippets.

View nauar's full-sized avatar

Arnau Oncins Rodríguez nauar

View GitHub Profile
@nauar
nauar / pwgen.py
Created April 23, 2024 16:13
Password generator in Python
#!/bin/python
import random
lowercase="abcdefghijklmnopqrstuvwxyz"
uppercase="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers="0123456789"
symbols="/!'@#$%&~().,;:<>"
length=40
pwtype=lowercase+uppercase+numbers#+symbols
@nauar
nauar / updateAWSCLI.bash
Last active September 29, 2022 14:48
AWS CLI v2 Installer/updater
#!/bin/bash
function log() {
ts=`date '+%d/%m/%Y %H:%M:%S'`
echo "[ $ts ] $1"
}
export AWS2_BIN_DIR=~/bin
export AWS2_INSTALL_DIR=~/Software/aws/awscli/installdir
@nauar
nauar / search_git_tag.sh
Created July 4, 2020 14:27
Bash script for looking for a tag in a remote git repository
#!/bin/bash
# This script is used for searching a tag in git. Parameters:
#
# GIT_REPO: Repository URL
# GIT_TAG: Tag to look for
GITCMD="git"
@nauar
nauar / pre-receive
Last active March 13, 2024 08:45
GIT pre-receive hook for checking file size and filename extensions
#!/bin/bash
# This script is a pre-receive hook allowing pushes whose every file:
# - is smaller than 20 M
# - and its extension is not one of the following:
# - dll
# - exe
# - war
# - ear
# - jar