Skip to content

Instantly share code, notes, and snippets.

View danmurphy1217's full-sized avatar
🎯
Focusing

Dan Murphy danmurphy1217

🎯
Focusing
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.kotlin_lambda_poc</groupId>
<artifactId>kotlin_lambda_poc</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>kotlin_lambda_poc</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
@danmurphy1217
danmurphy1217 / stagingAndProdPulumi.js
Last active May 31, 2021 20:57
Defining the Staging and Production Servers
const stagingServer = new aws.ec2.Instance("staging-3dvation", {
instanceType: serverSize,
vpcSecurityGroupIds: [securityGroup.id],
keyName: keyName,
ami: serverType.id,
});
const prodServer = new aws.ec2.Instance("prod-3dvation", {
instanceType: serverSize,
vpcSecurityGroupIds: [securityGroup.id],
@danmurphy1217
danmurphy1217 / securityGroupPulumi.js
Last active May 31, 2021 20:50
Defining the Security Group
const securityGroup = new aws.ec2.SecurityGroup("3dvation-grp", {
ingress: [
{
description: "Inbound CNX for Staging and Prod Servers",
protocol: "tcp",
fromPort: 22,
toPort: 22,
cidrBlocks: ["0.0.0.0/0"],
},
],
@danmurphy1217
danmurphy1217 / serverTypePulumi.js
Last active May 31, 2021 20:20
Filtering for the correct AMI: Ubuntu 18.04
const serverType = pulumi.output(
aws.ec2.getAmi({
filters: [
{
name: "name", // filter by the name
values: [
"ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210430", // AMI Name from AWS > EC2 > Images > AMIs
],
},
],
@danmurphy1217
danmurphy1217 / ubuntu18_ec2.js
Last active May 31, 2021 20:51
Pulumi (AWS JS API): Create an Ubuntu 18.04 Instance with an assigned security group
"use strict";
const pulumi = require("@pulumi/pulumi");
const aws = require("@pulumi/aws");
const serverSize = "t2.micro";
const config = new pulumi.Config();
const keyName = config.get("keyName");
const publicKey = config.get("publicKey");
@danmurphy1217
danmurphy1217 / ubuntu18_ec2.tf
Last active May 31, 2021 18:44
Terraform: Create an Ubuntu 18.04 Instance with an assigned security group
# use default VPC and subnet
data "aws_vpc" "default" {
default = true
}
data "aws_subnet_ids" "all" {
vpc_id = data.aws_vpc.default.id
}
@danmurphy1217
danmurphy1217 / algorand-quickstart.sh
Last active March 2, 2021 12:32
Install and run an Algorand Node on your MacOS
#! /bin/bash
main () {
echo "Executing script..."
run
echo "Finished."
}
run () {
import { Router, Route, Switch } from "react-router-dom";
import HomePage from "./pages/Home";
import AboutPage from "./pages/About";
import ProjectsPage from "./pages/Projects";
import BookPage from "./pages/Bookshelf";
import { Global } from "./styles/Global";
function App() {
return (
import {Header} from "../components/Header";
import { Descriptors } from "../components/HomeMain";
import { formatOf } from "../components/extras/customFormatters";
import {PageSupportingContent} from "../components/PageSupportingContent";
import HomePageContent from "./contents/HomePageContents"
import Footer from "../components/Footer";
import Container from "../styles/Global";
import Divider from "../components/extras/Divider";
const HomePage = () => {