kubectl get secret sh.helm.release.v1..v1 -o jsonpath="{ .data.release }" | base64 -d | base64 -d | gunzip -c | jq '.chart.templates[].data' | tr -d '"' | base64 -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
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
// Funzione per validare un campo stringa contro parole chiave SQL pericolose e caratteri | |
func isValidSQLField(field string) bool { | |
// Caratteri non permessi (aggiungi o modifica a seconda delle tue necessità) |
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
DO $$ | |
DECLARE sch RECORD; | |
BEGIN | |
EXECUTE format('GRANT CONNECT ON DATABASE %I TO %I', 'dbName', 'user'); | |
FOR sch IN | |
SELECT nspname FROM pg_catalog.pg_namespace where nspname NOT IN ('pg_toast', 'pg_catalog', 'information_schema') | |
LOOP | |
EXECUTE format('GRANT USAGE ON SCHEMA %I TO %I', sch.nspname, 'user'); |
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
DO $$ | |
DECLARE sch RECORD; | |
DECLARE tbl RECORD; | |
DECLARE seq RECORD; | |
DECLARE func RECORD; | |
DECLARE proc RECORD; | |
BEGIN | |
EXECUTE format('ALTER DATABASE %I OWNER TO %I', 'dbName', 'user'); | |
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
Start-Job -ScriptBlock { | |
$ipaddress = '127.0.0.1' | |
$port = 3000 | |
$try = 0 | |
$sleepTime = 10 | |
while(1) { | |
Start-Sleep -s $sleepTime | |
try { | |
$connection = New-Object System.Net.Sockets.TcpClient($ipaddress, $port) |
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
Param( | |
[Parameter(Mandatory=$true,valueFromPipeline=$true, HelpMessage="Artifactory username")][String] $username, | |
[Parameter(Mandatory=$true, HelpMessage="Artifactory password")][SecureString]$password | |
) | |
$pw = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) | |
write-host $username:$pw |
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
require('http').createServer(function (req, res) { res.end('OK'); }).listen(3000); |
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
-- find in JSON column array | |
select d -> 'data' ->> 'type' as type, * | |
from events e, jsonb_array_elements((e.ev_object -> 'data')::jsonb) as d | |
where d -> 'data' -> 'profile' ->> 'surname' = 'BRANCATI' | |
-- check if a value in JSON solumn exists | |
select * | |
from events e, jsonb_array_elements((e.ev_object -> 'data')::jsonb) as d | |
where (d -> 'data' ->> 'sysRefs') is null | |
NewerOlder