blob: 7ea5f2c40e17dc220d482e3ae88a93a21741a918 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
export PS1="\[\033[01;32m\]\u@\h \W \\$ \[$(tput sgr0)\]\[\033[0m\]"
export PATH="/opt/anaconda/bin:$PATH"
export VISUAL=vim
export EDITOR="$VISUAL"
# --- functions -----------------------------------------------------------------------------------
function countdown(){
secs=$(($1 * 60));
date1=$((`date +%s` + "$secs"));
while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
}
function git-commit-with-timestamp(){
echo " "
pwd
git remote update
git pull
if ! git diff --quiet
then
echo "COMMITING"
git add --all
git commit -m "$(date +"%Y-%m-%d %H:%M")"
git push
fi
}
function git-sync-all(){
cd ~/org; git-commit-with-timestamp;
cd ~/dotfiles; git-commit-with-timestamp;
}
|