Skip to content

Instantly share code, notes, and snippets.

@nolanlawson
nolanlawson / es6modules.md
Last active September 1, 2016 00:00
The case for Rollup and ES modules in frontend code

The case for Rollup and ES modules in frontend code

TLDR: Rollup and ES modules give us:

  • smaller bundles due to tree-shaking and scope-hoisting, and
  • faster runtime perf than CommonJS, by avoiding runtime module resolution

Sources to back up these wild claims:

@kennwhite
kennwhite / Launch_Alpine_Linux_3.3.x_on_AWS.md
Last active December 15, 2017 14:57
Launch Alpine Linux 3.3.x on Amazon Web Services
@ekyo
ekyo / PoE Notes.md
Last active February 16, 2023 21:22

PoE - Simple stuff to know

Bandits

Difficulty Kraityn Alira Oak Kill All
Normal +10% to all elemental resistances +60 base Mana +40 base Life 1 passive skill point
Cruel +8% Attack Speed +5% Cast Speed +16% Physical Damage 1 passive skill point
Merciless +1 Max Frenzy Charge +1 Max Power Charge +1 Max Endurance Charge 1 passive skill point

Vendor Recipes

@rantav
rantav / cloudwatch-event-to-slack-lambda.md
Last active January 14, 2021 03:18
CloudWatch Events to Slack

Sends Cloudwatch Event notifications to Slack

What is this?

AWS have released a new featue called CloudWatch Events, which lets you configure events fired by cloudwatch and direct them to SNS, Lambda functions, etc. Here's the blog post

Motivational image:

Here's the motivational image:

Slack image

@chbrown
chbrown / _upgrade-pg9.4-to-pg9.5.md
Last active October 7, 2021 13:57
Upgrade PostgreSQL 9.4 to 9.5 on Mac OS X with Homebrew

First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml lower down in this gist):

cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Most importantly, note the -D /usr/local/var/postgres argument.

Second, shut down your current PostgreSQL.

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@pmp
pmp / envelope_encryption_kms_boto_pycrypto.md
Last active November 17, 2021 16:35
Envelope Encryption using AWS KMS, Python Boto, and PyCrypto.

If you use Amazon AWS for nearly anything, then you are probably familiar with KMS, the Amazon Key Management Service.

KMS is a service which allows API-level access to cryptographic primitives without the expense and complexity of a full-fledged HSM or CloudHSM implementation. There are trade-offs in that the key material does reside on servers rather than tamper-proof devices, but these risks should be acceptable to a wide range of customers based on the care Amazon has put into the product. You should perform your own diligence on whether KMS is appropriate for your environment. If the security profile is not adequate, you should consider a stronger product such as CloudHSM or managing your own HSM solutions.

The goal here is to provide some introductory code on how to perform envelope encrypt a message using the AWS KMS API.

KMS allows you to encrypt messages of up to 4kb in size directly using the encrypt()/decrypt() API. To exceed these limitations, you must use a technique called "envelope encryptio

@heri16
heri16 / bgpd.conf
Last active April 4, 2025 10:10
AWS VPC VPN StrongSwan Virtual Tunnel Interface (VTI)
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu)
hostname <Local OS hostname>
password <Any random phrase>
enable password <Any random phrase>
!
log file /var/log/quagga/bgpd
!debug bgp events
!debug bgp zebra
debug bgp updates

vm-stack-osx

Where at each layer dependencies can be managed using nix

 OS X                        Operating system
--------------------------
 xhyve hypervisor            Virtual Machine runs Linux kernel
--------------------------
 Alpine Linux                Host system for containers, uses Nix to provision
--------------------------
@lusis
lusis / gateway-copier.sh
Created October 18, 2015 06:49
rundeck executor and copy scripts to access nodes behind nat in VPC
#!/bin/bash
# This script requires the following settings
# node attributes:
# file-copier: script-copy
# destdir: /tmp
# project properties:
# plugin.script-copy.default.command=/data/rundeck_scripts/gateway-copier.sh ${node.ssh-keypath} ${node.jumpNode_user} ${node.jumpNode} ${node.username} ${node.hostname} ${file-copy.destination} ${file-copy.file}
# plugin.script-copy.default.remote-filepath=${node.destdir}/${file-copy.filename}
KEYPATH=$1
shift
@lusis
lusis / README.md
Last active September 14, 2020 17:47
terraform template to generate serverspec properties

This uses terraform's template_file resource to generate a yaml properties file for serverspec to use.

  • create the Rakefile in your terraform project root
  • create a spec directory and put spec_helper.rb in it
  • create the templates/properties.tmpl.yml file
  • create the serverspec.tf
  • terraform apply

tests

Tests will be matched based on roles defined for a given node.