(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| !function() { | |
| var doc = document, | |
| htm = doc.documentElement, | |
| lct = null, // last click target | |
| nearest = function(elm, tag) { | |
| while (elm && elm.nodeName != tag) { | |
| elm = elm.parentNode; | |
| } | |
| return elm; | |
| }; |
| <template | |
| data-rocket-ds-password-strength | |
| data-props-password="string|="> | |
| <script data-static> | |
| const requirements = [ | |
| { label: '8+ characters', check: (pwd) => pwd.length >= 8 }, | |
| { label: '12+ characters', check: (pwd) => pwd.length >= 12 }, | |
| { label: 'Lowercase letter', check: (pwd) => /[a-z]/.test(pwd) }, | |
| { label: 'Uppercase letter', check: (pwd) => /[A-Z]/.test(pwd) }, | |
| { label: 'Number', check: (pwd) => /\d/.test(pwd) }, |
| // Set up HTML hooks without id or extra classes | |
| <button data-action="openLogin">Login</button> | |
| <a href="javascript:;" data-action="openEditor">Link</a> | |
| // Using [data-action=""] selectors instead of class selectors when binding events in JavaScript | |
| var actions = { | |
| openLogin: openLoginWindow, | |
| openEditor: function() { ... } | |
| //.... | |
| }; |
| application: you-app-name-here | |
| version: 1 | |
| runtime: python | |
| api_version: 1 | |
| default_expiration: "30d" | |
| handlers: | |
| - url: /(.*\.(appcache|manifest)) | |
| mime_type: text/cache-manifest |
| /** | |
| * @section General Code Styles | |
| */ | |
| code, | |
| kbd, | |
| pre, | |
| samp { | |
| font-family: Menlo, Monaco, "Courier New", monospace; | |
| font-size: 0.875em; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Pick at Random</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <style type="text/css"> | |
| body { |
| public enum Cacheability | |
| { | |
| NoCache, | |
| Private, | |
| Public, | |
| } |
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin <branch-name> |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Pick at Random</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link rel="stylesheet" type="text/css" href="pick-at-random.css"> | |
| </head> |