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
| // Get the key from the "DSN" at: https://sentry.io/settings/<org>/projects/<project>/keys/ | |
| // The "DSN" will be in the form: https://<SENTRY_KEY>@sentry.io/<SENTRY_PROJECT_ID> | |
| // eg, https://[email protected]/123456 | |
| const SENTRY_PROJECT_ID = '123456' | |
| const SENTRY_KEY = '0000aaaa1111bbbb2222cccc3333dddd' | |
| // Useful if you have multiple apps within a project – not necessary, only used in TAGS and SERVER_NAME below | |
| const APP = 'my-app' | |
| // https://docs.sentry.io/error-reporting/configuration/?platform=javascript#environment |
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/dash | |
| /bin/dnsdomainname | |
| /bin/domainname | |
| /bin/dumpkeys | |
| /bin/hostname | |
| /bin/ipcalc | |
| /bin/iptables-xml | |
| /bin/kbd_mode | |
| /bin/loadkeys | |
| /bin/mountpoint |
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/sh | |
| set -euo pipefail | |
| # Handler format: <script_name>.<function_name> | |
| # The script file <script_name>.sh must be located in | |
| # the same directory as the bootstrap executable. | |
| source $(dirname "$0")/"$(echo $_HANDLER | cut -d. -f1).sh" | |
| while true |
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
| yum install -y iso-codes # Needed for scl-utils-build | |
| curl -O http://vault.centos.org/6.5/SCL/x86_64/scl-utils/scl-utils-20120927-11.el6.centos.alt.x86_64.rpm | |
| curl -O http://vault.centos.org/6.5/SCL/x86_64/scl-utils/scl-utils-build-20120927-11.el6.centos.alt.x86_64.rpm | |
| curl -O http://mirror.centos.org/centos/6/extras/x86_64/Packages/centos-release-scl-rh-2-3.el6.centos.noarch.rpm | |
| curl -O http://mirror.centos.org/centos/6/extras/x86_64/Packages/centos-release-scl-7-3.el6.centos.noarch.rpm | |
| rpm -Uvh *.rpm # Had to run this twice? Get an error first time, maybe Docker related | |
| rm *.rpm |
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
| var api = foo | |
| api.foo = 1 | |
| api.bar = 2 | |
| export default api | |
| Object.assign(foo, someThings) | |
| export default foo | |
| array.forEach(item => { | |
| bar[item.key] = item.value |
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
| const EventEmitter = require('events') | |
| class ActivityStore extends EventEmitter { | |
| constructor() { | |
| this.state = 'stopped' // Whether you need this or not...? | |
| } | |
| start() { | |
| this.state = 'started' | |
| this.emit('started', this.state) | |
| } |
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
| <!doctype html> | |
| <html lang="en"> | |
| <!-- Example HTML file for AWS Proxy Resource tutorial at: https://aws.amazon.com/blogs/compute/authorizing-access-through-a-proxy-resource-to-amazon-api-gateway-and-aws-lambda-using-amazon-cognito-user-pools/ --> | |
| <!-- Fill out your UserPoolId, ClientId and apiGatewayEndpoint in JS further below --> | |
| <!-- Then serve locally with a static file server, such as `python -m SimpleHTTPServer` and open http://localhost:8000 --> | |
| <head> | |
| <meta charset="utf-8"> |
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
| license: gpl-3.0 |
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
| var stream = require('stream') | |
| module.exports = split | |
| function split(delim, emitTrailingIfEmpty) { | |
| delim = delim || new Buffer('\n') | |
| var trailing, delimLen = delim.length | |
| return new stream.Transform({ | |
| readableObjectMode: true, | |
| transform: function(chunk, enc, cb) { |
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
| var AWS = require('aws-sdk') | |
| var dynamo = new AWS.DynamoDB({endpoint: 'http://localhost:4567'}) | |
| var params = { | |
| AttributeDefinitions: [ // required | |
| { | |
| AttributeName: 'test_id', // required | |
| AttributeType: 'N' // required | |
| }, { |