Skip to content

Instantly share code, notes, and snippets.

Avatar
😺
恩宠与勇气

chobijaeyu

😺
恩宠与勇气
  • SPAからサーバーサイドまで設計・実装します。
  • γ Mic
View GitHub Profile
@chobijaeyu
chobijaeyu / set.go
Created Jun 13, 2022 — forked from bgadrian/set.go
How to implement a simple set data structure in golang
View set.go
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
Drop Science Pack Compatibility with Enemy Race Manager
View 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 Jun 14, 2021
setRefreshToken by json
View setRefreshToken.go
func getpath() string {
file := os.Args[0]
path, err := exec.LookPath(file)
if err == nil {
path = filepath.Dir(path)
}
return path
}
func readToken() {
View log_test.go
package ulogger
import (
"fmt"
"testing"
"time"
)
var p = `{
"Console": {
View log.go
package ulogger
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"runtime"
"strings"
"sync"
View file_test.go
package ulogger
import (
"bufio"
"fmt"
"os"
"strconv"
"testing"
"time"
)
View file.go
package ulogger
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"path/filepath"
View cowsay.txt
____________
< beavis.zen >
------------
\ __------~~-,
\ ,' ,
/ \
/ :
| '
| |
| |
@chobijaeyu
chobijaeyu / customizing-vs-code.md
Last active Jan 30, 2020 — forked from rzvdaniel/customizing-vs-code.md
Customizing VS Code for Two Fonts.
View customizing-vs-code.md

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

View cloudSettings
{"lastUpload":"2020-04-06T17:54:55.744Z","extensionVersion":"v3.4.3"}