This file contains 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
{ | |
"nickname": "myuser", | |
"name": "[email protected]", | |
"picture": "https://s.gravatar.com/avatar/843b31161c0df615e49c17b1eea2d89c?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmy.png", | |
"updated_at": "2023-06-04T01:27:09.546Z", | |
"iss": "https://dev-ce0onvx2.us.auth0.com/", | |
"aud": "mc7CK206Mk0loShIk8av4eoRKkEOgmkO", | |
"iat": 1685843022, | |
"exp": 1685879022, | |
"sub": "auth0|647a4956dcf5d74a05a16996", |
This file contains 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
javascript:location.href='https://archive.vn/?run=1&url=%27+encodeURIComponent(document.location.href) |
This file contains 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" | |
"golang.org/x/oauth2" | |
"golang.org/x/oauth2/clientcredentials" | |
"io/ioutil" | |
"os" | |
) |
This file contains 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
# Inventory/ItemsInChunksList Response => Inventory/ItemPriceAndAvailabilityList Request | |
jq '{request : {dsItemPriceAndAvailRequest: {dtPriceAndAvailRequest: [{CustomerID:"1234",ShiptoSequence:"0", SaleType:"WHSE"}], dtItemToProcessRequest: [.response.ItemsInChunksListResponse.dsItemsInChunksListResponse.dtItemsInChunksListResponse[] | {ItemCode: .ItemCode, OrderQty: "1", "UOM":""}]}}}' |
This file contains 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
# Averages | |
jq ' .results [] | { name: .name , avg : .times | (add/length) }' | |
# Calculate average time of a particular request (by name) | |
jq ' .results [] | select(.name | contains("20")).times | add / length' | |
jq ' .results [] | select(.name | contains("40")).times | add / length' | |
jq ' .results [] | select(.name | contains("60")).times | add / length' | |
jq ' .results [] | select(.name | contains("80")).times | add / length' | |
jq ' .results [] | select(.name | contains("100")).times | add / length' |
This file contains 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
#!/usr/bin/env bash | |
github_pat=$(bw get password "github pat") | |
owner=dmsi-io | |
branch=develop | |
declare -A repos | |
repos[accounts-receivable-api]=develop | |
repos[users-api]=develop | |
repos[session-api]=develop |
This file contains 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" | |
"github.com/stretchr/testify/assert" | |
"testing" | |
) | |
type MyType struct { | |
FieldA string `json:"field_a"` |
This file contains 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
// AgilityPayload canonical payload shape for agility "REST" methods. | |
// Use this if you don't want to make structs for your backend call, | |
// but still want to access deeply nested fields which you wouldn't | |
// be able to dereference when using map[string]interface{}. | |
type AgilityPayload map[string]map[string]map[string][]map[string]interface{} | |
// ToMap to let you dump a map of names to meaningless objects | |
// into an even less useful map of names to meaningless objects. | |
// _this_ is what you'd pass to the RequestBody. | |
func (c *AgilityPayload) ToMap() map[string]interface{} { |
This file contains 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
curl --location --request POST 'http://localhost:8080/session-api' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{"query":"query IntrospectionQuery {\n __schema {\n queryType {\n name\n }\n mutationType {\n name\n }\n subscriptionType {\n name\n }\n types {\n ...FullType\n }\n directives {\n name\n description\n locations\n args {\n ...InputValue\n }\n }\n }\n}\n\nfragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n}\n\nfragment InputValue on __InputValue {\n name\n description\n type {\n |
NewerOlder