Skip to content

Instantly share code, notes, and snippets.

View JBreit's full-sized avatar

Jason Breitigan JBreit

  • Inner Mind Co.
  • Lancaster, PA
View GitHub Profile
<?php
namespace App;
class Comment extends Model
{
public function post()
{
return $this->belongsTo(Post::class);
}
{
"routes": {
"index": {
"title": "Home Page",
"content": "This is the homepage."
},
"list": {
"title": "List Page",
"content": "List Page content."
}
const fs = require('fs');
const { basename, resolve } = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const Clean = require('clean-webpack-plugin');
const Copy = require('copy-webpack-plugin');
const Html = require('html-webpack-plugin');
const Text = require('extract-text-webpack-plugin');
const marked = require('marked');
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const Clean = require('clean-webpack-plugin');
const Html = require('html-webpack-plugin');
const Text = require('extract-text-webpack-plugin');
const marked = require('marked');
const renderer = new marked.Renderer();
@import url("common.css");
.app {
height: 100%;
}
@media only screen {
}
@JBreit
JBreit / .babelrc
Last active July 16, 2017 13:49
Webpack 2.0 Configuration Demo
{
"presets": [
["env", {
"modules": false
}],
"react"
],
"plugins": []
}
.navbar {
display: block;
float: left;
position: relative;
background: #F7F7F7;
border-right: 1px solid #e5e5e5;
height: 100%;
min-height: 100%;
width: 55px;
margin-top: 50px;
@JBreit
JBreit / index.html
Created June 16, 2017 22:17
Vanilla JS Fetch, History API SPA Experiment
<!DOCTYPE html>
<html lang="en-us">
<head>
<base href="/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Jason Breitigan">
import NotFound from './notfound';
const Config = ($stateProvider, $urlRouterProvider, $locationProvider) => {
'ngInject';
$stateProvider
.state('404', NotFound);
$locationProvider
.html5Mode(false)
/* global document Rx*/
const link = document.querySelector('.nav-link');
const link$ = Rx.Observable.fromEvent(link, 'click');
const observer = {
next(event) {
console.log(event);
},
error(err) {