- 🎨 when improving the format/structure of the code
- 🚀 when improving performance
- ✏️ when writing docs
- 💡 new idea
- 🚧 work in progress
- ➕ when adding feature
- ➖ when removing feature
- 🔈 when adding logging
- 🔇 when reducing logging
- 🐛 when fixing a bug
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
| { | |
| "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", |
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
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.
If you are using the Circle CI 2.0, take a look at this article from ryansimms
On Project Settings > Environment Variables add this keys:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
The aws user must have the right permissions. This can be hard, maybe, this can help you.
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
| var emulatorDeviceList = [ | |
| { name: 'Amazon Kindle Fire HDX', width: 2560, height: 1600, ratio: 2 }, | |
| { name: 'Apple iPad', width: 1024, height: 768, ratio: 2 }, | |
| { name: 'Apple iPad Mini', width: 1024, height: 768, ratio: 1 }, | |
| { name: 'Apple iPhone 4', width: 320, height: 480, ratio: 2 }, | |
| { name: 'Apple iPhone 5', width: 320, height: 568, ratio: 2 }, | |
| { name: 'Apple iPhone 6', width: 375, height: 667, ratio: 2 }, | |
| { name: 'Apple iPhone 6 Plus', width: 414, height: 736, ratio: 3 }, | |
| { name: 'BlackBerry PlayBook', width: 1024, height: 600, ratio: 1 }, | |
| { name: 'BlackBerry Z30', width: 360, height: 640, ratio: 2 }, |
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
| var devices = [ | |
| { name: 'Desktop - Huge', width: 2880, height: 1800, ratio: 2, type: 'desktop' }, | |
| { name: 'Desktop - Extra Large', width: 1920, height: 1080, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - Large', width: 1440, height: 900, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - HiDPI', width: 1366, height: 768, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - MDPI', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with HiDPI screen', width: 1440, height: 900, ratio: 2, type: 'desktop' }, | |
| { name: 'Laptop with MDPI screen', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with touch', width: 1280, height: 950, ratio: 1, type: 'desktop' }, | |
| { name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1, type: 'tablet' }, |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
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 daggy = require('daggy') | |
| const {compose, curry, map, prop, identity, intersection, union} = require('ramda'); | |
| const inspect = (x) => { if(!x) return x; return x.inspect ? x.inspect() : x; } | |
| // F-algebras | |
| // Fix | |
| // ============ | |
| // Fx is a simple wrapper that does almost nothing. It's much more useful in typed languages to check that we have a recursive f (Fix f) |
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
| // Default Path | |
| var defaultPath = 'home' | |
| // Set Default State | |
| history.pushState(null, null, '#/' + defaultPath); | |
| // Custom UI Routing | |
| function uiRouter(){ | |
| // Create URL Path Array |
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 fs = require('fs') | |
| const path = require('path') | |
| const { promisify } = require('util') | |
| const express = require('express') | |
| const elmStaticHtml = require('elm-static-html-lib').default | |
| const readFile = promisify(fs.readFile) | |
| const app = express(); | |
| const pathToClient = path.resolve(__dirname, '../client/src') |