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
List Images: docker images | |
List Dangling Images: docker images -f dangling=true | |
Remove Image: docker rmi Image <IMAGE> | |
Remove Dangling Images: docker rmi $(docker images -f dangling=true -q) | |
List Containers: docker ps -a | |
Remove Container: docker rm <ID_OR_NAME> | |
List Dangling Volumes: docker volume ls -f dangling=true | |
Remove Dangling Volumes: docker volume rm $(docker volume ls -f dangling=true -q) |
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
import java.util.Arrays; | |
import java.util.regex.Pattern; | |
/** | |
* Responsible for translating a given result code to a Proxy Status. | |
* | |
* @see <a href="https://sibs.docs.onlinepayments.pt/reference/resultCodes">Result Codes</a> | |
*/ | |
public enum ProxyStatus { |
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
git clone [email protected]:oracle/docker-images.git | |
./buildDockerImage.sh -v 11.2.0.2 -x | |
docker run -d --name oracle -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=mypassword --shm-size="2g" -v /opt/oracle/oradata:/opt/oracle/oradata oracle/database:11.2.0.2-xe | |
mvn install:install-file -Dfile=ojdbc8.jar -DgroupId=com.oracle.jdbc -DartifactId=ojdbc8 -Dversion=12.2.0.1 -Dpackaging=jar |
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
spring: | |
jpa: | |
database-platform: org.hibernate.dialect.Oracle10gDialect | |
open-in-view: true | |
hibernate: | |
ddl-auto: none | |
# ddl-auto: create-drop | |
# ddl-auto: validate | |
datasource: |
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
WITH cteTableInfo AS | |
( | |
SELECT | |
COUNT(1) AS ct | |
,SUM(length(t::text)) AS TextLength | |
,'PUBLIC.MY_TABLE'::regclass AS TableName | |
FROM PUBLIC.MY_TABLE AS t | |
) | |
,cteRowSize AS | |
( |
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
version: '2' | |
services: | |
zookeeper: | |
image: wurstmeister/zookeeper:latest | |
ports: | |
- 2181:2181 | |
kafka: |
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
# $ pip3 install pexpect | |
# $ pip3 install pyotp | |
import os | |
import sys | |
import pexpect | |
import pyotp | |
os.environ['AWS_DEFAULT_PROFILE'] = 'admin' # Change this if you have a different profile |
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
/* | |
plugins { | |
... | |
kotlin("plugin.serialization") version "1.4.10" | |
} | |
dependencies { | |
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0") | |
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.0.0") |
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
// build.gradle.kts | |
// testImplementation("com.tngtech.archunit:archunit-junit5-engine:0.17.0") | |
@AnalyzeClasses(packages = ["my.awesome.package"]) | |
class GeneralCodingRulesTest { | |
@ArchTest | |
val `no classes should throw generic exceptions` = NO_CLASSES_SHOULD_THROW_GENERIC_EXCEPTIONS | |
@ArchTest |
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
import {DOMParser} from 'https://deno.land/x/deno_dom/deno-dom-wasm.ts'; | |
import {brightBlue, brightGreen, brightRed, brightYellow} from 'https://deno.land/std/fmt/colors.ts'; | |
const url = 'https://www.worten.pt/gaming/playstation/consolas/ps5/consola-ps5-825gb-7196053'; | |
try { | |
const res = await fetch(url); | |
const html = await res.text(); | |
const doc: any = new DOMParser().parseFromString(html, 'text/html'); |