Skip to content

Instantly share code, notes, and snippets.

@holmeszyx
holmeszyx / config_client.json
Last active February 25, 2017 15:20
KCP config file
{
"localaddr": "127.0.0.1:1090",
"remoteaddr": "server:3389",
"key": "",
"crypt": "salsa20",
"mode": "fast",
"conn": 1,
"autoexpire": 60,
"mtu": 1200,
"sndwnd": 1024,
@holmeszyx
holmeszyx / mirros.md
Last active August 9, 2018 07:10
Maven mirro

###aliyun

        maven { url 'https://maven.aliyun.com/repository/public' }

完整

buildscript {
 repositories {
@holmeszyx
holmeszyx / apt_full_qt.md
Last active January 7, 2017 03:01
apt install full qt

参考 What's the development package for Qt5 in 14.04

Qt 的开发

sudo apt-get install qtdeclarative5-dev

Qt的全包

sudo apt-get install \
qtconnectivity5-dev qtbase5-dev qtbase5-dev qtbase5-dev qttools5-dev qttools5-dev qtbase5-dev qttools5-dev qtmultimedia5-dev qtbase5-dev qtconnectivity5-dev libqt5opengl5-dev qtpositioning5-dev qtbase5-dev qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtscript5-dev qtscript5-dev libqt5serialport5-dev qtbase5-dev libqt5svg5-dev qtbase5-dev qttools5-dev libqt5webkit5-dev libqt5websockets5-dev qtbase5-dev libqt5x11extras5-dev qtbase5-dev libqt5xmlpatterns5-dev
@holmeszyx
holmeszyx / autoinput
Last active February 8, 2017 01:22
A bash to input text on focused window
#!/bin/bash
text=$1
if [[ $# -eq 0 ]]; then
# read from pipe
read -t 1 text
fi
if [[ ${text} == "" ]]; then
@holmeszyx
holmeszyx / rm_build_dir.sh
Last active October 10, 2016 10:07
Delete gralde bulid dir, to release disk space
#!/bin/bash
# echo $#
scandir=$(pwd)
if [[ $# -gt 0 ]]; then
scandir=$1
fi
@holmeszyx
holmeszyx / update_vs_go.sh
Created September 22, 2016 14:18
update tools which depended on vscode go plugin
#!/bin/bash
u="-u"
u=""
go get ${u} -v github.com/nsf/gocode
go get ${u} -v github.com/rogpeppe/godef
go get ${u} -v github.com/golang/lint/golint
go get ${u} -v github.com/lukehoban/go-outline
go get ${u} -v sourcegraph.com/sqs/goreturns
@holmeszyx
holmeszyx / Usage.md
Last active August 15, 2016 03:41
create a menu to extract zip which compress with gbk charset
  • create servermeu folder in local path.

    ~/.local/share/kservices5/ServiceMenus/

  • put desktop to folder created above.

  • put bash file into local bin dir.

@holmeszyx
holmeszyx / cof.md
Last active July 11, 2016 01:36
简单的config接口

后台一个接口。 比如:yue.fm/api/config 请求: GET yue.fm/api/config?key={key} 返回: 文本 TEXT

后台界面,可以配置。 列出已有的key-value对。就是个列表。

可以添加。一对。

@holmeszyx
holmeszyx / .tmux.conf
Last active March 5, 2020 14:10
tmux 从当前目录创建新panel
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
@holmeszyx
holmeszyx / random
Created June 21, 2016 09:06
Create random number with bash.
#!/bin/bash
c=$#
#echo $#
if [[ ${c} -gt 0 ]]; then
echo "$RANDOM * $1" | bc
else
echo $RANDOM
fi