-
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
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 | |
# 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)" |
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
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 |
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 ( | |
"bytes" | |
"fmt" | |
"math/rand" | |
"os" | |
"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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"math/rand" | |
"os" | |
"sort" | |
"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
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 |
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
class A | |
def a | |
puts "a" | |
end | |
end | |
module Logger | |
def log(method_name) | |
m = self.instance_method(method_name) | |
undef_method method_name |
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
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 |
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
source 'https://rubygems.org' | |
gem 'roda' | |
gem 'typhoeus' | |
gem 'thin' |
NewerOlder