This file contains hidden or 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/fish | |
function git_stat | |
for i in (git log --format='%aN' | sort -u) | |
printf "STAT %s%s%s\n" (set_color red) "$i" (set_color normal) | |
git log --author="$i" --pretty=tformat: --numstat | awk '{inserted+=$1; deleted+=$2; delta+=$1-$2; ratio=deleted/inserted} END {printf "STAT Commit stats:\nSTAT - Lines added (total).... %s\nSTAT - Lines deleted (total).. %s\nSTAT - Total lines (delta).... %s\nSTAT - Add./Del. ratio (1:n).. 1 : %s\n", inserted, deleted, delta, ratio }' - | |
echo | |
end | |
end |
This file contains hidden or 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
# | |
# Functions | |
# | |
function i | |
hostname -I | cut -d " " -f 1 | |
end | |
function ut | |
sudo sh -c "timedatectl set-timezone Europe/Moscow && /usr/sbin/ntpdate pool.ntp.org" |
This file contains hidden or 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 i='hostname -I | cut -d " " -f 1' | |
alias ll='ls -alah' | |
alias fuck='git update-index --assume-unchanged' | |
alias unfuck='git update-index --no-assume-unchanged' | |
function getPS1() { | |
EXIT_CODE=$?; | |
printf "\n$(tput setaf 0)$(tput setab 2) $USER@$(i) $(tput sgr 0)"; | |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strings" | |
) |
This file contains hidden or 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
token="YOUR_TODOIST_TOKEN_HERE" | |
nowt=$(expr $(date +%s) / 14400) | |
test -f /tmp/todoistTasks$nowt.json \ | |
|| curl --silent -q https://api.todoist.com/sync/v8/sync \ | |
-d token=$token \ | |
-d sync_token='*' \ | |
-d resource_types='["items"]' > /tmp/todoistTasks$nowt.json | |
printf "\033[1;32mTasks need to be done:\033[0m\n" |