Skip to content

Instantly share code, notes, and snippets.

Nicolas Hery nicolashery

Block or report user

Report or block nicolashery

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
nicolashery / choco.txt
Created Dec 5, 2012
Chocolatey v0.9.8.20 testing
View choco.txt
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
> chocolatey update -pre
The most recent version of chocolatey available from '-Source "" -Source "" ' (if value is empty, using sources in nuget.config file) is On your machine you have installed.
Chocolatey ( is installing chocolatey to "C:\Chocolatey\lib". By installing you accept the license for the
package you are installing (please run chocolatey /? for full license acceptance terms).
nicolashery / 0-flowtype-playground.js
Last active Oct 28, 2015
Flow playground (
View 0-flowtype-playground.js
/* @flow */
import _ from "lodash";
type UserId = string;
type UserRole =
'admin' |
'guest' |
nicolashery / 01-simplest.jsx
Last active Nov 18, 2015
Snippets for blog post on isomorphic React + Flux
View 01-simplest.jsx
// - rendering library (like React) should be able to "pick up" where server
// left off (i.e. hook up to the existing HTML)
// server.js
var server = express();
server.use(function(req, res) {
var appHtml = React.renderToString(<App />);
var html = injectIntoHtml({app: appHtml});

Markdown cheat sheet

# Header 1

## Header 2

### Header 3

This is a paragraph.
nicolashery /
Last active Dec 19, 2015
Exploring the possibility of building a web app without frameworks

Building a web app without a framework

Rough draft exploring the possibility of building a web app without a framework, picking and choosing from small & focused pieces, a la Unix.



nicolashery / variable-names.js
Last active Dec 24, 2015
Change variable names to another naming convention in JavaScript
View variable-names.js
// Change variable names to another naming convention
// Thanks to Oliver Caldwell for the inspiration
// 'hello_world' -> 'helloWorld'
function snakeToCamelCase(name) {
return name.toLowerCase().replace(/_(\w)/ig, function (match, hump) {
return hump.toUpperCase();
View .bash_prompt
# Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Shamelessly copied from
# Screenshot:
# A big thanks to \amethyst on Freenode
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
if tput setaf 1 &> /dev/null; then
nicolashery / process_customers.js
Created Nov 29, 2013
Working with JSON using Node.js, Streams, and the Unix command line
View process_customers.js
// Usage:
// cat customers_raw.json | node process_customers > customers.json
var JSONStream = require('JSONStream');
var through2 = require('through2');
nicolashery / ink-file-picker.js
Created Dec 4, 2013
Ink file picker encoded security policy and its signature with Node.js
View ink-file-picker.js
/* Ink file picker encoded security policy and its signature with Node.js
handle: 'KW9EJhYtS6y48Whm2S6D',
expiry: 1508141504
View react-render-tree.jsx
// Exploring using "expose React component tree as data" @swannodette
// (
// for routing and fetching data ("react-router-mega-demo" @ryanflorence)
// (
var appState = {
route: '/contacts',
contacts: [],
messages: []
You can’t perform that action at this time.