Skip to content

Instantly share code, notes, and snippets.

YuShuangqi ysqi

Block or report user

Report or block ysqi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ysqi / removeSlice.go
Created May 22, 2019
fast remove item from slice
View removeSlice.go
func clearExpiredTx(txs types.Transactions, now time.Time) types.Transactions {
for i := 0; i < len(txs); i++ {
if !txs[i].Expired(now) {
if len(txs) == 1 {
return nil
var last *types.Transaction
ysqi / sortslice_list.go
Created May 7, 2019
fast and safe sort slice like queue
View sortslice_list.go
package sortslice
import (
type Item interface {
Compare(other Item) int
ysqi /
Last active Nov 1, 2018
batch set Disable/Enable Root SSH login with fabric tool (sshd_config PermitRootLogin)
from invoke import Responder
ysqi / decode_bitcoin_block_data.go
Created Dec 11, 2017
Decode bitcoin block chain dat file, and get block data deail content
View decode_bitcoin_block_data.go
package main
import (
ysqi /
Last active Sep 22, 2017 — forked from ifels/centos6.5_nginx
centos 6.5 nginx安装与配置


cd /etc/yum.repos.d/
vim nginx.repo


name=nginx repo
View go-ethereum-debug-pprof.txt
goroutine 146 [running]:
runtime/pprof.writeGoroutineStacks(0x50b6500, 0xc4217a80e0, 0x0, 0xc4209c7ad0)
/usr/local/opt/go/libexec/src/runtime/pprof/pprof.go:608 +0xa7
runtime/pprof.writeGoroutine(0x50b6500, 0xc4217a80e0, 0x2, 0x30, 0x49aed40)
/usr/local/opt/go/libexec/src/runtime/pprof/pprof.go:597 +0x44
runtime/pprof.(*Profile).WriteTo(0x519f0a0, 0x50b6500, 0xc4217a80e0, 0x2, 0xc4217a80e0, 0x51cad40)
/usr/local/opt/go/libexec/src/runtime/pprof/pprof.go:310 +0x3ab
net/http/pprof.handler.ServeHTTP(0xc421793931, 0x9, 0x50bf700, 0xc4217a80e0, 0xc4217a2200)
/usr/local/opt/go/libexec/src/net/http/pprof/pprof.go:237 +0x1b8
net/http/pprof.Index(0x50bf700, 0xc4217a80e0, 0xc4217a2200)
ysqi / main.go
Created Mar 21, 2016
beego get multipevalue from post form
View main.go
package main
import (
func main() {
ysqi / gist:d212166b173b0f81f679
Created Jan 25, 2016
View gist:d212166b173b0f81f679
export WERCKER_STEP_ROOT="/pipeline/hugo-build-e17dfc55-511a-4fc3-8870-37b0470bc71e"
export WERCKER_STEP_ID="hugo-build-e17dfc55-511a-4fc3-8870-37b0470bc71e"
export WERCKER_STEP_OWNER="arjen"
export WERCKER_STEP_NAME="hugo-build"
export WERCKER_REPORT_NUMBERS_FILE="/report/hugo-build-e17dfc55-511a-4fc3-8870-37b0470bc71e/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/hugo-build-e17dfc55-511a-4fc3-8870-37b0470bc71e/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/hugo-build-e17dfc55-511a-4fc3-8870-37b0470bc71e/artifacts"
You can’t perform that action at this time.