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
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
yum install -y yum-utils setroubleshoot policycoreutils-python vim | |
yum-config-manager --enable remi-php56 | |
yum install -y httpd | |
echo '[mariadb] | |
name = MariaDB | |
baseurl = http://yum.mariadb.org/10.1/centos7-amd64 | |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB | |
gpgcheck=1' > /etc/yum.repos.d/mariadb.repo |
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
{ | |
"name": "parcel-example", | |
"version": "1.0.0", | |
"description": "An React app using Parcel", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "parcel src/index.html --open", | |
"build": "parcel build src/index.html", | |
"clean": "rm -rf dist/*" |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Parcel Test App</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="index.js"></script> |
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 * as React from "react"; | |
import * as ReactDOM from "react-dom"; | |
class App extends React.Component { | |
render() { | |
return ( | |
<div> | |
<h1>Hello, World.</h1> | |
</div> | |
); |
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 * as React from "react"; | |
import * as ReactDOM from "react-dom"; | |
// Add the following two lines | |
import { Card } from "react-bootstrap"; | |
import "bootstrap/dist/css/bootstrap.css"; | |
class App extends React.Component { | |
render() { | |
return ( | |
// Don't forget to add the classes to the divs and h1 elements. |
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
#!/bin/bash | |
# GitHub API Token | |
GH_API_TOKEN='' | |
# GitHub User Name | |
GH_USER='' | |
# Variable to store first argument to setup-repo, the repo name. Will be used as GH repo name, too. | |
NEW_REPO_NAME=$1 | |
# Store current working directory. | |
CURRENT_DIR=$PWD | |
# Project directory can be passed as second argument to setup-repo, or will default to current working directory. |
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
let myNumber = 10; | |
let myString = 'this is a string'; | |
if (typeof myNumber === 'string') { | |
console.log('This is a string, not a number.') | |
} else { | |
console.log('This is a number'); | |
} | |
const badMath = (x, y) => { |
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
let myNumber: number = 10; | |
let myString: string = 'this is a string'; | |
const badMath = (x: number, y: number) => { | |
return x * y; | |
} | |
badMath(myNumber, myString) /** | |
* error TS2345: Argument of type 'string' | |
* is not assignable to parameter of type 'number'. |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"lib": ["es6"], | |
"target": "es6", | |
"module": "commonjs", | |
"noImplicitAny": true, | |
"noImplicitThis": true, | |
"strictNullChecks": false, | |
"strictFunctionTypes": true, | |
"forceConsistentCasingInFileNames": true |
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 bob: string = 'Bob'; | |
const bobsAge: number = 20; | |
function personAge(person: string, age: number) { | |
return `${person} is ${age} years old.`; | |
} | |
personAge(bob, bobsAge); |
OlderNewer