Add a new key
$ ssh-keygen -t rsa_new -C "[email protected]"
Start ssh-agent
$ eval `ssh-agent -s`
Add a new key
$ ssh-keygen -t rsa_new -C "[email protected]"
Start ssh-agent
$ eval `ssh-agent -s`
export const RESET_STATES = 'resetStates' | |
function resetState (state, moduleState) { | |
const mState = state[moduleState] | |
if (mState.initState && typeof mState.initState === 'function') { | |
const initState = mState.initState() | |
for (const key in initState) { | |
mState[key] = initState[key] |
I've worked with AngularJS for many years now and still use it in production today. Even though you can't call it ideal, given its historically-formed architecture, nobody would argue that it became quite a milestone not only for evolution of JS frameworks, but for the whole web.
It's 2017 and every new product/project has to choose a framework for development. For a long time I was sure that new Angular 2/4 (just Angular below) will become the main trend for enterprise development for years to come. I wasn't even thinking of working with something else.
Today I refuse to use it in my next project myself.
function nestedToFlatArray(arr, returnArr) { | |
if(returnArr.length == 0) | |
returnArr = []; | |
for(var i=0; i<arr.length; i++) { | |
if(Array.isArray(arr[i])) { | |
nestedToFlatArray(arr[i], returnArr); | |
} | |
else { | |
returnArr.push(arr[i]); |
// gecko and webkit | |
// details here https://developer.mozilla.org/en-US/docs/DOM/event.initKeyEvent | |
var keyboardEvent = document.createEvent("KeyboardEvent"); | |
var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; | |
keyboardEvent[initMethod]( | |
"keydown", // event type : keydown, keyup, keypress | |
true, // bubbles |