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
| # https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode | |
| $ export PGSSLMODE=prefer | |
| $ psql ... |
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 com.example.config | |
| import com.example.Patchable | |
| import com.example.PatchableDeserializer | |
| import com.fasterxml.jackson.databind.DeserializationFeature | |
| import com.fasterxml.jackson.databind.ObjectMapper | |
| import com.fasterxml.jackson.databind.SerializationFeature | |
| import com.fasterxml.jackson.databind.module.SimpleModule | |
| import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | |
| import org.springframework.context.annotation.Bean |
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
| #!/usr/bin/env bash | |
| cd /tmp | |
| wget -O azcopyv10.tar https://aka.ms/downloadazcopy-v10-mac | |
| tar -xf azcopyv10.tar | |
| cd azcopy_darwin_amd64_10.0.8 | |
| cp azcopy /usr/local/bin/ | |
| cd - | |
| azcopy --help |
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 com.example | |
| import com.example.testutils.junit5.testFactory | |
| import com.example.testutils.springTest.BootWebMockMvcTest | |
| import mu.KLogging | |
| import org.amshove.kluent.shouldEqual | |
| import org.junit.jupiter.api.Test | |
| import org.junit.jupiter.api.TestFactory | |
| import org.springframework.beans.factory.annotation.Autowired | |
| import java.math.BigDecimal |
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
| # ========= | |
| # demo: https://github.com/JetBrains/Exposed/tree/master/src/test/kotlin/demo | |
| # dml tests: https://github.com/JetBrains/Exposed/blob/master/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/DMLTests.kt | |
| # ===== GIS | |
| https://github.com/JetBrains/Exposed/issues/459 | |
| # === native |
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
| document.querySelector('#region > div > div:nth-child(1) > span') | |
| in chrome dev tools you can execute: | |
| $x('//*[@id="region"]/div/div[1]/span') | |
| which should be similar to ... | |
| function getElementByXpath(path) { |
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
| see: https://sqlbolt.com/lesson/select_queries_order_of_execution | |
| 1. FROM and JOINs | |
| 2. WHERE | |
| 3. GROUP BY | |
| 4. HAVING | |
| 5. SELECT | |
| 6. DISTINCT | |
| 7. ORDER BY | |
| 8. LIMIT / OFFSET |
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
| scenario | |
| ====================== | |
| given: | |
| table wf_test | |
| - wf_id (PK NOT NULL) | |
| should become: |
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
| https://github.com/toddmotto/public-apis |
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.* | |
| fun <T : Any> Optional<T>.toNullable(): T? = when (isPresent) { | |
| true -> get() | |
| false -> null | |
| } | |
| fun foo(x:Optional<Int>):Int? = x.toNullable() |