Skip to content

Instantly share code, notes, and snippets.

@kangkyu
kangkyu / marshal_json.go
Last active June 19, 2019 01:53
json.Marshal
package main
import (
"encoding/json"
"fmt"
)
type person struct {
First string
Last string
@kangkyu
kangkyu / tf-log-trace.txt
Created April 5, 2023 08:41
output of TF_LOG=trace
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
2023-04-05T01:33:47.986-0700 [INFO] backend/local: apply calling Apply
2023-04-05T01:33:47.987-0700 [DEBUG] Building and walking apply graph for NormalMode plan
2023-04-05T01:33:47.987-0700 [TRACE] Executing graph transform *terraform.ConfigTransformer
2023-04-05T01:33:47.987-0700 [TRACE] ConfigTransformer: Starting for path:
@kangkyu
kangkyu / enclaves.go
Created April 11, 2023 20:49
Leetcode answer (not working)
type Cell struct {
north, east, south, west int
}
func numEnclaves(grid [][]int) int {
// return value of this func
count := 0
// row count
m := len(grid)
@kangkyu
kangkyu / response.json
Last active April 25, 2023 22:21
response from a google doc
{
"title": "Title Different",
"body": {
"content": [
{
"endIndex": 1,
"sectionBreak": {
"sectionStyle": {
"columnSeparatorStyle": "NONE",
"contentDirection": "LEFT_TO_RIGHT",