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
{ | |
// Use IntelliSense to find out which attributes exist for C# debugging | |
// Use hover for the description of the existing attributes | |
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": ".NET Core Launch (console)", | |
"type": "coreclr", | |
"request": "launch", |
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
cp .env.docker_exmaple .env | |
npm install | |
yarn | |
docker-compose up | |
mongorestore -d express-mongoose-es6-rest-api-development sed-test-db/ |
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
n = 46:1:200; | |
plot(n, log(n.^2)); |
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 ts = Math.round((new Date()).getTime() / 1000); |
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 arr1 = ['a', 'b', 'c']; | |
console.log(arr1.length); | |
var arr2 = ['d', 'e', 'f']; | |
console.log(arr2.length); | |
var arr3 = ['g', 'h', 'i']; | |
console.log(arr3.length); | |
var nested = [arr1, arr2, arr3]; | |
console.log('nested=' + nested); | |
console.log(nested.length); | |
var flattened = [].concat.apply([], nested); |
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
# https://discussions.apple.com/thread/6987059?start=0&tstart=0 | |
sudo chmod -x /System/Library/CoreServices/rcd.app/Contents/MacOS/rcd && sudo killall -9 rcd |
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
console.log('Loading event'); | |
var elasticsearch = require('elasticsearch'); | |
exports.handler = function(event, context) { | |
console.log("Request received:\n", JSON.stringify(event)); | |
console.log("Context received:\n", JSON.stringify(context)); | |
var tableName = event.device; | |
var time = event.time; | |
var Temperature = event.data.Temperature; |
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
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB(); | |
var iotData = new AWS.IotData({endpoint: 'something.iot.ap-southeast-2.amazonaws.com'}); | |
//make sure your replace your_AWS_endpoint_you_copied_earlier with the value you copied just before | |
exports.handler = function(event, context) { | |
console.log("Request received:\n", JSON.stringify(event)); | |
console.log("Context received:\n", JSON.stringify(context)); |
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
console.log('Loading function'); | |
var AWS = require("aws-sdk"); | |
var docClient = new AWS.DynamoDB.DocumentClient(); | |
exports.handler = (event, context, callback) => { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
event.Records.forEach((record) => { | |
console.log('Stream record: ', JSON.stringify(record, null, 2)); | |
console.log(record.eventID); |
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
'use strict'; | |
console.log('Loading function'); | |
var AWS = require("aws-sdk"); | |
exports.handler = (event, context, callback) => { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
event.Records.forEach((record) => { | |
console.log(record.eventID); | |
console.log(record.eventName); |