This file contains 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
pipeline { | |
agent { | |
docker { | |
image 'hashicorp/terraform:latest' | |
label 'LINUX-SLAVE' | |
args '--entrypoint="" -u root -v /opt/jenkins/.aws:/root/.aws' | |
} | |
} | |
options { | |
ansiColor('xterm') |
This file contains 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/sh -ex | |
#export PATH=/usr/pgsql-11/bin:$PATH | |
pg_ctl stop -D /tmp/master || echo "ok" | |
pg_ctl stop -D /tmp/slave || echo "ok" | |
rm -rf /tmp/master | |
rm -rf /tmp/slave | |
# setup master | |
initdb -D /tmp/master |
This file contains 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
\set aid random(1, 100000 * :scale) | |
\set bid random(1, 1 * :scale) | |
\set tid random(1, 10 * :scale) | |
\set delta random(-5000, 5000) | |
BEGIN; | |
UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid; | |
SELECT abalance FROM pgbench_accounts WHERE aid = :aid; | |
UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid; | |
UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; | |
INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); |
This file contains 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
trustedIP="1.2.3.4/32" | |
cat <<- EOF > /etc/iptables/rules.v4 | |
# Generated by iptables-save v1.8.7 on Wed Mar 29 14:37:32 2023 | |
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT |
This file contains 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
; Assumes dockerfile with: | |
; ENTRYPOINT ["/usr/bin/supervisord", "-c", "/var/app/supervisord.conf"] | |
[supervisord] | |
;logfile=/var/app/logs/ ; (main log file;default $CWD/supervisord.log) | |
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
logfile_backups=5 ; (num of main logfile rotation backups;default 10) | |
loglevel=debug ; (log level;default info; others: debug,warn,trace) | |
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
nodaemon=true ; (start in foreground if true;default false) |
This file contains 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
OCTANE_SERVER=swoole | |
OCTANE_HTTPS=true |
This file contains 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
<?php | |
namespace App\Helpers; | |
class NamespaceHelper | |
{ | |
/** | |
* Get the namespace of a class. | |
* | |
* @param string $className |
This file contains 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
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Alta Floresta D'Oeste"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Ariquemes"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Cabixi"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Cacoal"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Cerejeiras"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Colorado do Oeste"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Corumbiara"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Costa Marques"); | |
insert into cities (cod, uf_name, city) values (11, "Rondônia", "Espigão D'Oeste"); |
This file contains 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
Cities::create([ | |
'cod' => '11', | |
'uf_name' => 'Rondônia', | |
'city' => "Alta Floresta D'Oeste", | |
]); | |
Cities::create([ | |
'cod' => '11', | |
'uf_name' => 'Rondônia', | |
'city' => "Ariquemes", |
This file contains 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
<?php | |
exec('openssl enc -aes-256-cbc -pbkdf2 -k 102030 -in /mnt/c/Lixo/a.enc.txt -out /mnt/c/Lixo/b.txt');// Encrypt | |
exec('openssl enc -aes-256-cbc -pbkdf2 -k 102030 -d -in /mnt/c/Lixo/a.enc.txt -out /mnt/c/Lixo/b.txt');// Decrypt | |
/** | |
É nescessário possuir o OpenSSL no computador, se for windows, basta realizar o download dos seguintes arquivos e adicionar a um diretório que esteja na path do sistema. | |
https://host.sisecf.app/arquivos/openssl/msys-crypto-1.1.dll | |
https://host.sisecf.app/arquivos/openssl/msys-ssl-1.1.dll | |
https://host.sisecf.app/arquivos/openssl/openssl.exe | |
ou |
NewerOlder