Skip to content

Instantly share code, notes, and snippets.

@tupunco
tupunco / vs-dark-hdpi.css
Last active June 27, 2017 01:18
LiteIDE_vs-dark-hdpi.qss.Skin
/* ===add file: \liteide\share\liteide\liteapp\qss\vs-dark-hdpi.qss ===*/
/* ===FROM: https://gist.github.com/tupunco/fdb713ec9c6189a877e5eb003bd0457d ===*/
/* === Shared === */
QStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox,
QGroupBox, QStatusBar, QToolButton, QComboBox, QDialog, QListView,
QTabBar, QMenu, QMenuBar, QWidget::window {
background-color: #252526;
color: #F1F1F1;
}
@tupunco
tupunco / IRng.cs
Created April 25, 2016 14:00
Weight Rand Helper
public interface IRng
{
int Next(int maxValue);
int Next(int minValue, int maxValue);
int Next();
void NextBytes(byte[] buffer);
double NextDouble();
}
@tupunco
tupunco / rand.go
Last active May 2, 2018 12:29
golang Weight Rand Helper
package utils
import (
"crypto/rand"
"errors"
"math/big"
prand "math/rand"
"time"
)
@tupunco
tupunco / issues_505.md
Last active April 30, 2016 14:42
derekparker_delve bug issues_505

windows 'dlv debug' include 'exec.LookPath(os.Args[0])' error #505

issues#505

  1. What version of Delve are you using (dlv version)?

master

  1. What version of Go are you using? (go version)?
@tupunco
tupunco / ubuntu-note.md
Last active May 10, 2016 08:34
ubuntu 16.04 setup
  1. windows grub
  • update-grub2
  • sudo gedit /etc/default/grub
  1. setup ubuntu-mate
  • ubuntu-mate-core >* ubuntu-mate-desktop
@tupunco
tupunco / vscode.md
Last active May 28, 2018 10:41
vscode-go 开发环境配置[请访问新篇]

VSCode 开发配置

本篇内容有点陈旧, 请访问新篇 vscode-go 插件安装

settings.json

VSCode 工作区配置. 菜单 文件->个性化配置->工作区设置 来触发本配置. GOPATH 多个路径在 Mac 下需要 : 分割, Windows 下需要 ; 分割, 下面涉及到的 GOPATH 都遵循此规则. 本节点配置后需要重启 VSCode 来生效.

@tupunco
tupunco / keybindings.json
Last active June 27, 2017 01:14
vscode.settings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+u",
"command": "editor.action.transformToLowercase",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+u",
"command": "editor.action.transformToUppercase",
@tupunco
tupunco / bolt.go
Last active December 16, 2016 06:57
boltdb demo
package main
import (
"bytes"
"encoding/json"
"errors"
"reflect"
"github.com/boltdb/bolt"
@tupunco
tupunco / vscode-go 插件安装.md
Last active April 18, 2023 09:13
vscode-go 配置

ctrl+shift+p

  • 安装 vscode-go 插件:
> ext install Go
  • 安装 go tools:
> Go Install/Update Tools
@tupunco
tupunco / tidb_win_build.bat
Last active March 10, 2019 19:12
tidb windows build&test
@ECHO off
ECHO ------------------build goyacc------------------
go build -v -o bin/goyacc.exe parser/goyacc/main.go
ECHO ------------------gen parser.go------------------
bin\goyacc.exe -o NUL -xegen temp_parser_file parser/parser.y
bin\goyacc.exe -o parser/parser.go -xe temp_parser_file parser/parser.y
rm -f y.output
rm -f temp_parser_file