A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
| DROP TABLE IF EXISTS pgbench_generic_log; | |
| CREATE TABLE pgbench_generic_log ( | |
| mtime timestamptz not null default now(), | |
| action char not null check (action in ('I', 'U', 'D')), | |
| username text not null, | |
| table_name text not null, | |
| row_data jsonb not null | |
| ); | |
| CREATE INDEX ON pgbench_generic_log USING brin (mtime); |
| # Minimal example of getting a PostgREST API running from scratch for | |
| # testing purposes. It uses docker to launch a postgres database and | |
| # a postgrest api server. | |
| # This should not be used to deploy a production system but to | |
| # understand how postgrest works. In particular there is no security | |
| # implemented, see the docs for more. | |
| # https://postgrest.org/en/v4.4/ |
| #!/bin/bash | |
| # TestDFS will be performed with the total file size of 1TB using different dfs.block.size variations. | |
| # Usage: TestDFSIO [genericOptions] -read | -write | -append | -clean [-nrFiles N] [-fileSize Size[B|KB|MB|GB|TB]] [-resFile resultFileName] [-bufferSize Bytes] [-rootDir] | |
| # | |
| # The test is designed with two variables | |
| # 1) file_sizes_mb: file size variation with 1GB file x 1,000 = 1TB and 100MB file x 10,000 = 1TB | |
| # this is to test large file and small file impact on HDFS | |
| # 2) dfs.block.size (MB) variation: 512, 256, 128, 50 10 | |
| # this is to test impact of different block sizes. | |
| # |
| input { | |
| elasticsearch { | |
| hosts => [ "HOSTNAME_HERE" ] | |
| port => "9200" | |
| index => "INDEXNAME_HERE" | |
| size => 1000 | |
| scroll => "5m" | |
| docinfo => true | |
| scan => true | |
| } |
| # Install tmux on Centos release 6.5 | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| tar -xvzf libevent-2.0.21-stable.tar.gz | |
| cd libevent-2.0.21-stable | |
| ./configure --prefix=/usr/local |
| user www-data; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
| ========================================== ========================================== | |
| TMUX COMMAND WINDOW (TAB) | |
| ========================================== ========================================== | |
| List tmux ls List ^b w | |
| New new -s <session> Create ^b c | |
| Attach att -t <session> Rename ^b , <name> | |
| Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
| Kill kill-session -t <session> Close ^b & |
| #!/bin/bash | |
| # | |
| # PostgreSQL Backup Script Ver 1.0 | |
| # http://autopgsqlbackup.frozenpc.net | |
| # Copyright (c) 2005 Aaron Axelsen <[email protected]> | |
| # | |
| # This script is based of the AutoMySQLBackup Script Ver 2.2 | |
| # It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
| # | |
| # The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |