Skip to content

Instantly share code, notes, and snippets.

View mattdell's full-sized avatar

Matt Dell mattdell

  • Bath, UK
View GitHub Profile
@mattdell
mattdell / index.html
Last active October 1, 2015 09:52
React Demo 1 - Empty React file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://fb.me/react-0.13.3.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.25.2/react-bootstrap.min.js"></script>
</head>
<body>
@mattdell
mattdell / index.html
Last active October 1, 2015 09:58
React Demo 2 - Hello world
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://fb.me/react-0.13.3.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.25.2/react-bootstrap.min.js"></script>
</head>
<body>
@mattdell
mattdell / index.html
Created October 1, 2015 10:15
React Demo 3 - Props
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://fb.me/react-0.13.3.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.25.2/react-bootstrap.min.js"></script>
</head>
<body>
@mattdell
mattdell / index.html
Created October 1, 2015 11:50
React Demo 4 - State
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://fb.me/react-0.13.3.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.25.2/react-bootstrap.min.js"></script>
</head>
<body>
@mattdell
mattdell / index.html
Last active October 1, 2015 14:19
React Demo 5 - Components
var ProductCategoryRow = React.createClass({
render: function() {
return (<tr><th colSpan="2">{this.props.category}</th></tr>);
}
});
var ProductRow = React.createClass({
render: function() {
var name = this.props.product.stocked ?
this.props.product.name :
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.rawgit.com/lodash/lodash/3.0.1/lodash.min.js"></script>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
@mattdell
mattdell / deploy.sh
Created March 13, 2017 11:31
Deploy to Heroku using Drone CI
# This script is designed to work with Drone IO for Continuous Integration
#
# Drone secret requirements
# HEROKU_API_KEY - Your Heroku API key
# HEROKU_LOGIN - Your Heroku login, probably your email address
# HEROKU_GIT_URL - Your Heroku git url (e.g. - https://git.heroku.com/{your-app-name}.git)
#
# Add a drone secret with the Drone CLI
# drone secret add --image=<image> <org/repo> <secret> <value>