Skip to content

Instantly share code, notes, and snippets.

View johnferrie's full-sized avatar

John Ferrie johnferrie

View GitHub Profile
#!/usr/bin/env bash
# Updating packages
apt-get update
# ---------------------------------------
# Nginx setup
# ---------------------------------------
apt-get install -y nginx
{
id: Number,
date: String, // TODO: Format date.
link: String, // TODO: Transform to correct url.
slug: String,
excerpt: String, // TODO: Change to deck? Strip wrapping p tag?
title: String,
content: Array, //Array is needed for injecting ads on mobile. | TODO: Change to story?
author: String,
featured_image: String,
{
id: Number,
link: String, // TODO: Transform to correct url.
slug: String,
excerpt: String, // TODO: Change to deck? Strip wrapping p tag?
title: String,
featured_image: String,
category: {
id: Number, // TODO: is this needed?
name: String,
.social {
li {
display: inline-block;
line-height: 40px;
&:first-child {
margin: 0 10px 0 0;
}
}
import React from 'react';
import { Link } from 'react-router';
class Question extends React.Component {
render() {
let details = this.props.details;
if (details.isPublished) {
return (
<li>
import React from 'react';
import $ from 'jquery';
import config from '../config';
import Header from '../components/Header';
import Question from '../components/Question';
import Footer from '../components/Footer';
class Landing extends React.Component {
constructor() {
import React from 'react';
import ReactDOM from 'react-dom';
import {Router, Route} from 'react-router';
import { createHistory } from 'history';
import config from './config';
import ga from 'react-ga';
import Landing from './pages/Landing';
ga.initialize(config.google.analyticsId);
@johnferrie
johnferrie / _filter.sass
Created October 4, 2012 21:08
CSS3 Filter Effects Sass Mixin
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
//
// grayscale ex: filter: grayscale(100%);
// sepia ex: filter: sepia(100%);
// saturate ex: filter: saturate(0%);
// hue-rotate ex: filter: hue-rotate(45deg);
// invert ex: filter: invert(100%);
// brightness ex: filter: brightness(15%);
// contrast ex: filter: contrast(200%);
// blur ex: filter: blur(2px);
@johnferrie
johnferrie / media-query-mixin.scss
Created October 4, 2012 21:05 — forked from Snugug/media-query-mixin.scss
Media Query Sass Mixin
//////////////////////////////
// Generalized Media Query Mixin
//
// Requires Sass 3.2+
// Until released:
// (sudo) gem install sass --pre
//////////////////////////////
@mixin media-query($value, $operator: 'min-width', $query: 'screen') {
@media #{$query} and (#{$operator}: #{$value}) {
@content;