Skip to content

Instantly share code, notes, and snippets.

View lucasortigoso's full-sized avatar
🎯
Focusing

Lucas Ortigoso lucasortigoso

🎯
Focusing
View GitHub Profile
@tac-yacht
tac-yacht / build.gradle
Last active September 21, 2021 22:56
codeartifact's credentials get from profile
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.amazonaws:aws-java-sdk-codeartifact:1.11.801'
}
}
import com.amazonaws.services.codeartifact.AWSCodeArtifactClient;
@destan
destan / ParseRSAKeys.java
Last active September 3, 2024 13:21
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active September 19, 2024 05:47
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'