Skip to content

Instantly share code, notes, and snippets.

View jeremyckahn's full-sized avatar

Jeremy Kahn jeremyckahn

View GitHub Profile
{
"completedAchievements": {
"plant-crop": true,
"water-crop": true,
"harvest-crop": true,
"unlock-crop-price-guide": true,
"i-am-rich-1": true
},
"cowBreedingPen": {
"cowId1": null,
@jeremyckahn
jeremyckahn / trigger-release.yml
Created March 25, 2021 13:06
Draft of a GitHub Action for Farmhand
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
on:
workflow_dispatch:
inputs:
releaseType:
description: 'Release type'
required: true
default: 'patch'
jobs:

User Story/Task

Description

A high-level explanation of the singular feature that is needed.

Background

Any context that might help an uninitiated person understand why this feature is needed.

#!/usr/bin/env node
/* eslint-disable no-console */
const regularFunction = () => {
const a = Math.random()
const b = Math.random()
const c = Math.random()
return a + b + c
}
@jeremyckahn
jeremyckahn / read-stdin-to-variable.sh
Last active December 14, 2020 02:39
Demo of reading stdin to a BASH script variable
#!/bin/bash
# Usage:
# echo 'hello!' | ./read-stdin-to-variable.sh
# https://stackoverflow.com/a/15269128
STD_IN=$(</dev/stdin)
echo "Echoing stdin:"
" .config/nvim/init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
@jeremyckahn
jeremyckahn / run-in-docker.sh
Created March 30, 2020 16:45
Run a shell script in a Docker environment
docker run \
# Set the current host working directory as the container's /tmp so the container can access it
-v $(pwd):/tmp \
# Mount your home directory as the Docker root user's home directory to inherit any host dotfiles
-v $HOME:/root \
# (Effectively) set the host's working directory as the container's working directory
-w /tmp \
@jeremyckahn
jeremyckahn / Gemfile
Created February 10, 2020 03:26
An old bit of code I found on my computer
source "http://rubygems.org"
gem "itunes-library"
@jeremyckahn
jeremyckahn / system-design-interview-prep-resources.md
Last active September 1, 2024 03:34
System Design Interview Prep Resources
@jeremyckahn
jeremyckahn / hash-table.js
Last active January 21, 2020 17:32
A bucketed hash table implementation with pure JavaScript and arrays
class BucketNode {
_previous = null;
_next = null;
constructor (key, value) {
this.key = key;
this.value = value;
}
}