Skip to content

Instantly share code, notes, and snippets.

View rafesposo's full-sized avatar
⚔️
Non nobis Domine, no nobis sed nomini Tuo da Gloriam

Rafael Esposo rafesposo

⚔️
Non nobis Domine, no nobis sed nomini Tuo da Gloriam
View GitHub Profile
@rafesposo
rafesposo / import.sh
Last active December 21, 2023 12:28
Use split.sh for split .sql file by table AND import.sh for import separated files and get file with error
for file in part_*.sql; do
mysql -u root -p'yourpass' DBNAME < "$file"
if [ $? -ne 0 ]; then
echo "Erro ao importar o arquivo: $file"
break
fi
done
@rafesposo
rafesposo / index.html
Created December 18, 2023 23:34
Snowflake effect in your website
<style>
.snowflake {
color: #fff;
font-size: 1em;
font-family: Arial;
text-shadow: 0 0 1px #000;
}
@-webkit-keyframes snowflakes-fall {
0% {
@rafesposo
rafesposo / post-commit
Last active December 18, 2023 23:32
Generate a package with the files that were modified in the last commit.
#!/bin/sh
# ==================================
# Creators: @rafesposo | @dudecussi
# Date: 2022-12-16
# Description: This script will generate a package with the files that were modified in the last commit.
# How to use: Copy this file to the .git/hooks folder and give it execution permissions.
# ==================================
branchPath=$(git symbolic-ref -q HEAD)
branch=${branchPath##*/}
commitHash=$(git rev-parse --short HEAD)