SELECT state,
pid,
timezone('Europe/Paris', query_start),
usename,
substring(query,1, 20)
FROM pg_stat_activity
WHERE
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
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- id: auth | |
uses: google-github-actions/auth@v0.8.1 |
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
# generate an uuid | |
uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '\n' | pbcopy |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
//flatten it flattens the array | |
//It returnes the flatten array. | |
func flatten(toFlatten []interface{}) []interface{} { |
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
server=google.com | |
server=443 | |
alias=alias | |
password=changeit | |
keytool -printcert -sslserver ${server}:${port} -rfc > tempfile | |
keytool -import -noprompt -alias ${alias} -keystore knox.jks -storepass ${password} < tempfile |
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
{ | |
"name": "yum-proxy", | |
"type": "groovy", | |
"content": "def request = new groovy.json.JsonSlurper().parseText(args); repository.createYumProxy(request.name, request.url);" | |
} |
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
%echo Generating a basic OpenPGP key | |
Key-Type: RSA | |
Key-Length: 2048 | |
Subkey-Type: RSA | |
Subkey-Length: 2048 | |
Name-Real: Sponge Bob | |
Name-Comment: Patrick | |
Name-Email: bob.sponge@squarepants.com | |
Expire-Date: 666 | |
passphrase: a best passphrase |
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o pipefail | |
set -o nounset | |
set -o xtrace |
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
help: ## this help | |
@grep -hE '^[a-zA-Z_-]+.*?:.*?## .*$$' ${MAKEFILE_LIST} | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
goal1: ## goal1 the goal# | |
echo goal1 | |
goal2: goal1 ## goal2 the goal# | |
echo goal2 |
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
SRC_DIR= | |
BUILD_VERSION=$(shell cat VERSION.txt) | |
#Default application or lambda | |
APPL?=<your lambda in cmd> | |
######## commom | |
PKGGOFILES=$(shell go list ./... | grep -v /vendor/) | |
CMD_TO_BUILD := ${sort ${dir ${wildcard ./cmd/*/}}} |
NewerOlder