Skip to content

Instantly share code, notes, and snippets.

View methodbox's full-sized avatar
:octocat:
Instead of adding emojis to my commits I spend that time writing actual code.

methodbox

:octocat:
Instead of adding emojis to my commits I spend that time writing actual code.
View GitHub Profile
@methodbox
methodbox / setup-repo.sh
Last active July 15, 2019 12:01
Add a command "setup-repo" which remotely creates a GitHub repo for you and initializes Git for your local project.
#!/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.
@methodbox
methodbox / index.js
Last active June 24, 2019 02:51
Parce Example - Adding Bootstrap
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.
@methodbox
methodbox / index.js
Created June 23, 2019 16:44
Parcel Example - index.js
import * as React from "react";
import * as ReactDOM from "react-dom";
class App extends React.Component {
render() {
return (
<div>
<h1>Hello, World.</h1>
</div>
);
@methodbox
methodbox / index.html
Created June 23, 2019 16:34
Parcel Example - index.html
<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>
@methodbox
methodbox / package.json
Created June 23, 2019 16:30
Parcel Example - package.json
{
"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/*"
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