This module can be used to flatten a deeply nested array.
import flattenDeep from 'flattenDeep'
#!/bin/bash | |
# Sample App Init script for running sample app daemon | |
# | |
# chkconfig: - 98 02 | |
# | |
# description: Sample Application Upstart, using Forever | |
APPHOME=/opt/sample-app | |
APPSCRIPT=app.js |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mithril experiment</title> | |
<meta name="description" content="mithriljs: Mithril template"> | |
<meta charset="utf-8"> | |
<script> | |
window.log = function(){ | |
log.history = log.history || []; // store logs to an array for reference |
var Modal = { | |
controller: function() { | |
return {isVisible: false} //internal state | |
}, | |
view: function() { | |
return m(".modal", { | |
class: ctrl.visible ? ".modal-visible" : "" //sets visibility via CSS | |
config: function(el, init) { | |
if (!init) { | |
//jQuery-exposed API |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="unique routes for page with/without overlay"> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/mithril/0.2.0/mithril.min.js"></script> | |
<style id="jsbin-css"> | |
div.overlay { | |
position: absolute; |
// Taken from http://loading.io/ | |
uiload { | |
display: inline-block; | |
position: relative; | |
& > div { | |
position: relative; | |
} | |
} | |
@-webkit-keyframes ajax-loader { |
/** | |
* | |
* @param date {string} | |
* @returns {string || null} | |
*/ | |
function validateDate (date) { | |
var dateError = false; | |
//console.log("VALIDATE DATE = "+ date) | |
if (date) { | |
var sDate = date.split(/[.,\/ -]/); |
import {createStore} from 'redux'; | |
import reducer from './reducers/index.js' | |
import { rehydrate, rehydratingStore } from './utils/rehydratingStore.js'; | |
const store = rehydratingStore()(createStore)(reducer); | |
export function __reload(deletedModule){ | |
const prevState = deletedModule.getState(); | |
debug('Reloaded. rehydrate with state: ', prevState.sketcher.objectsById); | |
store.dispatch(rehydrate(prevState)); |
'use strict'; | |
/** | |
* HELP! I am not the author of this, I don't remember where I got this file, it was in es5 at the time. | |
* If you know who the author is, please get in touch with me to set the record straight. | |
* Thank you and thank to the anonymous original author! | |
*/ | |
const VERSION = '0.1.0'; | |
# Node | |
## Install n | |
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y git | |
sudo chown -R veggiemonk:veggiemonk /usr/local | |
git clone https://github.com/tj/n.git ~/code/n | |
cd ~/code/n && make install | |
n 5.9.1 | |
npm -g i diff-so-fancy npm pure-prompt npm-check caniuse-cmd |