Bad: "Do you think it;s a good idea?"
Fix: You might ask them to show you how they currently do their job. Talk about which parts they love and hate. Ask which other tools and
processes they tried before settling on this one. Are they actively searching
for a replacement? If so, what’s the sticking point? If not, why not? Where
are they losing money with their current tools? Is there a budget for better
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Ease functions : http://www.gizma.com/easing/ | |
| function smoothScroll(target, duration){ | |
| var target = document.querySelector(target); | |
| var targetPosition = target.getBoundingClientRect().top; | |
| var startPosition = window.pageYOffset; | |
| var distance = targetPosition - startPosition; | |
| var startTime = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function prettyPrintDate(ms) { | |
| var units = [ | |
| {ms: 1000, label: 'second'}, | |
| {ms: 1000 * 60, label: 'minute'}, | |
| {ms: 1000 * 60 * 60 , label: 'hour'}, | |
| {ms: 1000 * 60 * 60 * 24, label: 'day'}, | |
| ], | |
| result, | |
| i, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function prettyPrintDate(ms) { | |
| var units = [ | |
| {ms: 1000, label: 'second'}, | |
| {ms: 1000 * 60, label: 'minute'}, | |
| {ms: 1000 * 60 * 60 , label: 'hour'}, | |
| {ms: 1000 * 60 * 60 * 24, label: 'day'}, | |
| ], | |
| result, | |
| i, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const combineReducers = (reducers) => { | |
| return (state = {}, action) => { | |
| return Object.keys(reducers).reduce( | |
| (nextState, key) => { | |
| nextState[key] = reducers[key]( | |
| state[key], | |
| action | |
| ); | |
| return nextState; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Open the console | |
| * to see the state log. | |
| * pay attension on function "todoApp" on ***line 56*** , | |
| * this function COMBINED the return state of "visibilityFilter" and "todos" functions *** line 47 and line 33 ***, | |
| * this pattern is pretty much equivalent to "combineReducers" from Redux. | |
| * Which means this pattern is pretty much the native code OF "combineReducers" | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const createStore = (reducer) => { | |
| let state; | |
| let listeners = []; | |
| const getState = () => state; | |
| const dispatch = (action) => { | |
| state = reducer(state, action); | |
| listeners.forEach(listener => listener()); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prototype(Creaton.Product:Utility.Asset.FileSizeCaculator) < prototype(Neos.Fusion:Component) { | |
| asset = null | |
| filesize = ${this.asset ? this.asset.resource.filesize : null} | |
| byteUnits = ${[' B', ' kB', ' MB', ' GB', ' TB']} | |
| roundUnits = ${[0, 0, 1, 2, 2]} | |
| factor = 1024 | |
| threshold = 900 | |
| renderer = Neos.Fusion:Value { | |
| @if.filesize = ${Type.isNumeric(props.filesize)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //events - a super-basic Javascript (publish subscribe) pattern | |
| //There are also a lot of more library with complex features, search for key word "Javascript Event Library" | |
| var events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, |
NewerOlder