Skip to content

Instantly share code, notes, and snippets.

View ericclemmons's full-sized avatar
🏠
Working from home

Eric Clemmons ericclemmons

🏠
Working from home
View GitHub Profile
@ericclemmons
ericclemmons / FluxContainer.js
Last active August 29, 2015 14:17
Flummox FluxContainer that runs actions, watches stores, and renders a component.
import assign from "object-assign";
import Flux from "flummox";
import React from "react";
export default React.createClass({
displayName: "FluxContainer",
contextTypes: {
flux: React.PropTypes.instanceOf(Flux),
},
@ericclemmons
ericclemmons / bootstrap.jsx
Created October 6, 2014 18:29
Gulp + Webpack + React is SLOW
/**
* @jsx React.DOM
*/
var React = require('react');
var Router = require('react-router');
var Routes = Router.Routes;
var Route = Router.Route;
var DefaultRoute = Router.DefaultRoute;
@ericclemmons
ericclemmons / Dockerfile
Created September 2, 2014 15:57
evolution/wordpress-example Dockerfile
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
RUN apt-get -qq -y update
RUN apt-get -qq -y install software-properties-common
RUN apt-add-repository -y ppa:ansible/ansible
RUN apt-get -qq -y update
RUN apt-get -qq -y install ansible
@ericclemmons
ericclemmons / jstransform-require.js
Created August 12, 2014 03:50
JSTransform require.extension to auto-magically convert ES6 to ES5 during runtime.
var fs = require('fs');
var jstransform = require('jstransform');
var path = require('path');
var js = require.extensions['.js'];
module.exports = function(visitors) {
visitors = visitors.reduce(function(visitors, visitor) {
return visitors.concat(visitor.visitorList);
}, []);
@ericclemmons
ericclemmons / css_resources.md
Created August 6, 2014 13:09 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@ericclemmons
ericclemmons / javascript_resources.md
Created August 6, 2014 13:09 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@ericclemmons
ericclemmons / 0_reuse_code.js
Created August 6, 2014 13:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ericclemmons
ericclemmons / functions.php
Last active June 23, 2023 01:47
Auto-activate WordPress Plugins
<?php
// Add to: path/to/wp-content/wp-themes/your-theme/functions.php
/**
* Activate required plugins
*/
include_once ( ABSPATH . 'wp-admin/includes/plugin.php' );
@ericclemmons
ericclemmons / mixins:field-mixin.js
Last active December 19, 2015 00:48
Browserify seems to not be able to reference the same module if there are different paths (because of subdirectories?) Previously: Difficulty with dynamic components in React. Form (works) -> Field (works) -> Text (fails with "Object [object Object] has no method 'value' ). Apparently the mixins don't get mixed
var FieldMixin = {
value: function() {
return 'default value';
}
};
[color]
ui = auto
[user]
# Commented out
[alias]
rom = !git fetch && git rebase origin/master
rod = !git fetch && git rebase origin/develop
co = checkout
st = status
cod = checkout develop