Skip to content

Instantly share code, notes, and snippets.

Avatar
defer/ mañana

go je gocs

defer/ mañana
  • murc
  • Cebu City
View GitHub Profile
@gocs
gocs / jsfrick.js
Last active May 2, 2020
javascript's available alphabets without using alphabets
View jsfrick.js
// javascript available alphabets got without using alphabets
// one of the limitiations are some uppercase layers
// which could only be solved if I have uppercase `C`
/******************************************************************************
* below are some strings generated by some identities
*
* true
* false
@gocs
gocs / go-contracts-proposal-thingy.go
Created May 1, 2020
go contracts proposal thingy
View go-contracts-proposal-thingy.go
// Copyright 2020 github.com/gocs
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@gocs
gocs / hugo.sh
Created Apr 18, 2020
hugo new site in current folder/directory or without making a folder inside the repo
View hugo.sh
#!/usr/bin/env bash
hugo new site quickstart && mv ./quickstart/* . && rm -rf ./quickstart
@gocs
gocs / ~\.omnisharp\omnisharp.json
Last active Dec 20, 2019
vscode omnisharp inside whole pc userspace k and r braces
View ~\.omnisharp\omnisharp.json
{
"FormattingOptions": {
"NewLinesForBracesInLambdaExpressionBody": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInTypes": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInAccessors": false,
@gocs
gocs / goroutine.go
Created Apr 8, 2019
goroutine that counts while sleeping
View goroutine.go
package main
import (
"fmt"
"time"
)
func count(quit chan bool) {
count := 0
for {
@gocs
gocs / goroutine.go
Created Apr 8, 2019
goroutine with channels life cycle
View goroutine.go
package main
import "fmt"
func do_stuff(done chan bool) {
fmt.Println("2")
done <- true
fmt.Println("3")
}
@gocs
gocs / goroutine.go
Last active Apr 8, 2019
goroutine lifecycle
View goroutine.go
package main
import (
"fmt"
"time"
)
func sync() {
time.Sleep(time.Second / 2)
fmt.Println("1")
You can’t perform that action at this time.