Skip to content

Instantly share code, notes, and snippets.

View bruhtus's full-sized avatar
🤔
¯\_(ツ)_/¯

Robertus Chris bruhtus

🤔
¯\_(ツ)_/¯
View GitHub Profile
#!/bin/sh
for d in $(ls -d ~/all_git/*/); do
echo $d && git -C $d status -s && ls -a $d | grep -q .gitmodules && git -C $d submodule foreach git status -s
done
@bruhtus
bruhtus / colab-ssh
Last active February 10, 2021 00:04
which vim || apt install vim ; which sshfs || apt install sshfs ; which htop || apt install htop
printf "\nalias p='python3'\nalias pip='pip3'\nset -o vi\nalias ls='ls -lh --color=auto --group-directories-first'\n" >> .bashrc ; printf "alias gss='git status -s'\nalias gp='git push'\nalias ggl='git pull origin master'" >> .bashrc
chmod +w .bashrc
source .bashrc
@bruhtus
bruhtus / basic-regex
Last active December 28, 2020 05:00
. - Any one character
* - Match any number of previous character (including zero number of previous character)
+ - Match any number of previous character
$ - End of the line
^ - Beginning of the line
\S - Any non-whitespace character
\s - Any whitespace character
? - The character before is optional
[a-z] - Any lowercase letter
[A-Z] - Any uppercase letter
import os
home = '/home/bruhtus/'
dir_list = [dirname for dirname in os.listdir(f'{home}/all_git') if os.path.isdir(f'{home}/all_git/{dirname}') == True]
for dirname in dir_list:
path = f'{home}/all_git/{dirname}'
os.system(f'echo {path}')
if os.path.exists(f'{path}/.gitmodules') == True:
@bruhtus
bruhtus / install.py
Last active July 14, 2021 08:49
setup new installation
import os
#change shell to zsh
#os.system('chsh -s /bin/zsh')
os.system('chsh -s $(which zsh)')
print('Changed shell to zsh')
#update system first
os.system('sudo pacman -Syyu')
print('Finish update package')
@bruhtus
bruhtus / right-eye.gif
Last active October 8, 2020 01:06
right-eye.gif
right-eye.gif
@bruhtus
bruhtus / left-eye.gif
Last active October 8, 2020 01:17
left-eye.gif
left-eye.gif