Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy Kahn jeremyckahn

View GitHub Profile
View farmhand-pr-154-breaking-save.json
{
"completedAchievements": {
"plant-crop": true,
"water-crop": true,
"harvest-crop": true,
"purchase-cow-pen": true,
"purchase-all-cow-colors": true
},
"cowBreedingPen": {
"cowId1": null,
View git.diff
This file has been truncated, but you can view the full file.
diff --git a/package-lock.json b/package-lock.json
index 1cbc6ab..47f4072 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6,7 +6,7 @@
"packages": {
"": {
"name": "@jeremyckahn/farmhand",
- "version": "1.7.7",
View farmhand-pr-143-test-data.json
{
"completedAchievements": {
"plant-crop": true,
"water-crop": true,
"harvest-crop": true
},
"cowBreedingPen": {
"cowId1": null,
"cowId2": null,
"daysUntilBirth": -1
View farmhand-i-am-rich-test-achievement-test-data.json
{
"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 Mar 25, 2021
Draft of a GitHub Action for Farmhand
View trigger-release.yml
# 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:
View ticket-templates.md

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.

View benchmark.js
#!/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 Dec 14, 2020
Demo of reading stdin to a BASH script variable
View read-stdin-to-variable.sh
#!/bin/bash
# Usage:
# echo 'hello!' | ./read-stdin-to-variable.sh
# https://stackoverflow.com/a/15269128
STD_IN=$(</dev/stdin)
echo "Echoing stdin:"
View init.vim
" .config/nvim/init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
@jeremyckahn
jeremyckahn / run-in-docker.sh
Created Mar 30, 2020
Run a shell script in a Docker environment
View run-in-docker.sh
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 \