$ openssl genrsa -out private.key 4096
openssl req -new -sha256 \
#!/usr/bin/env ruby | |
# | |
# This bit of code lets you define Environment variables in your shell via a YAML file. | |
# It works by composing Bash commands from the parsed data, meant to be executed within | |
# a Bash environment, which will export the variables just as in a regular Bash profile. | |
# This is accomplished by executing this script via the Bash substitution syntax $(...) | |
# which returns the output of evaluating whatever is inside the parenthesis, which in | |
# the case of this script would be appropriate 'export' commands that are run by Bash. | |
# | |
# This version is designed to parse aliases organized under named groups in the YAML |
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
const buffer = require('buffer'); | |
const crypto = require('crypto'); | |
// Demo implementation of using `aes-256-gcm` with node.js's `crypto` lib. | |
const aes256gcm = (key) => { | |
const ALGO = 'aes-256-gcm'; | |
// encrypt returns base64-encoded ciphertext | |
const encrypt = (str) => { | |
// Hint: the `iv` should be unique (but not necessarily random). |
#!/bin/bash | |
hosted_zone_id="<your Route53 hosted zone id>" | |
domain_name="<your domain name>" | |
# Abort script on any errors | |
set -e | |
# Get new IP address | |
ip_address=`curl http://169.254.169.254/latest/meta-data/public-ipv4` |
This is a draft list of what we're thinking about measuring in Etsy's native apps.
Currently we're looking at how to measure these things with Espresso and Kif (or if each metric is even possible to measure in an automated way). We'd like to build internal dashboards and alerts around regressions in these metrics using automated tests. In the future, we'll want to measure most of these things with RUM too.
void function(){ | |
"use strict" | |
/* | |
* Manage and Import / Export snippets from chrome (2016) | |
* hacked together by: http://github.com/soundyogi | |
* inspired by: https://github.com/bgrins/devtools-snippets/blob/master/import-export/chrome/devtools_import_export.js | |
* ALPHA / SILLY SIDE PROJECT | |
*/ | |
function Foo(who) { | |
this.me = who; | |
} | |
Foo.prototype.identify = function() { | |
return "I am " + this.me; | |
}; | |
function Bar(who) { | |
Foo.call(this,"Bar:" + who); |
const applyTemplate = (templateElement, data) => { | |
const element = templateElement.content.cloneNode(true); | |
const treeWalker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, () => NodeFilter.FILTER_ACCEPT); | |
while(treeWalker.nextNode()) { | |
const node = treeWalker.currentNode; | |
for(let bindAttr in node.dataset) { | |
let isBindableAttr = (bindAttr.indexOf('bind_') == 0) ? true : false; | |
if(isBindableAttr) { | |
let dataKey = node.dataset[bindAttr]; |
#!/bin/bash | |
## Install docker on AWS | |
### See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user |