Skip to content

Instantly share code, notes, and snippets.

Avatar

genovo Genovo

  • Genovo LLC
View GitHub Profile
View folder-structure.md

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)
@Genovo
Genovo / proxyTrack.js
Created Dec 19, 2019 — forked from mrharel/proxyTrack.js
Using Proxy to Track Javascript Class
View proxyTrack.js
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\./, ''),
@Genovo
Genovo / puck.sh
Created May 28, 2019 — forked from lopes/puck.sh
A DNS propagation checker in Shell Script.
View puck.sh
#!/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>
#
#
@Genovo
Genovo / unary.js
Last active Feb 25, 2018
“Unary” is a function decorator that modifies the number of arguments a function takes: Unary takes any function and turns it into a function taking exactly one argument.
View unary.js
const unary = (fn) =>
fn.length === 1
? fn
: function (something) {
return fn.call(this, something)
}
['1', '2', '3'].map(unary(parseInt))
//=> [1, 2, 3]
@Genovo
Genovo / swa11-6.py3
Created Oct 22, 2017
Shortcut for SWA Fare Lookup-hardcoded Airports
View swa11-6.py3
#!/usr/bin/python3
#swaSearch.py
#Southwest Air Fare Searcher
#
#
#Default Aiports:
departureAirportCode = "LAX"
arrivalAirportCode = "SJC"
#departureDate=
@Genovo
Genovo / strictMode.sh
Created Sep 13, 2017
Bash "Strict Mode"
View strictMode.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'