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 / 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
cat ~/.profile
export PATH="/usr/local/php5/bin:/usr/local/bin:$PATH"
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
GIT_PS1_SHOWDIRTYSTATE="false"
GIT_PS1_SHOWUPSTREAM="false"
@ericclemmons
ericclemmons / app.controllers.project.js
Last active December 15, 2015 05:19
AngularJS Deferred $http
angular
.module('app.controllers.project', [
'app.models.project'
])
.controller('app.controllers.project', [
'$routeParams',
'$scope',
'project',
function($params, $scope, project) {
$scope.project = project;
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Technology &amp; Frontend Framework Trends</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@ericclemmons
ericclemmons / Preferences.sublime-settings
Created October 9, 2012 14:39
SublimeText2 User Preferences (Phoenix, Monokai Soda)
{
"auto_complete": true,
"color_scheme": "Packages/User/Monokai Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
@ericclemmons
ericclemmons / namespace.sublime-snippet.xml
Created July 13, 2012 03:11
Automatically generate the namespace & class depending on where the file is saved
<!--
File is located at:
/Users/Eric/Sites/MyApp/src/MyApp/Bundle/BlogBundle/Entity/Blog/Post.php
Problem:
No way to double-substitute or chain filters