Skip to content

Instantly share code, notes, and snippets.

@enzinier
enzinier / change-git-author.sh
Last active October 17, 2020 17:43
Change pushed authors in git.
#!/bin/sh
git filter-branch -f --env-filter '
OLD_EMAIL="jasondevelop@outlook.com"
CORRECT_NAME="Jason Park"
CORRECT_EMAIL="enzinier@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@enzinier
enzinier / initialize_db.sh
Created June 26, 2017 23:06
Job for initializing database when database is connected.
#!/bin/bash
OUTPUT=""
until [[ ! "$OUTPUT" == "" ]]; do
echo "Not Connect!"
OUTPUT=$(mysql -h127.0.0.1 -uroot -p$MYSQL_ROOT_PASSWORD -e "SHOW DATABASES;" 2>/dev/null)
sleep 1
done
echo "Connect!"
@enzinier
enzinier / install_jetbrains_on_ubuntu.sh
Last active December 29, 2019 04:15 — forked from zabidok/jb_install_update.sh
Install or update jetbrains products like PhpStorm, WebStorm, IntelliJ Idea, PyCharm, CLion, ReSharper, DataGrip on Ubuntu and fix problems with non latin hotkeys in gui java application
#!/bin/bash
# installation jetbrains
j_url="https://data.services.jetbrains.com/products/download"
tmp_dir="$HOME/tmp_jb"
install_dir="/opt"
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi