./gradlew test
> Task :pkl-cli:test
CliDownloadPackageCommandTest > download multiple failing packages(Path) FAILED
org.opentest4j.AssertionFailedError:
Expecting message to be:
"Failed to download some packages.
- Get the latest release: https://releases.nixos.org/?prefix=nix/
- Extract the release
- Setup
/nix
sudo mkdir /nix sudo chown $USER /nix
- Run installer
NIX_INSTALLER_NO_MODIFY_PROFILE=true ./install
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-server
spec:
selector:
matchLabels:
run: hello-server
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
sealed class Result<out V, out E> { | |
data class Failure<out FE>(val e: FE): Result<Nothing, FE>() | |
data class Success<out SV>(val v: SV): Result<SV, Nothing>() | |
companion object { | |
fun <PV> succeed(v: PV): Result<PV, Nothing> = Success(v) | |
fun <PE> fail(e: PE): Result<Nothing, PE> = Failure(e) | |
} | |
inline fun <MR> map(f: (V) -> MR): Result<MR, E> { |
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
mkdir tmp | |
cd tmp | |
curl -sL https://start.spring.io/starter.zip -d bootVersion=2.4.5 -d dependencies=web -o demo.zip; unzip demo.zip; rm demo.zip | |
echo "hello, world" > src/main/resources/static/index.html | |
./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=gcr.io/jw-demo/springboot-demo -Dspring-boot.build-image.builder=gcr.io/buildpacks/builder:v1 | |
docker push gcr.io/jw-demo/springboot-demo |
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
export GOOGLE_APPLICATION_CREDENTIALS=your.json | |
docker run -it \ | |
-eCLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=/certs/svc_account.json \ | |
-v$GOOGLE_APPLICATION_CREDENTIALS:/certs/svc_account.json \ | |
gcr.io/google.com/cloudsdktool/cloud-sdk |
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
export GOOGLE_APPLICATION_CREDENTIALS=your.json | |
docker run -it \ | |
-eTRUSTED_ENVIRONMENT=true \ | |
-eCLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=/certs/svc_account.json \ | |
-v$GOOGLE_APPLICATION_CREDENTIALS:/certs/svc_account.json \ | |
-v/var/run/docker.sock:/var/run/docker.sock \ | |
--entrypoint=/bin/bash \ | |
gcr.io/cloudshell-images/cloudshell \ | |
--login |
docker run --rm -ePOSTGRES_PASSWORD=password -p5432:5432 --name my-postgres postgres:13.1
docker exec -it my-postgres psql -U postgres
cat foo.sql | docker exec -i my-postgres psql -U postgres
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
case class WSRequest(url: String, headers: Map[String, String] = Map.empty) { | |
def withHeaders(_headers: (String, String)*): WSRequest = { | |
copy(headers = Map.from(_headers)) | |
} | |
} | |
val r0 = WSRequest("asdf", Map("foo" -> "bar")) | |
val r1 = WSRequest("asdf") | |
val r2 = r1.withHeaders("foo" -> "bar") // syntactic sugar for r1.copy(headers = ...) |
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
trigger OpportunityCreatedWebhookTrigger on Opportunity (after insert) { | |
String url = 'https://echo-webhook.herokuapp.com/test1234'; | |
String content = Webhook.jsonContent(Trigger.new, Trigger.old); | |
Webhook.callout(url, content); | |
} |
NewerOlder