Skip to content

Instantly share code, notes, and snippets.

Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1578057396" LAST_MODIFIED="0" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>
.deploy:
image: git.gracious.nl:4567/docker/kubectl
before_script:
- gcloud config set project $GC_PROJECT
- gcloud auth activate-service-account --key-file $SA_GOOGLE_KUBERNETES
- gcloud --quiet container clusters get-credentials $GKE_CLUSTER --zone=$GKE_ZONE
- kubectl config set-context --current --namespace=$GKE_NAMESPACE
- kubectl delete job magento-upgrade --ignore-not-found
script:
- kubectl set image deployment $DEPLOYMENT_MAGENTO magento=$GCR_ZONE/$GC_PROJECT/$CI_PROJECT_NAME:$CI_COMMIT_SHA
@knagaraju
knagaraju / CodeGenMeta.java
Created October 31, 2019 19:13 — forked from chrisvest/CodeGenMeta.java
Example showing how to generate, compile, load and run Java programs at run-time.
import javax.tools.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Method;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;