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 React from "react"; | |
import { Icon as MDIcon } from "@mdi/react"; | |
class Icon extends React.Component { | |
render() { | |
let icon = require(`materialdesign-js/icons/${this.props.icon}`).default; | |
if (!icon) { | |
throw Error(`Could not find materialdesign-js/icons/${icon}`); | |
} | |
return <MDIcon path={icon} />; |
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
/** | |
* Include the PrivateDependencyModuleNames entries below in your project build target configuration: | |
* PrivateDependencyModuleNames.AddRange(new string[] { "Json", "JsonUtilities" }); | |
*/ | |
#include "Runtime/Online/HTTP/Public/Http.h" | |
#include "Serialization/JsonSerializer.h" | |
FHttpResponsePtr Response; |
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 { createLogger, format, transports } = require('winston'); | |
const chalk = require('chalk'); | |
const { combine, timestamp, label, printf, simple, splat } = format; | |
const consoleFormat = printf(({ level, message, label, timestamp }) => { | |
var levelUpper = level.toUpperCase(); | |
switch (levelUpper) { | |
case "INFO": | |
message = chalk.green(message); | |
level = chalk.black.bgGreenBright.bold(level); | |
break; |
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 config from '../config' | |
let components = {} | |
//For each component in the config fiel into an object | |
for (var i = config.length - 1; i >= 0; i--) { | |
components[config[i].name] = require(config[i].path).default | |
} | |
export default components |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
- No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
- VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
- VPC with NAT, The best of both worlds, AWS services and web.
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 Add-EnvPath { | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $Path, | |
[ValidateSet('Machine', 'User', 'Session')] | |
[string] $Container = 'Session' | |
) | |
if ($Container -ne 'Session') { |