A Pen by Massimo Sporchia on CodePen.
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
var fs = require('fs'); | |
var namesIn = "names.json" | |
var surnamesIn = "surnames.json" | |
var peopleOut = "peopleOut.json" | |
var namesFile = fs.readFileSync(namesIn, 'utf8'); | |
var surnamesFile = fs.readFileSync(surnamesIn, 'utf8'); | |
namesJson = JSON.parse(namesFile); | |
surnamesJson = JSON.parse(surnamesFile); |
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
library(openxlsx) | |
library(plyr) | |
template <- "template.xlsx" | |
masterfile <- | |
"master.xlsx" | |
dirpath <- | |
"data/" |
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
$Username = "su" | |
$Password = "password" | |
$group = "Administrators" | |
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME" | |
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username } | |
if ($existing -eq $null) { |
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
#!/usr/bin/env python | |
# Lambda Script for spot instances failover | |
# NOTE 1: Re-failover from on-demand to spot will be done if all desired ECS tasks are currently running | |
# NOTE 2: The maximum number of spot instances is taken from its DesiredCapacity | |
# WARNING: You cannot increase DesiredCapacity of on-demand from the console without changing this script, | |
# however, you can increase DesiredCapacity of spot instances from the console and if it fails, | |
# this script will start on-demand instead of spot instances | |
# | |
import boto3 | |
import json |
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
const {toProxyOpts, proxyConnect } = require("./proxy-connect") | |
// using it to connect to AWS IoT through a HTTP CONNECT proxy | |
const aws = require("aws-iot-device-sdk"); | |
const proxyUrl = process.env.http_proxy || "http://localhost:3128/"; | |
const opts = { | |
keyPath: "assets/device.private.key", | |
certPath: "assets/device.cert.pem", |
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
const client = require('aws-iot-device-sdk'); | |
// The options object to provision the MQTT client with. | |
// Update values between chevrons with the appropriate values. | |
const opts = { | |
host: "<aws-iot-endpoint>", | |
keyPath: "<path-to-private-key>", | |
certPath: "<path-to-device-certificate>", | |
caPath: "<path-to-root-ca>", | |
// We are specifying that we want to connect on the |
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 cdk from "@aws-cdk/core"; | |
import * as glue from "@aws-cdk/aws-glue"; | |
export class GlueStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
var workflow = new glue.CfnWorkflow(this, "glueWorkflow", { | |
name: "testWorkflow", | |
}); |
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 cdk from '@aws-cdk/core'; | |
import * as neptune from '@aws-cdk/aws-neptune'; | |
export class NeptuneTestStack extends cdk.Stack { | |
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
const dbClusterParameterGroup = new neptune.CfnDBClusterParameterGroup(this, 'neptune-ClusterParameterGroup', { | |
description: 'test-description', |
EC2 Spot Workshop (EKS): https://ec2spotworkshops.com/using_ec2_spot_instances_with_eks.html
Spot Instance Advisor: https://aws.amazon.com/ec2/spot/instance-advisor/
Other best practices (e.g. Overprovisioner): https://aws.github.io/aws-eks-best-practices/cluster-autoscaling/#overprovisioning
OlderNewer