Skip to content

Instantly share code, notes, and snippets.

Vaughan Rouesnel vjpr

Block or report user

Report or block vjpr

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
@vjpr
vjpr / gist:4091310c6a7486e683f3
Last active Aug 29, 2015
CoffeeScript templating ideas
View gist:4091310c6a7486e683f3
###
<div class="row">
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
</div>
###
# Should be predictable translations.
# Teacup
@vjpr
vjpr / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vjpr
vjpr / api.js
Last active Aug 29, 2015
koa-mount patch to allow hot reloading of routes
View api.js
const debug = require('debug')('server')
const mount = require('koa-mount-hot')
const config = require('config')
const route = require('koa-route')
// TODO: This should only be in one place.
mount.hot = (prefix, name, hot = false) => {
if (config.env !== 'development') return false;
return hot;
}
@vjpr
vjpr / README.md
Last active Aug 29, 2015
NPM module patching workflow
View README.md

NPM module patching workflow

Create a new project

npm init -f

Add a module

npm install --save something

View gist:5939a3c95e998ec43c55

Redux is super lightweight...so it may be useful to add some helper utils on top of it to reduce some boilerplate. The goal of Redux is to keep these things in user-land, and so most likely these helpers (or anything like them) wouldn't make it into core.

It's important to note that this is just ONE (and not particularly thoroughly tested) way to accomplish the goal of reducing boilerplate in Redux. It borrows some ideas from Flummox and the way it generates action creator constants.

This will evolve, I'm sure, as time goes on and as Redux's API changes.

Some helper functions to reduce some boilerplate in Redux:

import _ from 'lodash';
@vjpr
vjpr / plugin-research.md
Last active Aug 29, 2015
Research of existing Node.js plugin systems used by various modules.
View plugin-research.md
@vjpr
vjpr / code-snippets.md
Last active Aug 29, 2015
What is the best workflow for posting code snippets?
View code-snippets.md

What is the best workflow for posting code snippets?

My Gist Workflow

  • Use Gist plugin for Sublime Text 3. (Add api token to settings).
  • Create new files in ~/Desktop/Notes.
  • Use OmniMarkupPreview Sublime Text 3 plugin to preview in browser.
  • When ready...
  • Open command palette (⌘+Shift+P) > Enter Gist > Create New Gist. (Or use keyboard shortcuts)
  • Delete file from ~/Desktop/Notes.
@vjpr
vjpr / live-plugin-spec-options.md
Created Jul 25, 2015
Options for the file format for Live plugins.
View live-plugin-spec-options.md

Live plugin file format options

Options for the the file format for Live plugins.

Class

Must implement a LivePlugin shape, but does not need to extend from it.

export default class {
@vjpr
vjpr / vaughan.io.html
Created Sep 25, 2011
Tumblr Theme of vaughan.io
View vaughan.io.html
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lte-ie8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lte-ie8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lte-ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>{Title}{block:TagPage} &bull; Posts Tagged &lsquo;{Tag}&rsquo;{/block:TagPage}{block:PostSummary} &bull; {PostSummary}{/block:PostSummary}</title>
{block:Description}
@vjpr
vjpr / backbone-0.9.1.js
Created Feb 26, 2012 — forked from thickey/backbone-0.9.1.js
Externs for Backbone.js and Underscore.js
View backbone-0.9.1.js
/*
* @fileoverview Externs for backbone-0.9.1.js
*
* built with http://www.dotnetwise.com/Code/Externs/index.html
* see also: http://blog.dotnetwise.com/2009/11/closure-compiler-externs-extractor.html
* via: http://code.google.com/p/closure-compiler/wiki/FAQ#How_do_I_write_an_externs_file?
*
* Note: when building via that page, you first need to load in underscrore.js, as that's a dependency.
* also, after running the extern for Backbone, you need to manually run it for:
You can’t perform that action at this time.