Skip to content

Instantly share code, notes, and snippets.

View superhighfives's full-sized avatar

Charlie Gleason superhighfives

View GitHub Profile
@superhighfives
superhighfives / gulpfile.js
Created August 13, 2014 16:09
Gulp / Harp with BrowserSync
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var deploy = require('gulp-gh-pages');
var cp = require('child_process');
var harp = require('harp')
/**
* Serve the Harp Site
*/
@superhighfives
superhighfives / getting-started.coffee
Created January 3, 2017 12:57
Example Übersicht widget
# This is a simple example Widget, written in CoffeeScript, to get you started
# with Übersicht. For the full documentation please visit:
#
# https://github.com/felixhageloh/uebersicht
#
# You can modify this widget as you see fit, or simply delete this file to
# remove it.
# this is the shell command that gets executed every time this widget refreshes
command: "whoami"
@superhighfives
superhighfives / sandpit-setup-example.md
Created January 7, 2017 22:21
A quick set up guide for Sandpit
npm install create-react-app -g
create-react-app party
cd party
npm install sandpit --save
npm start

You can delete everything in src/index.js and replace it with:

@superhighfives
superhighfives / almost-static-stacks-simple-output.html
Last active February 1, 2017 13:10
An Almost Static Stack - Simple output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="shortcut icon" href="/favicon.ico">
<title>React App</title>
<link href="/static/css/main.9a0fe4f1.css" rel="stylesheet">
</head>
<body>
@superhighfives
superhighfives / index.js
Last active February 1, 2017 17:18
Hot reloading with create-react-app, while avoiding hot reloading Three's WebGLRenderer
import React from 'react'
import ReactDOM from 'react-dom'
import { WebGLRenderer } from 'three'
import App from './App'
import './index.css'
const renderer = new WebGLRenderer({antialias: true})
const rootEl = document.getElementById('root')
ReactDOM.render(
@superhighfives
superhighfives / index.js
Last active September 25, 2018 13:19
Hot reloading with create-react-app
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import './index.css'
const rootEl = document.getElementById('root')
ReactDOM.render(
<App />,
rootEl
@superhighfives
superhighfives / App.js
Created February 1, 2017 17:35
An example of react-helmet with create-react-app
import React, { Component } from 'react';
import Helmet from 'react-helmet';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<Helmet title="You Are Doing Great" />
@superhighfives
superhighfives / application_controller.rb
Created February 28, 2017 18:28
Rails 5 API + ActiveAdmin + create-react-app on Heroku
# Before:
class ApplicationController < ActionController::API
end
# After:
class ApplicationController < ActionController::Base
end
@superhighfives
superhighfives / Gemfile
Last active February 28, 2017 19:47
Rails 5 API + ActiveAdmin + create-react-app on Heroku
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
@superhighfives
superhighfives / rails g active_admin:install
Created February 28, 2017 18:47
Rails 5 API + ActiveAdmin + create-react-app on Heroku
Running via Spring preloader in process 49455
invoke devise
generate No need to install devise, already done.
invoke active_record
create db/migrate/20170228184603_devise_create_admin_users.rb
create app/models/admin_user.rb
invoke test_unit
create test/models/admin_user_test.rb
create test/fixtures/admin_users.yml
insert app/models/admin_user.rb