Skip to content

Instantly share code, notes, and snippets.

View nicewook's full-sized avatar

Jeong Hyunseok nicewook

View GitHub Profile
@nicewook
nicewook / settings.json
Last active September 16, 2021 09:40
settings.json for the Windows Terminal 2021-09-16
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [],
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"profiles":
{
"defaults": {},
"list":
[
{
package main
import (
"fmt"
"time"
)
// local time calculation
func main() {
currentTime := time.Now()
package main
import (
"fmt"
"time"
)
// local time calculation
func main() {
currentTime := time.Now()
@nicewook
nicewook / mygist.go
Last active September 21, 2020 10:15
my gist test code
package main
import "fmt"
func main() {
fmt.Println("I will upload this file to GitHub by using GitHub CLI")
fmt.Println("I edit this for thet gist edit feature")
}
package main
import (
"fmt"
"time"
)
func main() {
doneOrDone := make(chan interface{})
doneRepeat := make(chan interface{})
package main
import (
"fmt"
"time"
)
func main() {
doneOrDone := make(chan interface{})
doneRepeat := make(chan interface{})
package main
import (
"fmt"
"time"
)
func main() {
doneOrDone := make(chan interface{})
doneRepeat := make(chan interface{})
orDone := func(done, c <-chan interface{}) <-chan interface{} {
valStream := make(chan interface{})
go func() {
defer close(valStream)
for {
select {
case <-done:
return
case v, ok := <-c:
if ok == false {
package main
import (
"encoding/binary"
"encoding/json"
"fmt"
"log"
"github.com/timshannon/bolthold"
bolt "go.etcd.io/bbolt"
package main
import (
"sync"
"testing"
)
func BenchmarkContextSwitch(b *testing.B) {
var wg sync.WaitGroup
begin := make(chan struct{})