Skip to content

Instantly share code, notes, and snippets.

@dillonstreator
dillonstreator / go-concurrent-job-processing.go
Last active October 7, 2021 14:16
concurrently process items with a bounded channel with storing job results, graceful shutdown, pickup where left off, and capturing of all errors
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"math/rand"
"os"
@dillonstreator
dillonstreator / port-to-pid.md
Last active October 7, 2021 01:01
find PID running on a port utility shell function

Find PID running on a port

# .zshrc

port-to-pid() {
        lsof -i:$1 -Fp | sed 's/^p//' | head -n 1
}
@dillonstreator
dillonstreator / crumby.js
Last active January 29, 2022 16:10
Javascript generate breadcrumb array from url pathname
const titleizeWord = (str) => `${str[0].toUpperCase()}${str.slice(1)}`;
const kebabToTitle = (str) => str.split("-").map(titleizeWord).join(" ");
const toBreadcrumbs = (pathname, { rootName = "Home", nameTransform = s=>s } = {}) =>
pathname
.split("/")
.filter(Boolean)
.reduce(
(acc, curr, idx, arr) => {
acc.path += `/${curr}`;
@bdashrad
bdashrad / interviewer_questions.md
Last active September 3, 2023 13:28
Interviewer Questions

Questions to ask your interviewer

Management

  • What problem do you solve and why would I give you money to solve it?
  • When’s the last time someone went above and beyond the call of duty at the company/on the team? What did they do?
  • What are the current goals that the company is focused on, and how does this team/role work to support hitting those goals?
  • What are the projects in this company you think are really key to its future and how would a motivated person go about getting on them?
  • What do you see as your largest technical challenge currently?
  • Pain Points beyond headcount
  • What is a project you wish a new member of the team could take on?