Folder Structure
Motivations
- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
const callerMap = {}; | |
function getCaller(error) { | |
if (error && error.stack) { | |
const lines = error.stack.split('\n'); | |
if (lines.length > 2) { | |
let match = lines[2].match(/at ([a-zA-Z\-_$.]+) (.*)/); | |
if (match) { | |
return { | |
name: match[1].replace(/^Proxy\./, ''), |
#!/bin/bash | |
#puck.sh | |
# A DNS propagation checker. Fetches in many DNS servers around | |
# the world for IPs assigned to a given domain. | |
# | |
# Author: José Lopes de Oliveira Júnior <http://joselop.es> | |
# | |
# |
const unary = (fn) => | |
fn.length === 1 | |
? fn | |
: function (something) { | |
return fn.call(this, something) | |
} | |
['1', '2', '3'].map(unary(parseInt)) | |
//=> [1, 2, 3] |
#!/usr/bin/python3 | |
#swaSearch.py | |
#Southwest Air Fare Searcher | |
# | |
# | |
#Default Aiports: | |
departureAirportCode = "LAX" | |
arrivalAirportCode = "SJC" | |
#departureDate= |
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' |