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/env python3 | |
| import sys | |
| import csv | |
| import xlsxwriter | |
| """ | |
| requirements: | |
| pip install xlsxwriter | |
| pip install progressbar2 | |
| usage: |
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 | |
| domain=example.com | |
| token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| #get record_id from this command | |
| #curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $api" "https://api.digitalocean.com/v2/domains/$domain/records" | |
| record_id=88888888 | |
| current_ip="$(\ |
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
| sudo apt install apt-transport-https | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | |
| echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list | |
| sudo apt-get update | |
| sudo apt-get install -y mongodb-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
| import os | |
| import datetime | |
| import glob | |
| def modification_date(filename): | |
| t = os.path.getmtime(filename) | |
| return datetime.datetime.fromtimestamp(t) | |
| files = glob.glob('*') |
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/ | |
| upstream odoo { | |
| server 127.0.0.1:8069; | |
| } | |
| upstream odoo-chat { | |
| server 127.0.0.1:8072; |
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 { |
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
| # 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
| # 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
| 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 |