MacOS can build a k8s cluster with below after Homebrew is installed.
brew install ko kind| #!/bin/bash | |
| # GIST_URL: https://gist.github.com/natemccurdy/65676368168708810c29 | |
| # Get the list of classes that the Puppetserver knows about. | |
| # https://docs.puppetlabs.com/puppet/latest/reference/http_api/http_environments.html | |
| CERT="$(puppet agent --configprint hostcert)" | |
| CACERT="$(puppet agent --configprint localcacert)" | |
| PRVKEY="$(puppet agent --configprint hostprivkey)" | |
| OPTIONS="--cert ${CERT} --cacert ${CACERT} --key ${PRVKEY}" | |
| MASTER="$(puppet agent --configprint server)" |
| wujiang@jiang-docker:~$ ruby fib.rb | |
| Warming up -------------------------------------- | |
| iterate adding 100000 | |
| 1.000 i/100ms | |
| fast doubling 100000 168.000 i/100ms | |
| matrix multiplying 100000 | |
| 37.000 i/100ms | |
| Calculating ------------------------------------- | |
| iterate adding 100000 | |
| 4.113 (± 0.0%) i/s - 21.000 in 5.107523s |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "math/rand" | |
| "os" | |
| "time" | |
| ) |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "math/rand" | |
| "os" | |
| "sort" | |
| "time" | |
| ) |
| name: GistAPI | |
| version: 0.1.0.0 | |
| synopsis: GistAPI with swagger support | |
| description: Please see README.md | |
| homepage: https://gist.github.com/nouse/ab3d5ac15558170a0952/edit | |
| license: BSD3 | |
| author: Jiang Wu | |
| copyright: | |
| category: Web | |
| build-type: Simple |
datetime and url types are not supported datetime should change to {type: "string", format: "date-time"}, and url is not fallback to string.
loginEndPoint before is a hash with key url, now is a string
initOAuth method, now requires clientSecret, even with implicit flow
now SwaggerUi should be initiated with validatorUrl: null in development mode
| class A | |
| def a | |
| puts "a" | |
| end | |
| end | |
| module Logger | |
| def log(method_name) | |
| m = self.instance_method(method_name) | |
| undef_method method_name |
| module BM | |
| def self.search(haystack, needle) | |
| Pattern.new(needle).search(haystack) | |
| end | |
| class Pattern < BasicObject | |
| def initialize(needle) | |
| @needle = needle | |
| @length = @needle.length | |
| generate_good_suffices |