Skip to content

Instantly share code, notes, and snippets.

@justforuse
justforuse / .gitignore
Created July 7, 2020 04:07 — forked from markbrouch/.gitignore
.gitignore file for front-end projects
# Created by https://www.gitignore.io/api/node,bower,osx,linux,windows,dropbox,sass,less,grunt,sublimetext,code
### Node ###
# Logs
logs
*.log
npm-debug.log*
# Runtime data
@justforuse
justforuse / eventemitter.js
Created May 4, 2020 13:56 — forked from mudge/eventemitter.js
A very simple EventEmitter in pure JavaScript (suitable for both node.js and browsers).
/* Polyfill indexOf. */
var indexOf;
if (typeof Array.prototype.indexOf === 'function') {
indexOf = function (haystack, needle) {
return haystack.indexOf(needle);
};
} else {
indexOf = function (haystack, needle) {
var i = 0, length = haystack.length, idx = -1, found = false;
@justforuse
justforuse / generate-certificates.sh
Created August 1, 2019 14:37
Generate self-signed ssl certificates.
#!/bin/bash
# set values for certificate DNs
# note: CN is set to different values in the sections below
ORG="000_Test_Certificates"
# set values that the commands will share
VALID_DAYS=360
CA_KEY=ca.key
CA_CERT=ca.crt