Skip to content

Instantly share code, notes, and snippets.

View jasoet's full-sized avatar
🎯
Focusing

Deny Prasetyo jasoet

🎯
Focusing
View GitHub Profile
package job
import (
"fmt"
"github.com/go-co-op/gocron"
"reflect"
"strings"
"sync"
"time"
)
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"
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

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
#!/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
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
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
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
@jasoet
jasoet / service_doc.md
Created February 20, 2018 03:28 — forked from madebyais/service_doc.md
Service documentation

{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