Skip to content

Instantly share code, notes, and snippets.

View clemmy's full-sized avatar
🌮
Snacking

Clement Hoang clemmy

🌮
Snacking
View GitHub Profile
@clemmy
clemmy / brackets.js
Created November 10, 2014 18:20
Outputting all balanced bracket expressions
outputBalancedBracket(3);
function outputBalancedBracket(n) {
for (var i=1; i<=n; ++i) {
var outputs = [];
brackets("",0,0,i,outputs);
console.log("N="+i+" "+outputs.join(','));
}
}
@clemmy
clemmy / Vagrantfile
Created November 17, 2014 05:09
The Vagrant configuration file for my MEAN stack box.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
Render 1 Render 2 State Preserved?
<>...</> <>{[...]}</> yes (in any level)
<><>...</></> <>...</> no
[...] [[...]] no
[<>...</>]* [...] no
[<>...</>]* <>...</> no
[<>...</>]* <>[...]</> no
[<>...</>]* [[...]] yes
[&lt;&gt;...&gt;]* &lt;&gt;&lt;&gt;...&gt;&gt; yes
{{ a: 1 }} // { a: 1 }
{
  ({ a: 1 })
} // { a: 1 }
*{{ a: 1 }} // { a: 1 }
*{
  ({ a: 1 })
} // { a: 1 }
/******/ (function(modules) {
// webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {}; // The require function
/******/
/******/ /******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if (installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@clemmy
clemmy / babel-standalone.js
Last active December 5, 2017 16:56
v6.18 with JSX fragment support, implicit do expressions, and explicit generator expressions
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["Babel"] = factory();
else
root["Babel"] = factory();
})(this, function() {
@clemmy
clemmy / babel-standalone.js
Last active December 8, 2017 19:09
v6.18 with JSX fragment support and explicit generator expressions
This file has been truncated, but you can view the full file.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["Babel"] = factory();
else
root["Babel"] = factory();
})(this, function() {
This file has been truncated, but you can view the full file.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["Babel"] = factory();
else
root["Babel"] = factory();
})(this, function() {