Skip to content

Instantly share code, notes, and snippets.

View NewbMiao's full-sized avatar
📚
Reading

newbmiao NewbMiao

📚
Reading
View GitHub Profile
@NewbMiao
NewbMiao / AndChainingOperationNotEndEvaluationEarlyDebugOutput
Created September 13, 2024 01:52
And chaining operation not end evaluation early
2024-09-13T09:45:42.053+0800 [INFO] Terraform version: 1.9.3
2024-09-13T09:45:42.053+0800 [DEBUG] using github.com/hashicorp/go-tfe v1.51.0
2024-09-13T09:45:42.053+0800 [DEBUG] using github.com/hashicorp/hcl/v2 v2.20.0
2024-09-13T09:45:42.053+0800 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-09-13T09:45:42.053+0800 [DEBUG] using github.com/zclconf/go-cty v1.14.4
2024-09-13T09:45:42.053+0800 [INFO] Go runtime version: go1.22.5
2024-09-13T09:45:42.053+0800 [INFO] CLI args: []string{"terraform", "plan"}
2024-09-13T09:45:42.053+0800 [TRACE] Stdout is a terminal of width 90
2024-09-13T09:45:42.053+0800 [TRACE] Stderr is a terminal of width 90
2024-09-13T09:45:42.053+0800 [TRACE] Stdin is a terminal
@NewbMiao
NewbMiao / teamcity.sh
Last active December 25, 2019 07:31
For teamcity local test(support docker in agent)
#!/bin/bash
# For teamcity local test(support docker in agent)
homeDir=$(env | grep ^HOME= | cut -d '=' -f2)
TC_DIR=$homeDir/teamcity
TC_NAME_PREFIX=teamcity-server-
TC_AGENT_NAME=${TC_NAME_PREFIX}agent
TC_SERVER_NAME=${TC_NAME_PREFIX}instance
action=$1
@NewbMiao
NewbMiao / Dockerfile
Last active December 24, 2019 12:52
Cmd to run gotrace tool that compiled by go1.8. (docker pull newbmiao/gotrace1.8)
FROM divan/golang:gotrace
RUN go get -u github.com/divan/gotrace && cd $GOPATH/src/github.com/divan/gotrace && git checkout go18 && go install
RUN mv /go/bin/gotrace /usr/local/bin
EXPOSE 2000
ENTRYPOINT ["gotrace"]
@NewbMiao
NewbMiao / .mc_rc
Last active March 20, 2023 13:39
some cmd for daily used
#homebrew
export HOMEBREW_NO_AUTO_UPDATE=1 && export HOMEBREW_AUTO_UPDATING=0
#app
alias allowAllDmg="sudo spctl --master-disable"
function dnsrestart(){
sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq
sudo killall -HUP mDNSResponder
@NewbMiao
NewbMiao / functional_options_pattern_in_go
Created February 2, 2018 07:39
函数式配置模式
package main
import (
"fmt"
)
var defaultStuffClient = stuffClient{
retries: 3,
timeout: 2,
}
@NewbMiao
NewbMiao / go-chan-pool.go
Last active December 25, 2019 08:17
go chan pool
package main
import (
"sync"
"time"
"runtime"
"fmt"
)
var pv PoolVar
@NewbMiao
NewbMiao / go-interface-func.go
Last active November 1, 2017 06:40
go interface func
//http://www.flysnow.org/2016/12/30/golang-function-interface.html
package main
import (
"fmt"
)
type Handler interface {
Do(k, v interface{})
}
@NewbMiao
NewbMiao / why Laravel5.2 blocked 404 because of xdebug.var_display_max_depth set too big?.md
Created January 8, 2017 13:06
why Laravel5.2 blocked 404 because of xdebug.var_display_max_depth set too big?

append my xdebug config & gdb\pstack\strace output

  • xdebug config
[xdebug]
zend_extension=/home/vagrant/online/php-5.6.21/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_port=9999