Skip to content

Instantly share code, notes, and snippets.

View ryan-roemer's full-sized avatar

Ryan Roemer ryan-roemer

View GitHub Profile
@ryan-roemer
ryan-roemer / app.js
Created April 2, 2014 01:41
Backbone.js Training - Day 2 - Customer Child/Parent Views
/**
* Application.
*
* This file is usually the "binding" of all of the individual Backbone.js
* components into a unified whole. It is also typically *not* unit tested
* because it has side effects from just running it. So, here is the expected
* place to also do things like start Backbone.js History, do `$()` DOM
* manipulation, etc.
*/
define([
@ryan-roemer
ryan-roemer / .gitignore
Last active August 29, 2015 13:58
Backbone.js Training - Day 3 - AMD / Frontend Testing
.DS_Store
@ryan-roemer
ryan-roemer / abstract.md
Created April 13, 2015 22:25
Polytglot Workshop (5/22/2015) - Full. Stack. Testing.

Full. Stack. Testing. (with JavaScript)

Modern application testing faces so many options for frontend, backend, and integration tests that developers can be overwhelmed in a sea of choices and technologies. As a take on "full-stack" development, we will explore full-stack testing -- using a single stack of core techniques and libraries that offer a cogent, minimal way to "test all the things" in your application.

Our workshop will explore what types of tests you should write and how to write them, with a focus on:

  • Backend Tests: Server code, network payloads.
  • Frontend Tests: UI/UX and browser code.
  • Integration Tests: Automating end-to-end user interactions with the full application.
@ryan-roemer
ryan-roemer / gist:1189432
Created September 2, 2011 18:35 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Senior Engineer, IP Street
Favorite Python project: django/django-nonrel
Favorite Conference: PyCon
Python Experience Level: Advanced
@ryan-roemer
ryan-roemer / gist:2399041
Created April 16, 2012 14:06
Chef Attribute Array Stack Trace
Generated at Mon Apr 16 13:44:28 +0000 2012
NoMethodError: undefined method `+@' for ["0.6.15"]:Array
/var/cache/chef/cookbooks/nodejs/attributes/default.rb:20:in `from_file'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:655:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:653:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:653:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:652:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:652:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:101:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:60:in `load'
@ryan-roemer
ryan-roemer / server-cluster.coffee
Created September 6, 2012 13:56
Node.js v0.8 Cluster Server
cluster = require "cluster"
log = require "winston"
config = require "config" # Your configuration goes here.
app = require "./server" # Your real server goes here.
numCpus = require("os").cpus().length
workers = {}
# Helpers.
shutdown = ->
{ "name": "Ryan" }
@ryan-roemer
ryan-roemer / builder-local-install.md
Created January 14, 2016 18:55
Snippet for using local `builder`.

We use builder to control our development workflows. builder is an npm dependency found in node_modules/.bin/builder. To use the shorthand builder command without the full path, please follow the steps in the builder local install guide.

The "short, short version" of this on Mac/Linux is to add:

export PATH="${PATH}:./node_modules/.bin"
@ryan-roemer
ryan-roemer / bundle.js
Last active February 24, 2016 21:27
Simple JS file with lodash memoize.
// Here is the output bundle with filepaths included to see what _also_
// comes in with memoize.
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache