$ 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.
// we can determine whether a given | |
// function based implementation of a "class" has "writable" attribute set to true. | |
// ES6 class based implementation has "writable" attribute set to false. | |
// | |
// Given any object: it does not matter if it was made from a function or a class, | |
// there always is the constructor and based on this we get to the same results | |
// like testing on the function/class itself. | |
// | |
// So simply give the isClassBasedFunction any instance or function/class and | |
// it will tell you if it was made from a ES6 class or not. |
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 | |
*/ | |
/** | |
* Error Handler dummy | |
* used to provide a higher order function which allows exception fail safe calling | |
* and provides some error handling along with. | |
* | |
* @author Dennis Sterzenbach <dennis.sterzenbach@gmail.com> | |
*/ | |
function ErrorHandler(errorHandlerFunctions) { | |
this.handlers = []; |
[data-translate]::after { | |
content: attr(data-key-num) " "; | |
display: block; | |
position: absolute; | |
right: 0; | |
top: -8px; | |
font-size: 15px; | |
font-family: verdana; | |
background: #aaa; | |
color: #000; |