Skip to content

Instantly share code, notes, and snippets.

@Kelwing
Kelwing / k8sdo.md
Last active June 11, 2021 05:30
Deploying Kubernetes 1.11 on DigitalOcean with Rancher 2.0

Deploying Kubernetes 1.11 on DigitalOcean with Rancher 2.0

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.

Set up helm

  • kubectl apply -f helm-rbac.yaml
  • helm init --service-account tiller

helm-rbac.yaml:

@andrewfluck
andrewfluck / babel.config.js
Last active August 28, 2018 20:14
My *almost* perfect Webpack config
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',
@Arno0x
Arno0x / appinitdllinjection.c
Last active October 12, 2023 23:19
AppInit_DLLs injection
// 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
//
@slavafomin
slavafomin / nodejs-custom-es6-errors.md
Last active November 14, 2024 11:23
Custom ES6 errors in Node.js

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.

Defining our own base class for errors

errors/AppError.js