ssh -oProxyCommand="nc -x 127.0.0.1:1080 %h %p" [email protected]
alias sshp="ssh -oProxyCommand=\"nc -x 127.0.0.1:1080 %h %p\""
# ~/.ssh/config
#!/bin/sh | |
STAGED_GO_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep "\.go$") | |
if [[ "$STAGED_GO_FILES" = "" ]]; then | |
exit 0 | |
fi | |
GOLINT=`which golint` | |
GOIMPORTS=`which GOIMPORTS` |
LOG_LEVEL = 'DEBUG' | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'filters': { | |
'require_debug_false': { | |
'()': 'django.utils.log.RequireDebugFalse' | |
} | |
}, |
# ... | |
urlpatterns = [ | |
# ... | |
path('graphql', GraphQLView.as_view(playground=True)) | |
] |
#!/usr/bin/env bash | |
# pull image | |
docker pull syfun/kube-proxy:v1.12.4 | |
docker pull syfun/kube-controller-manager:v1.12.4 | |
docker pull syfun/pause:3.1 | |
docker pull syfun/etcd:3.2.24 | |
docker pull syfun/coredns:1.2.2 | |
docker pull syfun/kube-apiserver:v1.12.4 | |
docker pull syfun/kube-scheduler:v1.12.4 |
# 保留2位小数四舍五入 | |
def round_two(value): | |
if isinstance(value, (int, float)): | |
return round(value, 2) | |
return value | |
# 校准 | |
def calibrate(func): | |
def _calibrate(*args, **kwargs): |
package http | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"time" |
package main | |
import ( | |
"container/heap" | |
"sync" | |
) | |
// SafeHeap implement a concurrent safe heap. | |
type SafeHeap struct { | |
sync.RWMutex |
script = """ | |
a = 2 | |
global d | |
d = { | |
"a": a | |
} | |
""" | |
def test(): |
ssh -oProxyCommand="nc -x 127.0.0.1:1080 %h %p" [email protected]
alias sshp="ssh -oProxyCommand=\"nc -x 127.0.0.1:1080 %h %p\""
# ~/.ssh/config
#!/bin/sh | |
nc -X 5 -x 127.0.0.1:1080 "$@" |