Skip to content

Instantly share code, notes, and snippets.

View natac13's full-sized avatar

Sean Campbell natac13

View GitHub Profile
@natac13
natac13 / Random Quote Chanllenge.markdown
Created August 12, 2015 15:11
Random Quote Chanllenge
@natac13
natac13 / Natac's Weather Application.markdown
Last active August 29, 2015 14:27
Natac's Weather Application
@natac13
natac13 / actionCreators.js
Last active January 31, 2016 21:43
Firebase&Redux-thunk
import {
ADD_RECIPE,
BUILD_LIST
} from '../constants/';
export { pushPath } from 'redux-simple-router';
export function addRecipe(recipe) {
return {
type: ADD_RECIPE,
@natac13
natac13 / firebaseMiddleware.js
Created January 31, 2016 21:31
Start of my middleware to Firebase and Redux
import Firebase from 'firebase';
import Fireproof from 'fireproof';
const fireRef = new Firebase('https://vegan-recipes.firebaseio.com/');
const fp = new Fireproof(fireRef);
const list = fp.child('recipeList');
const firebaseMiddleware = store => next => {
let firebaseRecipeList = {};
list.then(snap => {
firebaseRecipeList = snap.val();
@natac13
natac13 / firebaseMiddleware2.js
Last active January 31, 2016 21:46
Middleware that actual does something with Firebase and not just console.logging
import {
ADD_RECIPE,
DELETE_RECIPE,
BUILD_LIST
} from '../constants/';
import {
requestRecipes,
failedRequest,
successfulRequest
@natac13
natac13 / webpack.config.js
Last active February 28, 2016 16:07
My Webpack Configuration file. Development
import path from 'path'
import webpack from 'webpack'
import autoprefixer from 'autoprefixer'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import NpmInstallPlugin from 'npm-install-webpack-plugin'
const buildPath = path.join(__dirname, 'build')
const entry = path.join(__dirname, 'app', 'index.js')
@natac13
natac13 / webpack.config.production.js
Last active February 28, 2016 16:07
Webpack Config file. Produciton
import path from 'path'
import webpack from 'webpack'
import autoprefixer from 'autoprefixer'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import HtmlWebpackPlugin from 'html-webpack-plugin'
const buildPath = path.join(__dirname, 'build')
const entry = path.join(__dirname, 'app', 'index.js')
module.exports = {
// real source-map for production
@natac13
natac13 / font_variables.scss
Created February 28, 2016 17:17 — forked from jacrook/font_variables.scss
Sass Css Font Stack Variables
//////////////////////////////////////////////////////////////
// Font Variables (http://cssfontstack.com/)
//////////////////////////////////////////////////////////////
//
// Serif font-stacks
//
$baskerville-font-stack: "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif !default;
// client bundle without prerendering
{
test: /\.scss$/,
loader: 'style!css?module&localIdentName=[name]__[local]___[hash:base64:5]!sass',
include: appPath
}
// client bundle with prerendering or optimized with separate css
{
/*
A div with class “navbar”, when nested inside a div with id “header”, should
have a width of 100px, a left padding of 10px, and always be visible at a fixed
position 30 pixels from the top of the window.
*/
div#header > div.navbar {
width: 100px;
padding-left: 10px;
visibility: visible;