This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sizeUnit: rem | |
$marginKey: "m" | |
$paddingKey: "p" | |
$separator: "-" | |
$sizes: ("none", 0), ("auto", auto), ("xxs", 0.125), ("xs", 0.25), ("sm", 0.5), ("md", 1), ("lg", 2), ("xl", 4), ("xxl", 8) | |
$positions: ("t", "top"), ("r", "right"), ("b", "bottom"), ("l", "left") | |
@function sizeValue($key, $value) | |
@return if($key == "none" or $key == "auto", $value, $value + $sizeUnit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete remote tags | |
git push origin --delete $(git tag -l) | |
# Delete local tags | |
git tag -d $(git tag -l) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar -czvf archive.tgz folder_or_file_name | |
tar -xzvf archive.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate SSH Key | |
ssh-keygen -t rsa -C "" -b 4096 | |
# SSH Autologin | |
ssh USER@SERVER mkdir -p /path_to_remote/.ssh | |
cat /path_to_my/.ssh/id_rsa.pub | ssh USER@SERVER 'cat >> /path_to_remote/.ssh/authorized_keys' | |
ssh USER@SERVER "chmod 700 /path_to_remote/.ssh && chmod 640 /path_to_remote/.ssh/authorized_keys" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Export database to SQL file | |
mysqldump -u root -p database > database.sql | |
# Import database from SQL file | |
mysql -u root -p -h 127.0.0.1 database < database.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TIMESTAMP=$(date +"%F") | |
BACKUP_DIR="/backup/$TIMESTAMP" | |
MYSQL_USER="backup" | |
MYSQL=/usr/bin/mysql | |
MYSQL_PASSWORD="password" | |
MYSQLDUMP=/usr/bin/mysqldump | |
mkdir -p "$BACKUP_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Debug helper function. This is a wrapper for var_dump() that adds | |
* the <pre /> tags, cleans up newlines and indents before output. | |
* | |
* @param mixed $var The variable to dump. | |
* @param string $label OPTIONAL Label to prepend to output. | |
* @param bool $die OPTIONAL Die script execution. | |
* @return string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias apti="sudo apt install -y" | |
alias hs="history | grep" | |
alias mkcd='foo(){ mkdir -p "$1"; cd "$1" }; foo ' | |
alias myip="curl http://ipecho.net/plain; echo" | |
alias octal="stat -c '%a %n'" | |
alias snano="sudo nano" | |
alias update="sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y" | |
alias gch="git checkout" | |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add those lines on /etc/default/locale | |
LC_CTYPE=en_US.UTF-8 | |
LC_ALL=en_US.UTF-8 | |
LANG=en_US.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chore: 🤖 | |
ci: 🎡 | |
docs: ✏️ | |
feat: 🎸 | |
fix: 🐛 | |
perf: ⚡️ | |
refactor: 💡 | |
release: 🏹 | |
style: 💄 | |
test: 💍 |
OlderNewer