Benefits:
- Reverse routing (with query support)
- Enforcement of utilizing Controllers
- Global middleware per Controller
- Seperate method from middleware for testability
- Probably other things.. but those are the most important.
var LocalStrategy = require('passport-local').Strategy; | |
var crypto = require('crypto'); | |
var bcrypt = require('bcrypt'); | |
var util = require('util'); | |
function BadRequestError (message) { | |
Error.call(this); | |
Error.captureStackTrace(this, arguments.callee); | |
this.name = 'BadRequestError'; | |
this.message = message || null; |
(Vagrant)[https://www.vagrantup.com] "Development Environments Made Easy"
(Qubes-OS)[https://www.qubes-os.org] "A Reasonably Secure Operating System."
This is a guide on to using vagrant on qubes-os with qemu using the libvirt provider. Because qubes-os does not support nested virtualization, you'r stuck with emulation. If you want performance, use a system with a proper vagrant setup.
Template Setup
httpOnly
(and secure
to true
if running over SSL) when setting cookies.csrf
for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrfbodyParser()
and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use the defer
property and pipe()
the multipart upload stream to the intended destination.Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.
The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.
On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:
####### 1. A low-resolution photo of road signs
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
Since this page is apparently the top result on google, Heres a link to how to do it.
https://martingladdish.co.uk/technology/setting-up-docker-under-qubesos/
That page has more detail, but here are the instructions in case its down.