Edit: Shoutout to kdeldycke/awesome-falsehood.
- Never assume what's in the database is sane
Edit: Shoutout to kdeldycke/awesome-falsehood.
Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
| function MyResponsiveComponent() { | |
| const width = useWindowWidth(); // Our custom Hook | |
| return ( | |
| <p>Window width is {width}</p> | |
| ); | |
| } |
If you work with sensitive (human) data (e.g. anything that contains an identifier of an individual), you occasionally want to share that data. The most straightforward way to do so is to send them by email (and yes - we are all guilty of that!). The problem arises, if the data get into wrong hands. Let's say you send the email accidentally to the wrong person. Or worse, without your knowledge, the email gets into the wrong hands.
The good news is, that there is a secure & handy solution for this. But let's first have a look at some other solutions.
Zach Caceres
Javascript does not have the typical 'private' and 'public' specifiers of more traditional object oriented languages like C# or Java. However, you can achieve the same effect through the clever application of Javascript's function-level scoping. The Revealing Module pattern is a design pattern for Javascript applications that elegantly solves this problem.
The central principle of the Revealing Module pattern is that all functionality and variables should be hidden unless deliberately exposed.
Let's imagine we have a music application where a musicPlayer.js file handles much of our user's experience. We need to access some methods, but shouldn't be able to mess with other methods or variables.
| { | |
| "name": "project-name", | |
| "description": "Template for static sites", | |
| "version": "1.0.0", | |
| "homepage": "http://www.project-name.com", | |
| "author": { | |
| "name": "Adam Reis", | |
| "url": "http://adam.reis.nz" | |
| }, | |
| "license": "UNLICENSED", |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals | |
| import uuid | |
| from django.db import migrations, models | |
| def fill_mymodel_uuid(apps, schema_editor): | |
| db_alias = schema_editor.connection.alias | |
| MyModel = apps.get_model('myapp', 'MyModel') |
| /** | |
| * @param {object} scope - Object that all bound data will be attached to. | |
| */ | |
| function twoWayBind(scope) { | |
| // a list of all bindings used in the DOM | |
| // @example | |
| // { 'person.name': [<input type="text" data-bind="person.name"/>] } | |
| var bindings = {}; | |
| // each bindings old value to be compared for changes |
This is a quick tutorial explaining how to get a static website hosted on Heroku.
Why do this?
Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.