Skip to content

Instantly share code, notes, and snippets.

View yuchdev's full-sized avatar
💭
Open for new opportunities

Yurii Cherkasov yuchdev

💭
Open for new opportunities
  • Open for new opportunities
  • Nibiru
View GitHub Profile
@yuchdev
yuchdev / check_filesystem.sh
Last active January 7, 2020 09:58
Linux: Check Filesystem & Save results
sudo fsck -fvy /dev/sdb5 | tee ~/sdb5_results
# try -fvn
@yuchdev
yuchdev / examples.sh
Last active January 7, 2020 07:47
Bash examples
#!/bin/sh
# Execute for every subdir
for dir in ~/projects/git/*
do
(cd $dir && git pull)
done
Find text
find / -type f -exec grep -H 'text-to-find-here' {} \;
@yuchdev
yuchdev / geeklet-sysmon.sh
Last active January 7, 2020 09:59
Mac: geeklet for Mac Geektool for displaying system information on the desktop
#!/bin/bash
# Make sure you change the following variable
# to match the network interface you would like to monitor
nic=en0
echo "CPU information:"
sysctl -n machdep.cpu.brand_string
# Find current bandwith in each pipe
@yuchdev
yuchdev / git_mirror_repo.bat
Last active November 27, 2019 05:23
Git mirror repository
$ git clone --mirror https://github.com/yuchdev/entropy_calculator.git
$ cd entropy_calculator.git
$ git push --mirror https://bitbucket.org/ycherkasov/entropy_calculator.git
@yuchdev
yuchdev / git_two_remotes.bat
Last active November 27, 2019 05:24
Git adding two remotes for single push
git remote set-url --add --push origin https://github.com/yuchdev/entropy_calculator.git
git remote set-url --add --push origin https://bitbucket.org/ycherkasov/entropy_calculator.git