Skip to content

Instantly share code, notes, and snippets.

@pierreis
pierreis / template.yaml
Last active September 9, 2023 20:37
AWS SAM Deploy Template
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Test API
Parameters:
Stage:
Type: String
AllowedValues:
- dev
- sat
@pierreis
pierreis / keybase.md
Created November 24, 2018 19:23
keybase.md

Keybase proof

I hereby claim:

  • I am pierreis on github.
  • I am pierreis (https://keybase.io/pierreis) on keybase.
  • I have a public key whose fingerprint is C896 7119 354F 3B20 825B 707D BDB7 78A7 D389 1AA2

To claim this, I am signing this object:

@pierreis
pierreis / emitter.js
Created May 4, 2013 13:45
Javascript minimalist EventEmitter.
/**
* `Emitter` constructor.
*/
var Emitter = module.exports = function Emitter() {
this.callbacks = {};
};
/**
@pierreis
pierreis / hash.js
Last active September 24, 2018 21:09
How to generate and check strong binary hashes for passwords with Node.JS
/*!
* Password hashing
*
* In essence, passwords are hashed with a global salt (the same for every password), which is
* to remain secret, and a local salt (only specific to one password). If you don't provide
* local salt to `hashPassword`, it will generate one for you.
* The result is a 48-byte long buffer which includes your hashed password along with the local
* salt in clear, that you can store in your DB. You may call buffer.toString('hex') in case
* you want to store it as hex and waste space.
*