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
| -- biggest table record | |
| SELECT schemaname || '.' || relname as table,n_live_tup as num_rows | |
| FROM pg_stat_user_tables | |
| ORDER BY n_live_tup DESC LIMIT 10; | |
| -- biggest table size | |
| SELECT nspname|| '.' || relname as table, | |
| pg_size_pretty(pg_total_relation_size(C.oid)) AS total_size | |
| FROM pg_class C | |
| LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) |
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 | |
| /usr/local/bin/pgbadger -I -q ssh://[email protected]//var/log/postgresql/postgresql-9.5-main.log.* -O /var/www/html/pgbadger/db -f s | |
| tderr --prefix '%t [%p-%l] %q%u@%d ' | |
| /usr/local/bin/pgbadger -I -q ssh://[email protected]//var/log/postgresql/postgresql-9.5-main.log -O /var/www/html/pgbadger/shafco -f stde | |
| rr --prefix '%t [%p-%l] %q%u@%d ' | |
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
| I found out that the packaged versions do not work (even the most recent) | |
| The solution is to download and install the packaged version then do a manual install of a different version so you get the libraries from the packaged version and use the executables only from version 12.4 | |
| After this no more empty reports on CentOS | |
| ##Install the packaged version via: | |
| yum install wkhtmltopdf | |
| ##Note Ubuntu works fine. This is for CentOS | |
| cd ~ | |
| wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz |
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
| Widget: | |
| Widget is different or alternate representation to display a screen, fields and attributes in odoo. | |
| Widget allows to change view using different rendering templates and also allows to design as you want. | |
| Example: | |
| widget_name.js |
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-get install libwww-perl | |
| Edit nginx.conf, bagian http | |
| Test curl http://localhost/nginx_status | |
| server { | |
| listen 127.0.0.1; | |
| server_name localhost; | |
| location /nginx_status { |
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
| ssh root@horizon | |
| cd /etc/letsencrypt/live/horizon.remcash.com/ | |
| certbot certonly --force-renew -d horizon.remcash.com | |
| systemctl restart stellar-horizon.service |
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
| <filter string="Today" name="today" domain="[('date_start','>=',time.strftime('%%Y-%%m-%%d'))]"/> | |
| <filter string="This Month" name="thismonth" domain="[('date_start','>=',time.strftime('%%Y-%%m-01'))]"/> | |
| <filter string="This Year" name="thisyear" domain="[('date_start','>=',time.strftime('%%Y-01-01'))]"/> | |
| <filter string="Today" domain="[('start_at', '>=', datetime.datetime.combine(context_today(), datetime.time(0,0,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
| vm.overcommit_memory=2 | |
| vm.swappiness=0 | |
| vm.dirty_ratio=2 | |
| vm.dirty_background_ratio=1 | |
| vm.nr_hugepages=4287 |
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
| Harus enable Windows Script Host: | |
| edit dari regedit: | |
| LOCAL_MACHINE/Software/Microsoft/Windows Script Host/Settings | |
| CURRENT_USER/Software/Microsoft/Windows Script Host/Settings | |
| Key: Enable | |
| Type: DWORD | |
| Value: 1 |
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
| #pip install youtube-dl | |
| #create data.txt berisi ID video youtube per baris | |
| # misalnya URL https://www.youtube.com/watch?v=qZ-ouYWCASo&feature=youtu.be | |
| # ID nya adalah qZ-ouYWCASo | |
| while read p; do | |
| echo "$p" | |
| youtube-dl -f best https://youtube.com/watch?v=$p | |
| done < data.txt |