Skip to content

Instantly share code, notes, and snippets.

View xiaoping378's full-sized avatar
😑
cloud go!

xiaoping xiaoping378

😑
cloud go!
  • ebchinatech.com
  • Beijing
View GitHub Profile
FROM ruby:2.6.2-alpine3.9
MAINTAINER xiaoping378 <xiaoping378@163.com>
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk add --no-cache bash git curl jq tar libc6-compat g++ openssh
RUN apk add --no-cache nodejs npm && \
npm config set registry https://registry.npm.taobao.org &&\
npm install --unsafe-perm -g markdown-spellcheck webpack webpack-cli
@xiaoping378
xiaoping378 / gist:c265800c9e574d540b83bbd8f941a34f
Created February 18, 2019 09:24
flannel enable DirectRouting
---
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: psp.flannel.unprivileged
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: docker/default
seccomp.security.alpha.kubernetes.io/defaultProfileName: docker/default
apparmor.security.beta.kubernetes.io/allowedProfileNames: runtime/default
apparmor.security.beta.kubernetes.io/defaultProfileName: runtime/default
@xiaoping378
xiaoping378 / geth.service
Last active February 27, 2019 09:52
geth systemd service
[Unit]
Description=Ethereum go client
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=30s
ExecStart=/usr/sbin/geth --syncmode "fast" --ws --rpc --rpcapi "eth,net,web3,admin,personal,txpool,miner,clique" --rpccorsdomain "*" --rpcaddr 0.0.0.0 --cache 2048 --trie-cache-gens 1024 --txpool.accountslots 1024 --txpool.globalslots 40960
0xdbeb69c655b666b3e17b8061df7ea4cc2399df11
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
jq --version > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Please Install 'jq' https://stedolan.github.io/jq/ to execute this script"
{
"network-config": {
"orderer": {
"url": "grpcs://192.168.10.110:7050",
"server-hostname": "orderer.example.com",
"tls_cacerts": "../artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
},
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
ca.org1.example.com:
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: deis-builder
namespace: deis
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "update", "delete"]
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func printPost(rw http.ResponseWriter, req *http.Request) {
@xiaoping378
xiaoping378 / k8s-deploy.sh
Last active December 21, 2016 06:27
k8s-1.5-deploy.sh
#!/bin/bash
set -x
set -e
HTTP_SERVER=192.168.56.1:8000
KUBE_REPO_PREFIX=gcr.io/google_containers
root=$(id -u)
if [ "$root" -ne 0 ] ;then
echo must run as root