Flattener is a utility to flatten an array of arbitrarily nested arrays of integers into a flat array of integers.
To run the project, just create a folder and put the file flattener.js
, test.js
and package.json
inside.
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
package main | |
import ( | |
"os" | |
"fmt" | |
"errors" | |
"strings" | |
"net/http" | |
"encoding/json" | |
"github.com/aws/aws-lambda-go/lambda" |
const AWS = require('aws-sdk'); | |
const Slack = require("slack-node"); | |
AWS.config.region = process.env.REGION; | |
const lambda = new AWS.Lambda(); | |
// #################################################### | |
// ################# SECURITY CHECK ################### | |
// #################################################### | |
// check if slack token is equal to env var |
const Slack = require("slack-node"); | |
// Load the AWS SDK for Node.js | |
const AWS = require("aws-sdk"); | |
// Set the region | |
AWS.config.update({region: process.env.REGION}); | |
// Create EC2 service object | |
var ec2 = new AWS.EC2(); | |
function capitalizeFirstLetter(string) { |
import boto3 | |
import os | |
import json | |
############################################################## | |
###################### Check context ######################### | |
############################################################## | |
def check_context(event): | |
if event["context"] in contexts.keys(): |
## convert HTML POST data or HTTP GET query string to JSON | |
## get the raw post data from the AWS built-in variable and give it a nicer name | |
#if ($context.httpMethod == "POST") | |
#set($rawAPIData = $input.path('$')) | |
#elseif ($context.httpMethod == "GET") | |
#set($rawAPIData = $input.params().querystring) | |
#set($rawAPIData = $rawAPIData.toString()) | |
#set($rawAPIDataLength = $rawAPIData.length() - 1) | |
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength)) |
#!/bin/bash | |
set -o errtrace -o nounset -o pipefail -o errexit | |
echo "hello world" |
[ | |
{ | |
"1":true, | |
"2":"white", | |
"3":255, | |
"4":255, | |
"5":"fffafa000005ff", | |
"6":"00ff0000000000", | |
"7":"ffff500100ff00", | |
"8":"ffff8003ff000000ff000000ff000000000000000000", |
version: "3" | |
services: | |
proxy: | |
container_name: proxy | |
restart: always | |
image: debian:jessie | |
privileged: true | |
ports: | |
- "80:80" | |
networks: |