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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Cloud Formation example for Glue Spark Job with metrics and scheduler | |
Parameters: | |
ArtifactBucket: | |
Description: A global deployable artefact bucket | |
Type: String | |
Default: artefacts | |
ServiceName: | |
Description: Service Name that owns the stack when created |
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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
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
/* eslint-disable camelcase */ | |
import { Gmail, gmail_v1, GaxiosResponse } from './gmail-client' | |
const SEARCH_PATTERN = 'My subject is ..' | |
const init = async () => { | |
const client = new Gmail() | |
console.log('Authenticating...') | |
await client.authorize() | |
console.log(`Searching for emails that contains ${SEARCH_PATTERN}..`) |
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
function sleep(ms: number) { | |
return new Promise(resolve => setTimeout(resolve, ms, '')) | |
} |
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
<!-- On line 16, replace 'MY_USERNAME' by your own username --> | |
<!-- Save as ~/Library/LaunchAgents/br.com.maat.vpn.plist --> | |
<!-- After creating both files, test it running: --> | |
<!-- $ launchctl load ~/Library/LaunchAgents/br.com.maat.vpn.plist --> | |
<!-- $ launchctl start br.com.maat.vpn --> | |
<!-- Check for error using: tail -f /var/log/system.log --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "pwa-node", | |
"request": "launch", |
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
jest.mock('aws-sdk', () => { | |
return { | |
SSM: jest.fn(() => ({ | |
getParameter: jest.fn(() => ({ | |
promise: jest.fn().mockResolvedValue({ Parameter: { Value: 'SECRET-KEY' } }), | |
})), | |
})), | |
SQS: jest.fn(() => ({})), | |
S3: jest.fn(() => ({})), | |
SNS: jest.fn(() => ({})), |
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
describe('Run method', () => { | |
const event: CloudWatchLogsEvent = { | |
awslogs: { | |
data: '', | |
}, | |
} | |
it('should confirm shipments where emitted', async () => { | |
expect.assertions(2) | |
await service.run(event) | |
expect(sendBatchJSONMessages).toHaveBeenCalledTimes(1) |
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 { soap } from "strong-soap" | |
abstract class OrderDynamicsClient { | |
protected isAuthenticated: Boolean = false | |
protected soapClient: any | |
protected url: any | |
abstract authenticate(): Promise<void> | |
createClient(options: any) { |
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/sh | |
DOCKER_IMAGE=node:12.18.0 | |
docker kill lamda-builder 2>/dev/null | |
docker rm lamda-builder 2>/dev/null | |
rm -rf build && rm -rf dist | |
mkdir -p build && mkdir -p ../dist | |
cp -r index.js package.json yarn.lock src deps build 2>/dev/null || : |