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 com.example | |
import com.fasterxml.jackson.annotation.JsonProperty | |
import com.fasterxml.jackson.annotation.JsonTypeInfo | |
import com.vladmihalcea.hibernate.type.json.JsonBinaryType | |
import org.hibernate.annotations.Type | |
import org.hibernate.annotations.TypeDef | |
import org.springframework.boot.CommandLineRunner | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.runApplication |
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
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'); |
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
// 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 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 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 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 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 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 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 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 { |
NewerOlder