There are some key values that the time.Parse
is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")
to
1. Ask HN: What books changed the way you think about almost everything? - https://news.ycombinator.com/item?id=19087418 | |
2. Ask HN: What are the best MOOCs you've taken? - https://news.ycombinator.com/item?id=16745042 | |
3. Ask HN: How to self-learn electronics? - https://news.ycombinator.com/item?id=16775744 | |
4. Ask HN: Successful one-person online businesses? - https://news.ycombinator.com/item?id=21332072 | |
5. Ask HN: What's the most valuable thing you can learn in an hour? - https://news.ycombinator.com/item?id=21581361 |
#!/usr/bin/env sh | |
# | |
# Log in to and unlock Bitwarden CLI. | |
# | |
# If you save the returned session key in a BW_SESSION envvar that will unlock | |
# your Bitwarden vault for the current shell session. Once BW_SESSION has been | |
# set in one shell session it'll also be inherited by any commands or scripts | |
# run from that shell session. | |
# | |
# Usage (sh): |
There are some key values that the time.Parse
is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")
to
openssl s_client -state -connect 216.58.196.174:443 -servername 1337x.be -tls1_3 |
/** | |
* E.g. | |
* cartesianProduct(listOf(1, 2, 3), listOf(true, false)) returns | |
* [(1, true), (1, false), (2, true), (2, false), (3, true), (3, false)] | |
*/ | |
fun <T, U> cartesianProduct(c1: Collection<T>, c2: Collection<U>): List<Pair<T, U>> { | |
return c1.flatMap { lhsElem -> c2.map { rhsElem -> lhsElem to rhsElem } } | |
} |
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
>&2 echo "usage: $0 <kafka_binary_folder> <bootstrap.server>" | |
>&2 echo | |
>&2 echo "It outputs the list of topics consumed by consumergroup as csv." | |
>&2 echo "With the following structure:" | |
>&2 echo " <consumer>,<topic>" | |
exit 1 | |
fi |
Example of a bare-minimum terraform script to setup an API Gateway endpoint that takes records and puts them into an SQS queue.
Start by creating the SQS queue.
resource "aws_sqs_queue" "queue" {
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.
import kotlin.reflect.KSuspendFunction1 // You have to import this manually | |
import kotlin.reflect.KSuspendFunction2 // You have to import this manually | |
inline suspend fun <reified Service: RetroService, Result> doSuspendedApiCall( | |
services: List<RetroService>, | |
apiCall: KSuspendFunction1<Service, Result> | |
): Result? { | |
// identical to doApiCall | |
} |