Get credentials for a given GKE cluster
gcloud container clusters get-credentials $(gcloud container clusters list --format json | jq -r '.[] | "\(.name) --zone \(.location)"' | fzf --height 10 --sync)
package main | |
import ( | |
"encoding/base64" | |
"crypto/x509" | |
"fmt" | |
"github.com/elastic/go-elasticsearch/v8" | |
"io/ioutil" | |
"log" | |
"net/http" |
$ test1=foo | |
$ set -a | |
$ test2=foo | |
$ test3=foo | |
$ set +a | |
$ env | grep test | |
test2=foo | |
test3=foo |
% docker build -t rust . | |
... | |
# Export the image to tarball, which itself contains tarballs and a manifest.json | |
% docker save -o rust.tar rust | |
# Extract the last layer | |
# tar's -O flag extracts a single entry from the tarball. | |
# The file we want is the last "Layer" in the manifest.json | |
% tar -xf rust.tar -O $(tar -xf rust.tar -O manifest.json | jq -r '.[].Layers[-1]') > curlbash.tar |
import Svg exposing (..) | |
import Svg.Attributes exposing (..) | |
import List | |
cycles = 2 | |
yScale = 50 | |
lineThickness = 20 | |
i = List.range 0 (cycles * 360) |
public class Main { | |
public static void main(String[] args) { | |
X x = new X(); | |
Long value = 500L; | |
if (args.length != 1) { | |
System.out.println("Usage: Main <iterations>"); | |
System.exit(1); | |
} |
package main | |
import ( | |
"fmt" | |
"syscall" | |
//~ "time" | |
"unsafe" | |
"golang.org/x/sys/windows" | |
) |
public class Foo { | |
private static final int ITERATIONS = 10000000; | |
public static void main(String[] args) { | |
Foo foo = new Foo(); | |
int i = Integer.parseInt(args[0]); | |
System.out.println(i); | |
if (args[1].equals("a")) { | |
System.out.println("a"); |
# encoding: utf-8 | |
require "benchmark/ips" | |
require "logstash/codecs/base" | |
require "logstash/filters/date" | |
require "logstash/filter_delegator" | |
require "logstash/filters/date-old" | |
# `gradlew build` makes this | |
require "build/libs/logstash-filter-date.jar" |