Skip to content

Instantly share code, notes, and snippets.

Jesse McCarthy jmm

Block or report user

Report or block jmm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jmm
jmm / README.md
Last active Feb 9, 2016
Idea for better format for meaningful discussions on twitter.
View README.md

Twitter is useful for getting tipped off about stuff that's happening, but frequently that kicks off a discussion, and it's really difficult to have a meaningful discussion on twitter (even when the people involved are capable of it). The messages are too short, especially when they start getting consumed with multiple @ mentions, and it's impossible to follow the course of a discussion with the half-baked way they try to thread them.

I feel like "half-baked" is being generous. Anyone who's ever tried to follow an endless series of "View conversation", "View other replies", and "Show more" links trying to trace the start of the discussion and see all of the comments knows what I'm talking about. It's especially a treat when you have to click "Show more" a bunch of times, then have to click something else to try to see more of the discussion, then try to go back and your place is lost.

I've heard that twitter may ease the limit on message size (maybe drastically, e.g. 10k), but I'm not sure how that would wo

@jmm
jmm / demo.js
Created Jun 16, 2015
Demo of issue with creating babel plugin to dynamically insert `import` declaration. See babel/babel#1777
View demo.js
var
babel = require('babel'),
output;
function plugin (babel) {
var t = babel.types;
var transformers = {
Program: {
enter: function (node) {
var newImport = t.importDeclaration(
@jmm
jmm / gist:2066187
Created Mar 17, 2012
Workaround for lack of click event support for OPTIONs in OPTGROUPs in jQuery Validation Plugin
View gist:2066187
$( "#some-form" ).validate( {
'onclick' : function ( element, event ) {
var parent;
if (
( parent = $( element ).filter( "option" ).closest( "select" ) ).length
@jmm
jmm / gist:1817056
Created Feb 13, 2012
Experimenting with password length validation within Kohana 3.2 ORM validation system
View gist:1817056
<?php
class Model_User extends Model_Auth_User {
protected $_raw_data;
public function rules() {
$rules = parent::rules();
@jmm
jmm / gist:1140190
Created Aug 11, 2011
Patch for WordPress 3.2.1 wp-includes/canonical.php to redirect /%post_id% to /%post_id%/%postname%
View gist:1140190
elseif (
is_single() &&
! $redirect_url &&
( $permalink = get_permalink( get_query_var( 'p' ) ) ) &&
(
You can’t perform that action at this time.