Skip to content

Instantly share code, notes, and snippets.

View Alejandroacho's full-sized avatar
🚀
Coding

Alejandro Acho Alejandroacho

🚀
Coding
View GitHub Profile
@Alejandroacho
Alejandroacho / init.sh
Last active September 3, 2023 22:27
Raspberry Pi server config
echo "''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''"
echo " Updating "
echo "''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''"
apt update
echo "''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''"
echo " Upgrading "
echo "''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''"
apt upgrade -y
@Alejandroacho
Alejandroacho / .zshrc
Last active July 26, 2022 08:18
Terminal alias
# Bash
alias ll='ls -a'
alias c='clear'
alias rcache="find . | grep -E '(__pycache__|\.pyc|\.pyo$)' | xargs rm -rf && find . | grep -E '(.pytest_cache|\.pyc|\.pyo$)' | xargs rm -rf "
# Projects
alias up='make local'
alias run='npm run local'
alias rund='npm run dev'
alias down='make local-stop'
@Alejandroacho
Alejandroacho / models.py
Last active February 13, 2022 23:07
Custom use model in Django 4
from django.contrib.auth.models import PermissionsMixin
from django.db import models
from django.utils.http import urlquote
from django.utils.translation import ugettext_lazy as _
class CustomUserManager(BaseUserManager):
"""
Custom user model manager where email is the identifier for authentication
instead of usernames.