Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| componentDidUpdate(prevProps) { | |
| console.log('Rrow update diff:'); | |
| const now = Object.entries(this.props); | |
| const added = now.filter(([key, val]) => { | |
| if (prevProps[key] === undefined) return true; | |
| if (prevProps[key] !== val) { | |
| console.log(`${key} | |
| - ${JSON.stringify(val)} |
| Possible values for ext-name: | |
| bcmath | |
| bz2 | |
| calendar | |
| ctype | |
| curl | |
| dba | |
| dom | |
| enchant |
| var touchstartX = 0; | |
| var touchstartY = 0; | |
| var touchendX = 0; | |
| var touchendY = 0; | |
| var gesuredZone = document.getElementById('gesuredZone'); | |
| gesuredZone.addEventListener('touchstart', function(event) { | |
| touchstartX = event.changedTouches[0].pageX; | |
| touchstartY = event.changedTouches[0].pageY; |
| var App = (function () { | |
| // Sticky Header | |
| var stickyHeader = function (navElement) { // needs the ID of the element | |
| this.nav = document.getElementById(navElement); | |
| this.siteBody = document.getElementsByTagName("body")[0]; | |
| this.stuck = false; | |
| this.stickPoint = this.getDistance(); | |
| }; |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
| //events - a super-basic Javascript (publish subscribe) pattern | |
| var events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, | |
| off: function(eventName, fn) { | |
| if (this.events[eventName]) { |
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| { | |
| // http://eslint.org/docs/rules/ | |
| "ecmaFeatures": { | |
| "binaryLiterals": false, // enable binary literals | |
| "blockBindings": false, // enable let and const (aka block bindings) | |
| "defaultParams": false, // enable default function parameters | |
| "forOf": false, // enable for-of loops | |
| "generators": false, // enable generators | |
| "objectLiteralComputedProperties": false, // enable computed object literal property names |
| { | |
| "name": "my-app", | |
| "version": "1.0.0", | |
| "description": "My test app", | |
| "main": "src/js/index.js", | |
| "scripts": { | |
| "jshint:dist": "jshint src/js/*.js", | |
| "jshint": "npm run jshint:dist", | |
| "jscs": "jscs src/*.js", | |
| "browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |