I need a simple API Gateway that will use Swagger as its input format.
A very simple way to achieve this is to use swagger-codegen
and create
a nodejs-server
that will simply proxy (and optionally modify) requests
it receives to some other host.
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
Array.prototype.assoc = function(obj) { return ARR.find( function(iArr) { return iArr[0] == obj } ) } | |
const ARR = [ [ "a", "b", "c" ], [ 1, 2, 3 ], [ "a", 2 ] ] | |
ARR.assoc("a") | |
// > [ 'a', 'b', 'c' ] |
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
# 0% of syscalls and syscall time are removed for brevity | |
... | |
... | |
... | |
fstat | |
num calls: 1714 1% of syscalls |
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 ( | |
"encoding/json" | |
"fmt" | |
) | |
type ServiceDescriptionPayload struct { | |
Address string `json:"address"` | |
} |
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" | |
"os" | |
"strings" | |
"time" | |
) | |
func printFatal(e error) { |
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
diff --git a/Core/Service/Crafting/Core.lua b/Core/Service/Crafting/Core.lua | |
index c2e2bf3..752013f 100644 | |
--- a/Core/Service/Crafting/Core.lua | |
+++ b/Core/Service/Crafting/Core.lua | |
@@ -548,7 +548,10 @@ function Crafting.RestockHelp(link) | |
end | |
+ local maxRestock = TSMAPI_FOUR.CustomPrice.GetValue(opSettings.maxRestock, itemString) | |
+ local minRestock = TSMAPI_FOUR.CustomPrice.GetValue(opSettings.minRestock, itemString) | |
+ |
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 | |
HELM_TILLER_SA=tiller | |
HELM_TILLER_NS=kube-system | |
tiller_tls() { | |
[ ! -f tiller-ca.crt ] && \ | |
openssl req -x509 -new -newkey rsa:2048 -keyout tiller-ca.key -nodes -sha256 -days 3650 -out tiller-ca.crt -subj "/CN=tiller-ca" | |
[ ! -f tiller.crt ] && { | |
echo subjectAltName=IP:127.0.0.1 > extfile.cnf |
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
PUT _template/cloudtrail | |
{ | |
"index_patterns": ["cloudtrail-*"], | |
"settings": { | |
"number_of_shards": 1, | |
"mapping": { | |
"total_fields": { | |
"limit": 10000 | |
} | |
} |
I hereby claim:
- I am kesor on github.
- I am kesor (https://keybase.io/kesor) on keybase.
- I have a public key ASBXaH4PUfL6oeNFmPX5ZOyZ-9aO21ZE9wc-gtK5o4dnZQo
To claim this, I am signing this object:
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
/* This work is licensed under Creative Commons GNU LGPL License. | |
License: http://creativecommons.org/licenses/LGPL/2.1/ | |
Version: 0.9 | |
Author: Stefan Goessner/2006 | |
Web: http://goessner.net/ | |
Original file: https://goessner.net/download/prj/jsonxml/ | |
*/ | |
function xml2json(xml) { |