Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rmurphey on github.
  • I am rmurphey (https://keybase.io/rmurphey) on keybase.
  • I have a public key whose fingerprint is A963 703A C3C3 CAC5 9C5F 7720 CB24 58C8 D5AB 4837

To claim this, I am signing this object:

We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Have you focused specifically on improving your JS skills at any time in the last year?,Which resources did you use to help you learn?,"Of the resources you used, which kind was the MOST helpful?","Of the resources you used, which kind was the LEAST helpful?","During your learning, which areas have been particularly challenging?",What one resource would you recommend to someone trying to learn JS?,Why do you recommend it?,What one resource would you NOT recommend to someone trying to learn JS?,Why do you NOT recommend it?,Which technologies do you use in your current role?,How long have you been working professionally in web development?,How would you rate the improvement of your JS skills in the last year?,"Have you gotten a new job, a promotion, or new responsibilities since improving your JS skills?",Do you consider yourself a minority in tech?
Yes,"Online courses, Blogs, Books, Help from friends, Help from coworkers, Meetups, Conferences",Help from coworkers,Books,"Debugging, Understanding how to apply th
'use strict';
var fs = require('fs');
var path = require('path');
var readline = require('readline');
var RECORD_START = /^t=\s+(\d+)\s\[st=\s+(\d+)\]\s+(.+)$/;
var RECORD_KEY_VALUE = /^\s+-->\s(\S+)\s=\s\"?([^\"]+)\"?/;
var RECORD_HEADERS = /^\s+(--> )?(:?[^:]+):\s(.+)$/;
input {
stdin { }
}
filter {
grok {
match => {
message => "<\d+>%{TIMESTAMP_ISO8601:timestamp} [^:]+[:] %{IP:client} %{GREEDYDATA}GMT%{SPACE}%{WORD:method}%{SPACE}%{URIPATHPARAM:path}%{SPACE}%{NUMBER:httpStatus}%{SPACE}%{URI:referer}"
}
}
async.waterfall([
function1, // returns Thing1
(function () {
return function (Thing1) {
function2(Thing1, Obj1, Obj2, Obj3);
};
}()), // uses Thing1 to create Thing2 but also requires a lot of other parameters to be passed to it.
], function (err, result) {
if (err) {
console.log('barf')
#!/bin/sh
# retab a list of files from 2 spaces to 4 spaces
# todo: read the list of files from a file
for i in \
client/scripts/components/describe.jsx \
client/scripts/components/includes/header.jsx \
client/scripts/components/index.jsx \
client/scripts/components/layouts/default.jsx \
@rmurphey
rmurphey / share-modules.md
Last active August 29, 2015 14:15
How to share modules across RequireJS, CommonJS web apps?

Earlier today I tweeted:

I want to use node modules in my existing requirejs browser app. What’s the right path?

This was really understating the problem I'm trying to solve. I need a way to share modules across various JS (browser) applications. Some of these applications are RequireJS apps, and changing them away from that is probably not on the table. Others are newer applications where we have a choice when it comes to the build system -- common choices of late seem to be browserify and webpack.

I want to be able to maintain a set of modules separate from these projects that can be used by these projects. The requirements, then, are:

  • Modules must be usable by a CommonJS-based module/build system, such as Browserify or Webpack.
  • Modules must be usable by an AMD-based module/build system, such as RequireJS.
require(['app'], function (App) {
App.init();
});
//app.js
define([
'pages'
], function (pages) {
return {
init : function () {

Many of you know that Melissa and I have been working to adopt a baby. As a same-sex couple, it’s a bit complicated — international adoption is pretty much out these days, and we need to find a birthmother outside of NC if we both want to be the child’s legal parents.

After six months of pursuing the traditional paths, we decided to get creative this weekend, and made a website that tells our story. We’re sharing it with our friends on the off chance that one of you might know someone who can help us grow our family. Please don’t be shy about sharing it, and let me know if you have any questions!

/*****************************************************************************
* __ __ _ _ ___ _
* \ \/ _\ /\/\ (_)_ __ | |_ _ _ / __\ __ ___ ___| |__
* \ \ \ / \| | '_ \| __| | | | / _\| '__/ _ \/ __| '_ \
* /\_/ /\ \ / /\/\ \ | | | | |_| |_| | / / | | | __/\__ \ | | |
* \___/\__/ \/ \/_|_| |_|\__|\__, | \/ |_| \___||___/_| |_|
* |___/
*
* Identifying and Eliminating Code Smells
*