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
version: "3" | |
services: | |
metadata0: | |
image: nginx:alpine | |
volumes: | |
- ./metadata-db0:/usr/share/nginx/html:ro | |
command: [nginx-debug, '-g', 'daemon off;'] | |
db0: |
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
let dynamoDb = new AWS.DynamoDB.DocumentClient(dynamoParams); | |
if (process.env.XRAY_DYNAMO) { | |
const AWSXRay = require("aws-xray-sdk-core"); | |
if (process.env.IS_OFFLINE) { | |
AWSXRay.setLogger(console); | |
} | |
AWS = AWSXRay.captureAWS(AWS); | |
dynamoDb = AWSXRay.captureAWSClient(dynamoDb); | |
} |
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
pipelines: | |
branches: | |
*: | |
- step: | |
script: | |
- npm ci | |
- npm run lint | |
- npm test | |
# == Check that all commits since the base branch (dev) contain ACME- for ticket reference == | |
# Fetch the merge base for our project |
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
@GetMapping("/expensiveEndpoint") | |
public void findGlobalConfig(WebRequest request, HttpServletResponse response) throws IOException { | |
// Optionally String myCacheKey = buildKey(params) | |
etaggedResponseCacheManager.getFromCacheWithEtagHandling( | |
request, response, | |
"myCacheName", "myCacheKey", 3600, | |
() -> { | |
return expensiveToBuildAndSerialize(); | |
} |
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
# For a quick start check out IDEA's HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection). | |
POST http://localhost:8000/openrtb2/auction | |
Content-Type: application/json | |
{ | |
"id": "must be string", | |
"imp": [ | |
{ | |
"id": "test-imp-id", |
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
#!/bin/bash | |
# To start using a project or working for a given client I'll type the client or project name, and I'll have an | |
# alias defined in .profile to run this (so that I actually end up in the directory that this file cd's to) | |
# alias 'acme-widget=source $HOME/bin/acme-widget' | |
CLIENT_ROOT=$HOME/clients/acme | |
export GOPATH=$CLIENT_ROOT | |
cd $GOPATH/src/widget | |
# widget is the project directory as cloned from source control |
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
declare module "react-async" { | |
import {ComponentType, ReactNode} from "react"; | |
import * as React from "react"; | |
export interface LoadingProps<V> { | |
/** Show only on initial load (data is undefined) */ | |
initial?: boolean; | |
/** Function (passing state) or React node */ | |
children: ReactNode | ((state: State<V>) => ReactNode); |
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
public class ConfigurableAccessTokenConverter extends DefaultAccessTokenConverter { | |
public ConfigurableAccessTokenConverter(String usernameAttributeKey) { | |
super(); | |
setUserTokenConverter(new DefaultUserAuthenticationConverter() { | |
@Override | |
public Authentication extractAuthentication(Map<String, ?> map) { | |
if (map.containsKey(usernameAttributeKey)) { |
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
import * as React from "react"; | |
import {CardSource, compareCards, Card} from "./cards"; | |
import {EventCard as EventCardObj, EventCardGroup, TaskCard as TaskCardObj, TaskCardGroup} from "../calendar/cards"; | |
import {ReferralCard as ReferralCardObj, ReferralCardGroup} from "../referral/cards"; | |
import ReferralCard = require("./ReferralCard"); | |
import EventCard = require("./EventCard"); | |
import CardGroup = require("./CardGroup"); | |
import TaskCard = require("./TaskCard"); | |
import {ReloadEvent} from "../common/events"; |
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
files: ["**/__tests__/**/*", "**/test/**/*", "**/*.(test|spec).*", "**/*Spec.*", "!**/node_modules/**/*"] | |
script: "./node_modules/jasmine-node/bin/jasmine-node" | |
lineRegExp: '^\s*(?:test|it|describe)(?:\.[^(]+)?\((?:"|''){1}([^"'']+)' | |
scriptArgs: ["${file}", "--verbose", "--color", "--forceexit", "--junitreport", "--captureExceptions"] | |
rcName: "${fileNameWithoutExt}.${0}" |
NewerOlder