Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
I may be slow to respond.

taryn phrohdoh

🤔
I may be slow to respond.
View GitHub Profile
@phrohdoh
phrohdoh / snippets.clj
Last active May 26, 2021
assorted clojure snippets
View snippets.clj
;; -----------------------------------------------------------------------------
(require '[clojure.spec.alpha :as spec]
#_'[clojure.string :as str]
#_'[clojure.edn :as edn]
#_'[clojure.java.io :as io]
;; non-stdlib deps
'[clojure.spec.gen.alpha :as spec-gen] ;; org.clojure/test.check 1.1.0
'[clojure.data.json :as json] ;; org.clojure/data.json 2.3.1
#_'[datascript.core :as ds] ;; datascript 1.1.0
#_'[datascript.transit :as dsts]) ;; datascript-transit 0.3.0
@phrohdoh
phrohdoh / CSharpClass.cs
Created Oct 15, 2014
IronPython scripting for C#
View CSharpClass.cs
using System;
namespace CSharpLib
{
public class CSharpClass
{
public int Add(int a, int b)
{
return a + b;
}
@phrohdoh
phrohdoh / _.md
Last active Aug 4, 2020
AutoPets Whisker mobile app snippets
View _.md

fake activities for lib/litter/status/litter_status_tab.dart's _buildRecentActivitySection

    final fakeActivities = List<LitterRobotActivity>.from(
      LitterRobotUnitStatus.values.map(
        (unitStatus) => LitterRobotActivity(
          litterRobotId: 'x',
          unitStatus: unitStatus,
          timestamp: DateTime.now()
              .subtract(Duration(seconds: Random().nextInt(60 * 60 * 8))),
@phrohdoh
phrohdoh / slp.txt
Created Jul 13, 2016
Age of Empires 1997 SLP format
View slp.txt
What follows is a description of the SLP format.
The actual author wishes to remain unknown, please email bryce@lanset.com with
your questions. However, I did not write this document.
Header
This structure totals 32 bytes and is packed to 1-byte boundaries.
typedef struct Shape_File_Header
{
View nvimrc.vim
" vim-plug {{{
call plug#begin('~/.nvim/plugged')
Plug 'git@github.com:kien/ctrlp.vim.git'
Plug 'git@github.com:scrooloose/syntastic.git'
Plug 'git@github.com:itchyny/vim-cursorword.git'
Plug 'git@github.com:itchyny/lightline.vim.git'
Plug 'git@github.com:vim-scripts/Align.git'
Plug 'git@github.com:terryma/vim-multiple-cursors.git'
Plug 'git@github.com:mhinz/vim-startify.git'
@phrohdoh
phrohdoh / ynab-cli.py
Created Apr 30, 2019
A highly-specific Python 3 script operating on YNAB API JSON
View ynab-cli.py
#!/usr/bin/env python3
####
#
# Invoke like this:
#
# $ ./ynab.py ./data.json
#
# -or-
#
@phrohdoh
phrohdoh / ynab_v1.openapi_v3.yaml
Created Apr 30, 2019
YNAB API v1 OpenAPI v3 YAML
View ynab_v1.openapi_v3.yaml
openapi: 3.0.0
info:
description: Our API uses a REST based design, leverages the JSON data format, and relies
upon HTTPS for transport. We respond with meaningful HTTP response codes and
if an error occurs, we include error details in the response body. API
Documentation is at https://api.youneedabudget.com
version: 1.0.0
title: YNAB API Endpoints
tags:
- name: User
@phrohdoh
phrohdoh / ynab.openapi.yaml
Last active Apr 30, 2019
YNAB API v1 OpenAPIv2 YAML
View ynab.openapi.yaml
swagger: '2.0'
info:
description: 'Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com'
version: 1.0.0
title: YNAB API Endpoints
schemes:
- https
host: api.youneedabudget.com
basePath: /v1
tags:
@phrohdoh
phrohdoh / interceptor.bash
Last active Apr 8, 2019
Intercept process I/O via `tee` and write to customizable log file locations
View interceptor.bash
#!/usr/bin/env bash
##### What / Why / How #####
#
# - What
#
# This script makes it simple to intercept, typically for viewing by a human,
# the stdin and stdout of a process, such as a language server binary.
#
#
View _introduction.md

The Game of 35

This "game" aims to give you and/or your team(s) a general sense of what should be done next.

It can be used for many parts of life! Examples:

  • Which bugs/features should a software team work on?
  • Which chores around the house should I do?