Skip to content

Instantly share code, notes, and snippets.

# Source: https://gist.github.com/a5870806ae6f21de271bf9214e523b53
##################
# Create Cluster #
##################
minikube start --memory 6g --cpus 4
#################
# Install Istio #
@16892434
16892434 / cgo.md
Created July 29, 2022 01:54 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@16892434
16892434 / main.go
Created August 3, 2022 09:49 — forked from kpurdon/main.go
golang graceful server shutdown example
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@16892434
16892434 / get-latest-tag-on-git.sh
Created August 4, 2022 01:28 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@16892434
16892434 / xcode-duplicate-line.md
Created September 5, 2022 07:49 — forked from atereshkov/xcode-duplicate-line.md
Xcode 13 duplicate line shortcut (hotkey)

Xcode 13 duplicate line shortcut

  1. Run
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources//IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@16892434
16892434 / JSONSaveLoad.swift
Created September 9, 2022 07:15 — forked from norsez/JSONSaveLoad.swift
Load and Save JSON objects into a local file (written in Swift)
import Foundation
/**
Extension to save/load a JSON object by filename. (".json" extension is assumed and automatically added.)
*/
extension JSONSerialization {
static func loadJSON(withFilename filename: String) throws -> Any? {
let fm = FileManager.default
@16892434
16892434 / setcookie.go
Created October 13, 2022 03:03 — forked from NaniteFactory/setcookie.go
chromedp set-cookie example
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/network"
@16892434
16892434 / gzipWriter.go
Created October 14, 2022 08:54 — forked from mchirico/gzipWriter.go
Example of writing a gzip file in go (golang). This appends data to the same file every time it is run. It is important to Flush() the data before closing the file.
/*
This is an example of a golang gzip writer program,
which appends data to a file.
*/
package main
@16892434
16892434 / read_gzip_lines.go
Created October 14, 2022 08:55 — forked from lovasoa/read_gzip_lines.go
How to Read Lines from GZIP-Compressed Files in Go
package main
import (
"bufio"
"compress/gzip"
"fmt"
"io"
"log"
"os"
)