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
lvdisplay | |
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv | |
resize2fs /dev/ubuntu-vg/ubuntu-lv |
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
wget https://download.dremio.com/odbc-driver/1.4.2.1003/dremio-odbc-1.4.2.1003-1.x86_64.rpm | |
sudo apt-get install alien unixodbc-dev -y | |
sudo alien dremio-odbc-1.4.2.1003-1.x86_64.rpm | |
sudo dpkg -i dremio-odbc_1.4.2.1003-2_amd64.deb |
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
import glob | |
import os | |
if __name__ == "__main__": | |
res = glob.glob('*.MP4') | |
code='GH' | |
groups = {} | |
for r in res: | |
seq = r[2:4] | |
prefix = r[4:8] |
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
git submodule deinit <path_to_submodule> | |
git rm <path_to_submodule> | |
git commit -m "Removed submodule xxxx" | |
rm -rf .git/modules/<path_to_submodule> |
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
#!/bin/bash | |
FROM_DB="db1" | |
TO_DB="db2" | |
DBUSER="dbuser" | |
DBHOST="192.168.1.99" | |
pg_dump -h $DBUSER -U $DBUSER $FROM_DB | gzip > /tmp/dump.sql.gz | |
psql -h $DBUSER -U $DBUSER postgres -c "SELECT |
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
ls *.MP4 > input.txt | |
sed -i 's/^/file /g' input.txt | |
~/ffmpeg-20191114-73ee53f-win64-static/bin/ffmpeg.exe -f concat -i input.txt -c copy output.mp4 | |
rm input.txt |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*.jasper |
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
# https://raw.githubusercontent.com/tony/tmux-config/master/.tmux.conf | |
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow | |
#crontab reboot need to use bash | |
set-option -g default-shell /bin/bash | |
# set window split | |
bind-key v split-window -h |
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
#!/bin/bash | |
MASTER_IP= | |
SLAVE_IP= | |
# service postgresql stop | |
su - postgres | |
psql -c "CREATE ROLE replica WITH PASSWORD 'myreplpassword' LOGIN REPLICATION;" | |
#Security for master allow standby access |
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
# Reference | |
# https://www.linuxcloudvps.com/blog/how-to-install-odoo-10-on-ubuntu-16-04-with-nginx-as-a-reverse-proxy/ | |
# https://linuxize.com/post/configure-odoo-with-nginx-as-a-reverse-proxy/ | |
# https://gist.github.com/plentz/6737338 | |
upstream odoo { | |
server 127.0.0.1:8069; | |
} | |
upstream odoo-chat { |
NewerOlder