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
| (function() { | |
| Array.prototype.slice.call(arguments).map( | |
| (x) => { | |
| console.log(arguments); | |
| } | |
| ); | |
| })(1,2) | |
| // Outputs: | |
| // { '0': 1, '1': 2 } |
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
| export ENABLE_NODE_LOGGING=false | |
| export ENABLE_CLUSTER_MONITORING=none | |
| export LOG_LEVEL=4 | |
| export CONTAINER_RUNTIME=remote | |
| export IMAGE_SERVICE_ENDPOINT=/var/run/rktlet.sock | |
| export CONTAINER_RUNTIME_ENDPOINT=/var/run/rktlet.sock | |
| export ALLOW_SECURITY_CONTEXT=yes | |
| export ALLOW_PRIVILEGED=yes |
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
| #!/bin/sh | |
| set -x | |
| # Pick a random chain name | |
| chain_name=foo-$RANDOM | |
| # Create the chain | |
| iptables -t nat -N $chain_name --wait | |
| created_chain=$? |
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
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: atheme | |
| annotations: | |
| app: atheme | |
| # Dear lord WHY | |
| pod.alpha.kubernetes.io/init-containers: '[{"name": "r53-register","restartPolicy":"Never","image":"euank/route53-registerer:v0.1.1","env": [{"name": "AWS_ACCESS_KEY_ID","valueFrom": {"secretKeyRef": {"name": "wobscale-r53","key":"access"}}},{"name": "AWS_SECRET_ACCESS_KEY","valueFrom": {"secretKeyRef":{"name":"wobscale-r53","key":"secret"}}},{"name": "REGISTER_IP","value": "PUBLICIP"},{"name":"REGISTER_DOMAIN","value":"services.irc.wobscale.website"}]}]' | |
| spec: |
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
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "math/rand" | |
| "os" | |
| "path/filepath" | |
| "strconv" |
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
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "log" | |
| "os" | |
| "strings" | |
| "time" |
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
| $ sudo systemd-run --unit=test-machined-reg rkt run --uuid-file-save=/tmp/rkt-uuid --insecure-options=image docker://nginx | |
| Running as unit test-machined-reg.service. | |
| $ sudo rkt status $(cat /tmp/rkt-uuid) | |
| state=running | |
| created=2016-08-11 16:12:00.844 -0700 PDT | |
| started=2016-08-11 16:12:00.944 -0700 PDT | |
| networks=default:ip4=172.16.28.206 | |
| pid=31239 | |
| exited=false |
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
| #!/bin/bash | |
| # This script, if put on your path before your real rkt binary (e.g. /usr/bin/rkt vs /usr/local/bin/rkt), | |
| # augments the rkt command with the `launch` and `land` subcommands corresponding to `run` and `stop` | |
| # The path to the actual rkt binary | |
| rkt=/usr/local/bin/rkt | |
| case $1 in | |
| launch) |
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
| $ sudo rkt run --uuid-file-save=/tmp/uuid quay.io/coreos/alpine-sh --exec=sh -- -c ls | |
| image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.8.0+gite129fd7 | |
| image: using image from local store for image name quay.io/coreos/alpine-sh | |
| run: group "rkt" not found, will use default gid when rendering images | |
| networking: loading networks from /etc/rkt/net.d | |
| networking: loading network default with type ptp | |
| stage1: warning: error setting journal ACLs, you'll need root to read the pod journal: group "rkt" not found | |
| $ sudo journalctl -m _MACHINE_ID=$(cat /tmp/uuid | sed 's/-//g') -o json --no-pager |
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
| package main | |
| import ( | |
| "fmt" | |
| rktapi "github.com/coreos/rkt/api/v1alpha" | |
| "golang.org/x/net/context" | |
| "google.golang.org/grpc" | |
| ) |