Skip to content

Instantly share code, notes, and snippets.

View futurist's full-sized avatar

James Yang futurist

  • China
View GitHub Profile
@futurist
futurist / channel0.go
Created June 2, 2022 09:27 — forked from tenfyzhong/channel0.go
有没buffer的channel例子代码
package main
import (
"log"
"time"
)
func chan0SendOnly() {
c0 := make(chan bool)
log.Println("c0, sending")

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
@futurist
futurist / install-kubernetes-flannel-centos7.md
Created March 18, 2022 12:12 — forked from rkaramandi/install-kubernetes-flannel-centos7.md
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
@futurist
futurist / version-up.sh
Last active April 2, 2021 03:40 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Fork from: https://gist.github.com/OleksandrKucherenko/9fb14f81a29b46886ccd63b774c5959f
## Last revisit: 2021-04-01 [email protected]
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
@futurist
futurist / docker-compose.yml
Created March 22, 2021 07:11 — forked from heysamtexas/docker-compose.yml
Pristine config for Traefik 2.0, Docker, and LetsEncrypt with sample container. Includes a HTTP to HTTPS redirect
version: '3'
services:
traefik:
container_name: traefik
image: traefik:v2.0
command:
- "--api.insecure=true"
- "--providers.docker=true"
@futurist
futurist / example.prf
Created December 18, 2020 15:12 — forked from mattes/example.prf
unison profile
root = /Users/matthias/somedir
root = ssh://matthias@host:9000/somedir
auto = true
log = true
logfile = /Users/matthias/.unison/unison.log
maxbackups = 5
backup = Name *
@futurist
futurist / GettingStartedTutorial1Commands.txt
Created December 3, 2020 02:31 — forked from bassem-mf/GettingStartedTutorial1Commands.txt
Getting Started With Graph Databases, Apache TinkerPop, and Gremlin - Tutorial 1
// Create an instance of the "Modern" toy graph
graph = TinkerFactory.createModern()
// Create the traversal source
g = graph.traversal()
// Get all vertices
@futurist
futurist / curl-websocket.sh
Created September 16, 2020 10:22 — forked from htp/curl-websocket.sh
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
rustup component add rust-src
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"