Skip to content

Instantly share code, notes, and snippets.

View jasoet's full-sized avatar
🎯
Focusing

Deny Prasetyo jasoet

🎯
Focusing
View GitHub Profile
View bloated.go
package status
import (
"experiment/pkg/k8s"
"experiment/pkg/util"
"fmt"
v1 "k8s.io/api/core/v1"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"time"
View GetKubeResourceDetailFromYaml.go
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"k8s.io/client-go/kubernetes/scheme"
"os"
"os/user"
@jasoet
jasoet / Makefiles.md
Created July 8, 2019 06:48 — forked from evertrol/Makefiles.md
Makefile cheat sheet
View Makefiles.md

Makefile cheat sheet

Mostly geared towards GNU make

I've used ->| to indicate a tab character, as it's clearer to read than

  • Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->| 
@jasoet
jasoet / generate_docker_cert.sh
Created November 10, 2018 11:04 — forked from bradrydzewski/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
View generate_docker_cert.sh
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@jasoet
jasoet / ktorreq.kt
Last active October 13, 2018 15:18
Ktor Request
View ktorreq.kt
fun buildRequest(
userId: String,
pemReader: Reader
): HttpRequestBuilder.() -> Unit {
val chefServerHost = "https://chef-server.vpc"
val organizationPath = "/organizations/someorg"
return {
val httpMethod = method
val path = "$organizationPath/${url.encodedPath}"
@jasoet
jasoet / jsonpath.md
Created March 9, 2018 06:49
Json Path usage
View jsonpath.md
title
JSONPath Support

JSONPath template is composed of JSONPath expressions enclosed by {}. And we add three functions in addition to the original JSONPath syntax:

  1. The $ operator is optional since the expression always starts from the root object by default.
  2. We can use "" to quote text inside JSONPath expressions.
  3. We can use range operator to iterate lists.
@jasoet
jasoet / kube_overview.md
Created March 9, 2018 03:04
Kubernetes Overview
View kube_overview.md
approvers title
bgrant0607
hw-qiaolei
Overview of kubectl

kubectl is a command line interface for running commands against Kubernetes clusters. This overview covers kubectl syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the kubectl reference documentation. For installation instructions see installing kubectl.

Syntax

@jasoet
jasoet / kube_cheat_sheet.md
Created March 9, 2018 03:02
Kubernetes Cheat Sheet
View kube_cheat_sheet.md
@jasoet
jasoet / service_doc.md
Created February 20, 2018 03:28 — forked from madebyais/service_doc.md
Service documentation
View service_doc.md

{SERVICE_NAME}

[build_status_badge_if_any] [code_coverage_badge_if_any]

Replace this text with service detail description.

  • What is the purpose of this service ?
  • Background why this service is needed

FEATURES

@jasoet
jasoet / gist:052bef9dabc1f37fc553d67d714f9906
Created November 3, 2016 07:44 — forked from mplatvoet/gist:bd029656bd17412f02cd
CompletableFuture with Kovenant Promises example
View gist:052bef9dabc1f37fc553d67d714f9906
import nl.komponents.kovenant.*
import nl.komponents.kovenant.jvm.asDispatcher
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ForkJoinPool
fun main(args: Array<String>) {
Kovenant.context {
// configure Kovenant with the same pool
// CompletableFutures use. By default it's
// the common pool.