Skip to content

Instantly share code, notes, and snippets.

View jamesslock's full-sized avatar

James Seymour-Lock jamesslock

  • Ebates, Rakuten
  • New York City
View GitHub Profile
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import autoprefixer from 'autoprefixer';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import ReplacePlugin from 'replace-bundle-webpack-plugin';
import OfflinePlugin from 'offline-plugin';
import path from 'path';
import V8LazyParseWebpackPlugin from 'v8-lazy-parse-webpack-plugin';
import ScriptExtHtmlWebpackPlugin from "script-ext-html-webpack-plugin";
const ENV = process.env.NODE_ENV || 'development';
@jamesslock
jamesslock / Container.js
Created November 27, 2016 19:54
Container.js
import React, { Component, PropTypes } from 'react';
import styled, { css } from 'styled-components';
const Container = styled.div`
/* Root styles */
margin: auto;
padding: 0 80px 0 10%;
&:before,
&:after {
@jamesslock
jamesslock / Button.js
Created November 11, 2016 21:59
Button.js
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import s from './Button.css';
export default class Button extends Component {
render() {
const {
className,
@jamesslock
jamesslock / twitterClean.rb
Created July 31, 2016 14:38
Clean twitter account & backup tweets to dropbox
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder
TWITTER_USER = "your_twitter_username"
/***** Color Variables *****/
:root {
/* Base Colors */
--colorGreen: #95d06d;
--colorRed: #d06d6d;
--colorBlue: #41c1c8;
--colorBlueDark: #00587f;
--colorOrange: #f7931d;
--colorYellow: #d0ca6d;
--colorGray: #979797;
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
@jamesslock
jamesslock / ShareButton.jsx
Last active May 17, 2016 21:05
ReactJS Share Buttons
import React, { PropTypes } from 'react';
import Button from '../components/Button.jsx';
import Icon from '../components/Icon.jsx';
module.exports = React.createClass({
render: function () {
const {
className,
classNameIcon,
children,
@jamesslock
jamesslock / Button.react.js
Created April 20, 2016 00:26
React Button
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import css from './Button.css';
export default class Button extends Component {
render() {
const {
className,
@jamesslock
jamesslock / ProgressBar.js
Last active February 13, 2016 22:03
Basic Progress Bar React
import React, { Component, PropTypes } from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './ProgressBar.scss';
class ProgressBar extends Component {
render() {
const completed = +this.props.completed;
@jamesslock
jamesslock / PageLayout.jsx
Created September 24, 2015 18:49
PageLayout.jsx
var React = require('react'),
Footer = require('./Footer.jsx'),
Footer = require('./ScanCarousel.jsx');
var PageLayout = React.createClass({
render: function() {
if (this.props.layoutType === "withFooter") {
return (