Skip to content

Instantly share code, notes, and snippets.

View chobijaeyu's full-sized avatar
😺
恩宠与勇气

chobijaeyu

😺
恩宠与勇气
  • SPAからサーバーサイドまで設計・実装します。
  • γ Mic
View GitHub Profile
@chobijaeyu
chobijaeyu / set.go
Created June 13, 2022 07:49 — forked from bgadrian/set.go
How to implement a simple set data structure in golang
type Set struct {
list map[int]struct{} //empty structs occupy 0 memory
}
func (s *Set) Has(v int) bool {
_, ok := s.list[v]
return ok
}
@chobijaeyu
chobijaeyu / Drop Science Pack Compatibility with Enemy Race Manager
Last active May 24, 2022 23:56
Drop Science Pack Compatibility with Enemy Race Manager
require("util")
local auto_cons_researched = true
function auto_cons_check (force)
if force then
if force.technologies["steel-processing"].researched then
auto_cons_researched = true
end
elseif game.players[1] and game.players[1].force.technologies["steel-processing"].researched then
@chobijaeyu
chobijaeyu / setRefreshToken.go
Created June 14, 2021 04:37
setRefreshToken by json
func getpath() string {
file := os.Args[0]
path, err := exec.LookPath(file)
if err == nil {
path = filepath.Dir(path)
}
return path
}
func readToken() {
package ulogger
import (
"fmt"
"testing"
"time"
)
var p = `{
"Console": {
package ulogger
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"runtime"
"strings"
"sync"
package ulogger
import (
"bufio"
"fmt"
"os"
"strconv"
"testing"
"time"
)
@chobijaeyu
chobijaeyu / file.go
Last active February 23, 2020 15:00
file.go
package ulogger
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"path/filepath"
____________
< beavis.zen >
------------
\ __------~~-,
\ ,' ,
/ \
/ :
| '
| |
| |
@chobijaeyu
chobijaeyu / customizing-vs-code.md
Last active January 30, 2020 05:29 — forked from rzvdaniel/customizing-vs-code.md
Customizing VS Code for Two Fonts.

Customizing VS Code

I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.

Gotchas

  • Ensure it’s a file URL e.g. { "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
  • If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
  • Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.

For reference

@chobijaeyu
chobijaeyu / cloudSettings
Last active April 6, 2020 17:54
vscode sync
{"lastUpload":"2020-04-06T17:54:55.744Z","extensionVersion":"v3.4.3"}