helm install --name cert-manager --version v0.5.2 \
--namespace kube-system stable/cert-manager
This file contains 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
package main | |
import ( | |
"crypto/tls" | |
"github.com/fsnotify/fsnotify" | |
"log" | |
"net/http" | |
"sync" | |
) |
This file contains 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
package main | |
import ( | |
"cuelang.org/go/cue" | |
"cuelang.org/go/cue/cuecontext" | |
cuejson "cuelang.org/go/encoding/json" | |
"io/ioutil" | |
) | |
func main() { |
This file contains 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
#! /bin/sh | |
kubectl -n kube-system create serviceaccount cluster-admin | |
cat <<EOF | kubectl apply -f - | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: cluster-admin | |
roleRef: |
This file contains 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
const additionalFields = {}; | |
const logger = { | |
info: loggerWithLevel("info"), | |
error: loggerWithLevel("error"), | |
debug: loggerWithLevel("debug"), | |
}; | |
function loggerWithLevel(level) { | |
return function log(strings, ...keys) { |
This file contains 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
#!/bin/bash | |
IP=$1 | |
PORT_START=$2 | |
PORT_END=$3 | |
for i in $(seq "$PORT_START" "$PORT_END"); do | |
nc -z "$IP" "$i" 2> /dev/null | |
exit_code=$? | |
if [ $exit_code -eq 1 ]; then |
This file contains 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
const R = require("ramda"); | |
// checkpoint, only processed data | |
const processed = require("./updated.json"); | |
// processed and unprocessed data together, whole data | |
const toBeProcessed = require("./to_be_updated.json"); | |
// data which will be processed on this execution | |
const willBeProcessed = R.difference(toBeUpdated, updated); | |
const chunks = R.splitEvery(10, willBeUpdated); |
This file contains 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
const couchbase = require("couchbase"); | |
const cluster = new couchbase.Cluster("couchbase://hostname", { | |
username: "username", | |
password: "password", | |
}); | |
const bucket = cluster.bucket("bucket-name"); | |
const collection = bucket.defaultCollection(); | |
async function main() { |
This file contains 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
gsettings set org.gnome.shell.app-switcher current-workspace-only true | |
gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true |
This file contains 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
const http = require('http') | |
const WebSocketServer = require('websocket').server | |
const PORT = process.env.PORT || 8080 | |
const MessageType = { | |
Join: 'Join', | |
Left: 'Left', | |
Message: 'Message' | |
} |
NewerOlder