Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.
I've tried to make it as lean and unobtrusive as possible.
errors/AppError.js
// Compile with: cl.exe appinitdllinjection.c /LD /o appinitdllinjection.dll | |
// | |
// This DLL can only be injected in a x64 process | |
// | |
// Set the registry to automatically load this DLL into 'any' process that is started (at least the ones relying on User32.dll) | |
// by using the AppInit_DLLs capability: | |
// | |
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs = 'path_to_the_dll' (comma or space separated if required) | |
// One trick with this registry entry is to separate DLLs with an hex '00' (by editing the value in binary) to hide the DLL name | |
// |
module.exports = { | |
presets: [ | |
'@babel/react', | |
], | |
plugins: [ | |
'@babel/proposal-class-properties', | |
[ '@babel/proposal-decorators', { legacy: true }], | |
'@babel/proposal-do-expressions', | |
'@babel/proposal-export-default-from', | |
'@babel/proposal-export-namespace-from', |
This guide will help you add support for DigitalOcean volumes and load balancers to a freshly deployed Kubernetes 1.11 cluster. It assumes you already have a cluster deployed through Rancher, have kubectl set up, and helm installed.
kubectl apply -f helm-rbac.yaml
helm init --service-account tiller
helm-rbac.yaml: