This module can be used to flatten a deeply nested array.
import flattenDeep from 'flattenDeep'
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://rawgit.com/lhorie/mithril.js/next/mithril.js"></script> | |
<script id="jsbin-javascript"> | |
// noprotect |
#!/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)); |
#!/bin/sh | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mExecuting command $@ for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -maxdepth 4 -type d -name ".git" | cut -c 3-) ; do |