View use-currying.js
let MODIFY = "MODIFY";
let ADD = "ADD";
let DELETE = "DELETE";
function checkAction(actions, recon, action, cb) {
if (actions.indexOf(action) > -1) {
cb(recon);
}
}
View deep-es6-destructuring.js
const params = {
pagination: {
prevId:1,
nextId: 3
},
location: {
query: {
step: 10
}
}
View better react devtools.md

better react devtools

  • which React component is rendered at the top-level
  • performance information
  • error page
View misc.txt
karl.jakober [7:13 AM]
looking for a good alternative to webview.ContentWindow.postMessage for electron, people are saying webview.send is a good alternative, but that requires ipc to be invoked inside the webview itself
View README.md

packaging an Electron app on windows, using "Node.js command prompt"

steps to reproduce:

  1. git clone https://github.com/deepak/electron-webview-todo/ && cd
  2. npm install
  3. npm install -g electron-forge
  4. npm run package:win32

packaging works on windows though:

View README.md

open the 'index.html' file in the browser. url will be like "file:///Users/deepak/Code/static/index.html#/"

this is possible because we use hashHistory and not browserHistory

need this in situations where - we use file based urls. we might need/prefer file based urls because:

  1. prototyping
  2. there is no server to serve html files. so no urls. although this is simple
View hack.js
const { ipcRenderer } = require('electron');
ipcRenderer.on('ping', () => {
console.log(document);
console.log(document.querySelector('input'));
// the document references to the document of the <webview>
document.querySelector('input').addEventListener('change', function(event) {
event.preventDefault();
console.log("====> test");
View # node@6 - 2016-12-26_16-24-30.txt
Homebrew build logs for node@6 on macOS 10.10.5
Build date: 2016-12-26 16:24:30
View elm-2-functions-diff.elm
-- Elm, what is the difference ?
\x y -> (x y) -- <function> : (a -> b) -> a -> b
\x y -> (x, y) -- <function> : a -> b -> ( a, b )
View gist:392dad0dd1f788471fae6eef16ac55a1
-- trying in elm-repl
import Random
type Msg = Foo Bool
r = (Random.generate Foo Random.bool)
-- { type = "leaf", home = "Random", value = Generate (Generator <function>) }
-- : Platform.Cmd.Cmd Repl.Msg