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
| # Such manifests may be broken up to any number of multiple files. | |
| # Using map vs slice to enable referencing scenarios by ID in a dynamic structure. | |
| # (TBD; there might be a neater solution but i'm happy with this so far) | |
| --- | |
| scenarios: | |
| S000: | |
| description: some http call to some endpoint where we expects some response values | |
| request: | |
| uri: "/fakeauth" | |
| method: post |
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 deepValue(obj, path) { | |
| // allow path to be passed as a string | |
| if (!Array.isArray(path)){ | |
| path = path.split(".") | |
| } | |
| var segment = path[0] | |
| path = path.slice(1, path.length); | |
| obj = obj[segment] |
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" | |
| "time" | |
| ) | |
| var ( | |
| dateTimeISO8601format1 = "2006-01-02T15:04:05.999Z07:00" | |
| dateTimeISO8601format2 = "2006-01-02T15:04:05.999-07:00" |
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
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "title": "TGEN (The Game Engine) API documentation", | |
| "version": "1.0" | |
| }, | |
| "consumes": [ | |
| "application/json" | |
| ], | |
| "produces": [ |
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 ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "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
| bind P paste-buffer | |
| bind-key -T copy-mode-vi v send-keys -X begin-selection | |
| bind-key -T copy-mode-vi y send-keys -X copy-selection | |
| bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |
| bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -sel clip -i" | |
| set -g mouse on | |
| set -s escape-time 0 | |
| set-window-option -g mode-keys vi |
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
| func sliceUp(s []string, size int) [][]string { | |
| total := len(s) | |
| var result [][]string | |
| for i := 0; ; i++ { | |
| first := size * i | |
| if first > total { | |
| break | |
| } | |
| last := size * (i + 1) |
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 ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "strconv" | |
| "sync" |
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 pool | |
| import ( | |
| "errors" | |
| "fmt" | |
| "log" | |
| "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
| func TestValidate(t *testing.T) { | |
| validRawToken := jwtBytes(testJWT()) | |
| expiredToken := testJWT() | |
| expiredToken.Claims().SetExpiration(time.Now().Add(-24 * time.Hour)) | |
| expiredRawToken := jwtBytes(expiredToken) | |
| badRawToken := []byte("You know I'm bad, I'm bad - you know it") | |
| testCases := []struct { | |
| name string |
NewerOlder