Skip to content

Instantly share code, notes, and snippets.

View Nick-Triller's full-sized avatar

Nick Triller Nick-Triller

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nick-triller on github.
  • I am nicktr (https://keybase.io/nicktr) on keybase.
  • I have a public key ASB0up725PeaWQy8vOSPv2C-fdsqqxexDALcJcYd3vTN8Ao

To claim this, I am signing this object:

@Nick-Triller
Nick-Triller / ca.md
Created November 22, 2018 08:21 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

const data = ['Nick', 'Zeeshan', 'Stephan', 'Armin', 'Mikalai', 'Zeeshan', 'Björn']
console.log(hasDuplicates(data))
function hasDuplicates(data) {
const seen = {}
for(elem of data) {
if (seen[elem]) {
return true;
} else {
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@Nick-Triller
Nick-Triller / footer_example.html
Created July 3, 2017 11:48
Website Footer Example
@Nick-Triller
Nick-Triller / example.js
Last active November 19, 2015 17:54
Execute promises sequentially in a loop
'use strict';
function rand(min, max) {
return Math.random() * (max - min) + min;
}
function promiseFactory(id, msg) {
return new Promise((resolve, reject) => {
let timeout = rand(1, 1000);
setTimeout(() => {