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
#!/usr/bin/env bash | |
funnyCommit() { | |
commitMessage=$(echo $(curl --silent --fail whatthecommit.com/index.txt)) | |
echo "Your Commit Message is -> ${commitMessage}" | |
echo "Do you wish to procced with this commit message 😅 (y/n/o = other)?" | |
old_stty_cfg=$(stty -g) | |
stty raw -echo ; answer=$(head -c 1) ; stty $old_stty_cfg | |
if echo "$answer" | grep -iq "^y" ;then | |
git add -A && git commit -m "${commitMessage}" |
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 | |
# declare an array called array and define 3 vales | |
databases=( drupal fresh lasalle_wp_fts ) | |
username=root | |
password=password | |
filepath=/home/amitavroy/code/backup | |
for i in "${databases[@]}" | |
do | |
filename=${i}_$(date +"%m%d%Y-%k%M") | |
mysqldump -u${username} -p${password} ${i} > ${filepath}/${filename}.sql |