Skip to content

Instantly share code, notes, and snippets.

View tinsaeDev's full-sized avatar
🏠
Working from home

Tinsae tinsaeDev

🏠
Working from home
View GitHub Profile
@tinsaeDev
tinsaeDev / reset-with-backup.sh
Last active April 22, 2026 12:56
Reset Prisma Database MIgration without loosing your data
#!/bin/bash
set -e
# --- Load .env ---
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
fi
if [ -z "$DATABASE_URL" ]; then
echo "Error: DATABASE_URL is not set in .env"
@tinsaeDev
tinsaeDev / gist:8a8e96467e1b2237af7685f3835dcc87
Last active August 17, 2024 12:34
This Gist provides the command and instructions for generating a Wildcard SSL certificate using Let's Encrypt's manual DNS challenge. This method is ideal if your web hosting provider doesn't offer automatic SSL installation or you prefer more control over the process.
certbot certonly --manual -d "*.yourdomain.tld" --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory
@tinsaeDev
tinsaeDev / isEthiopianMobileNumber.js
Last active August 17, 2024 12:27
Ethiopian mobile phone number validation JavaScript regular expression ( Regexp )
function isEthiopianMobileNumber(telNumber){
return /^(0|251|\+251)(9|7)[0-9]{8}$/.test(telNumber)
}