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
provider "aws" { | |
region = "us-east-1" | |
default_tags { | |
tags = { | |
app = "aws-tags" | |
owner = "tagging-team" | |
cost_centre = "platform" | |
slack_channel = "#help-tagging" | |
} | |
} |
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
locals { | |
rg_string = "rg-d-lxr-aus-app1" | |
// Use split by - to create an array so we can use contains() | |
is_rg = contains(split("-", local.rg_string), "rg") | |
final_rg_string = local.is_rg ? replace(local.rg_string, "aus-", "") : local.rg_string | |
not_rg_string = "blah-d-lxr-aus-app1" | |
is_not_rg = contains(split("-", local.not_rg_string), "rg") | |
final_not_rg_string = local.is_not_rg ? replace(local.not_rg_string, "aus-", "") : local.not_rg_string | |
} |
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
import React from "react"; | |
import "./App.css"; | |
import Table from "react-bootstrap/Table"; | |
class App extends React.Component { | |
state = { | |
values: [ | |
{ id: 1, name: "test", isActive: true }, | |
{ id: 2, name: "test2", isActive: false }, | |
{ id: 3, name: "test3", isActive: false }, |
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
{ | |
"api.version":"v1", | |
"sources":[{ | |
"name":"Test-Chef", | |
"category":"Chef", | |
"automaticDateParsing":true, | |
"multilineProcessingEnabled":false, | |
"useAutolineMatching":false, | |
"forceTimeZone":false, | |
"timeZone":"UTC", |
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
import requests | |
import csv | |
from bs4 import BeautifulSoup | |
f = csv.writer(open('z-artist-names.csv', 'w')) | |
f.writerow(['Name', 'Link']) | |
url = 'https://web.archive.org/web/20121007172955/https://www.nga.gov/collection/anZ1.htm' |
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
const express = require("express"); | |
const hbs = require("express-handlebars"); | |
var fs = require("fs"); | |
const server = express(); | |
// Middleware | |
server.engine( | |
"hbs", | |
hbs({ |
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
const data = { | |
houses: [{ | |
1: 'big house', | |
2: 'small house', | |
3: 'medium house' | |
}], | |
people:[{ | |
1: { | |
name: 'bethanie', | |
age: '22', |
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
gcloud app deploy --version 1 --no-promote --project (projectname without brackets) | |
gcloud app browse | |
gcloud config set project (project name) |
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
<PropsPage name="Chief" age="22" reset={this.resetClick} /> | |
The information above is available in props, such as {props.age}, {props.name} and {props.reset}. This allows our child | |
components to communicate backwards to the Parent Component - all while listening and waiting for any changes in props that | |
happen as a result. | |
In short, my PropsPage component now has extra data being pushed into it from an external source (external to the component itself). |
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
state = { | |
string: "This is a message saved in state", | |
object: { | |
key: 1, | |
value: "My favourite car manufacturer is Honda" | |
}, | |
number: 1, | |
array: [1, 2, 3], | |
function: () => { | |
alert("you run the function"); |
NewerOlder