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
Interesting comment strategies | |
<!-- | |
========================= | |
First Section or section name | |
========================= | |
--> | |
html elements: |
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
// Pure Functions | |
// Programming without side-effects | |
Remove: | |
1. Assignments | |
2. Loops (use recursion instead) | |
3. Freeze all array literals and object literals (remove Date and Math.random) | |
// MONAD |
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
resource: http://amsul.ca/pickadate.js/date/ | |
source files: https://github.com/amsul/pickadate.js/tree/master/lib | |
react specific: | |
https://github.com/airbnb/react-dates // chosen | |
https://www.codementor.io/chrisharrington/tutorials/build-date-picker-react-js-classes-du107v566 | |
https://github.com/Hacker0x01/react-datepicker | |
https://github.com/zippyui/react-date-picker | |
other examples: |
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
1. Build app with dummy data | |
2. replace dummy data with ajax | |
3. write middleware to help fetch data |
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
source links: | |
https://egghead.io/courses/introduction-to-reactive-programming | |
https://github.com/Reactive-Extensions/RxJS/blob/master/doc/gettingstarted/events.md | |
https://www.youtube.com/watch?v=vMD5lFt6P80 |
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
// simple bar chart | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Make a simple line chart</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
</head> | |
<style type="text/css"> | |
rect:hover { | |
fill: yellow; |
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
//Resources | |
// https://css-tricks.com/productive-in-react/ -which unfortunately uses the deprecated getDOMNode in its examples. Simply swap out for findDOMNode and start animating. | |
// https://css-tricks.com/comparison-animation-technologies/ | |
// https://medium.com/@cheapsteak/animations-with-reacttransitiongroup-4972ad7da286#.lghp7hj3f | |
// https://medium.com/@chenglou/react-motion-and-animated-4b3edf671cba#.h9ex9o8fy | |
// How to use SVGS | |
1. for animated background svgs (when we don't need react to render): | |
Use SVG directly inline in the html, for loops |
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
1. create a new user specifically for Apex | |
- go to IAM management | |
- create a new user called "apex-deploy" | |
- click on "generate an access key" | |
- get "user security credit" - access key ID, secret access key by downloading them | |
- click on the user and go to permissions | |
//get lambda policy | |
- click on "Attach Policy" and search for "lambda" | |
- select "AWSLambdaFullAccess" //bad practice | |
// get IAM policy |
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
// I'm trying to merge the methods of two objects into one such that an array of methods results for each property in the parent object: | |
//obj1 = {"prop1":"method1","prop2":"method2"} | |
//obj2 = {"prop1":"method3","prop2":"method4"} | |
//Desired output: | |
//obj1 = {"prop1":["method1","method3"],"prop2":["method2","method4"]} | |
var merge = function(/*...objs*/) { | |
return [].reduce.call(arguments, function(acc, x) { |
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
// Animating with CSS, refresher | |
// Keyframes | |
@keyframes animation-name-you-pick { | |
0% { | |
background: blue; | |
transform: translateX(0); | |
} | |
50% { |