kubectl create ns t1
kubectl create ns t2
kubectl run hello-nginx --image=nginx --port=80 -n t1
kubectl run hello-nginx --image=nginx --port=80 -n t2
kubectl expose deployment hello-nginx --port=80 -n t1
kubectl expose deployment hello-nginx --port=80 -n t2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name JDWL(京东大家电----订单一键导出) | |
// @namespace Violentmonkey Scripts | |
// @version 0.0.4 | |
// @homepage https://github.com/dfang/userscript | |
// @homepageURL https://gist.github.com/dfang/21cb975506155e43f8eadf013636245d | |
// @description try to make partner.dhc.jd.com more user friendly! | |
// @author fang duan | |
// @include *partner.dhc.jd.com* | |
// @grant GM_notification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
Using the -ldflags
parameter can help set variable values at compile time.
Using the example provided here:
- Running
make build
will create abuild
executable. Running it will result in:
$> ./build
no version (Mon YYYY)
$>
由于限制问题,国内使用 go get 安装 golang 官方包可能会失败,如我自己在安装 collidermain 时,出现了以下报错:
$ go get collidermain
package golang.org/x/net/websocket: unrecognized import path "golang.org/x/net/websocket" (https fetch: Get https://golang.org/x/net/websocket?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
不翻墙的情况下怎么解决这个问题?其实 golang 在 github 上建立了一个镜像库,如 https://github.com/golang/net 即是 https://golang.org/x/net 的镜像库
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c3M6Ly9ZV1ZoWkY5amFHRmphR0V5TUY5d2IyeDVNVE13TlRwV04waFFURkZXVFZCRmVWWnpSRWh5UzJOaFRtcDNiMmxBTkRjdU5USXVNak11TVRjNE9qRTFNREF3I2hrMQpzczovL1kyaGhZMmhoTWpBdGFXVjBaanBXTjBoUVRGRldUVkJGZVZaelJFaHlTMk5oVG1wM2IybEFORGN1TlRJdU1qTXVNVGM0T2pFME9UazUjaGsyCnNzOi8vWVdWekxUSTFOaTFqWm1JNlZqZElVRXhSVmsxUVJYbFdjMFJJY2t0allVNXFkMjlwUURRM0xqVXlMakl6TGpFM09Eb3hNakl5TWc9PSNoazMKc3NyOi8vTkRjdU5USXVNak11TVRjNE9qRTJPVFk1T21GMWRHaGZjMmhoTVY5Mk5EcGphR0ZqYUdFeU1EcDBiSE14TGpKZmRHbGphMlYwWDJGMWRHZzZXVmR3ZW1GSFVtMWhha1UwVFdwUk0wOUViRUZKZVZKQlZUQkdhMXB0WXowCnNzcjovL05USXVNVGswTGpJeE9TNHhOams2TVRZNU5qazZZWFYwYUY5emFHRXhYM1kwT21Ob1lXTm9ZVEl3T25Sc2N6RXVNbDkwYVdOclpYUmZZWFYwYURwWlYzQjZZVWRTYldGcVJUUk5hbEV6VDBSc1FVbDVVa0ZWTUVacldtMWpQUQ== |
https://gist.github.com/zhovner/b1d72f3465c46e7b58a4ea42d625c3e8 https://gist.github.com/zhenhappy/3c808a198715978a38acf0ba44044ea6
https://gist.github.com/zhovner/b1d72f3465c46e7b58a4ea42d625c3e8#gistcomment-2862914
This ad-hoc codesign works for version 14.
sudo codesign -f -s - /Applications/TeamViewer.app/Contents/MacOS/TeamViewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Sudo. | |
if [ $EUID != 0 ]; then | |
sudo "$0" "$@" | |
exit $? | |
fi | |
# Install Xcode first - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 | |
# Install Xcode command line tools. | |
xcode-select --install |
package main
import (
"fmt"
"os"
"os/signal"
"time"
"github.com/robfig/cron"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_platform(:android) | |
platform :android do | |
desc "Submit a new QA Build to Crashlytics Beta" | |
lane :qa do | |
crashlytics( | |
api_token: 'CRASHLYTICS_API_TOKEN', | |
build_secret: 'CRASHLYTICS_BUILD_SECRET', | |
notes_path: 'qa-change.log', |