Skip to content

Instantly share code, notes, and snippets.

View jameslaneconkling's full-sized avatar

James Conkling jameslaneconkling

View GitHub Profile
@jameslaneconkling
jameslaneconkling / tech-onboarding.md
Last active October 17, 2022 20:01
Application Team Member Onboarding
  • grant access to platforms
    • Github
      • add to Sayari Org
      • add to appropriate teams
      • github project board walkthrough, Sayari's git-flow-lite processes
    • Google Cloud Platform
      • add to Sayari Datastore
      • GKE walkthrough
    • Sentry
  • ElasticCloud
@jameslaneconkling
jameslaneconkling / subscribableOrPromise.ts
Created March 13, 2020 21:03
implement both the observable and promise spec
import { Subscribable, PartialObserver, Unsubscribable, Observable } from 'rxjs'
const noop = () => {}
// how to make this generic for all observables?
export class SubscribableOrPromise<T> implements PromiseLike<T>, Subscribable<T> {
observableOrPromise: Observable<T> | Promise<T>
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
@jameslaneconkling
jameslaneconkling / tree-recursion.js
Created March 19, 2018 15:22
Tail Recursive Tree Recursion
const reduceChildren = ([first, ...rest], accumulator, project, reducer) => (
rest.length === 0 ?
recurseTree(first, accumulator, project, reducer) :
reduceChildren(
rest,
recurseTree(first, accumulator, project, reducer),
project,
reducer
)
);
@jameslaneconkling
jameslaneconkling / y-combinator.js
Last active March 19, 2018 20:54
An implementation of the Y Combinator in Javascript
const Y = (fn) => (
(_fn) => fn((arg) => (_fn(_fn))(arg))
)(
(__fn) => fn((arg) => (__fn(__fn))(arg))
);
var factorial = (fact) => (n) => n === 0 ? 1 : n * fact(n - 1);
Y(factorial)(7);
//> 5040
@jameslaneconkling
jameslaneconkling / .spacemacs
Last active March 21, 2018 23:28
Spacemacs Config for Clojure(script), Javascript
;; -*- mode: emacs-lisp -*-
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory

Keybase proof

I hereby claim:

  • I am jameslaneconkling on github.
  • I am jamesconkling (https://keybase.io/jamesconkling) on keybase.
  • I have a public key ASCc-FGMMDEh65-d33v94EkI9nc7Ydc_u_D-2YnqbD73_go

To claim this, I am signing this object:

@jameslaneconkling
jameslaneconkling / baby-lisper.js
Last active August 23, 2022 00:32
A silly simple lisp parser in javascript
const rules = [
{ type: 'space', regex: /^\s/ },
{ type: 'lParen', regex: /^\(/ },
{ type: 'rParen', regex: /^\)/ },
{ type: 'number', regex: /^[0-9\.]+/ },
{ type: 'string', regex: /^".*?"/ },
{ type: 'variable', regex: /^[^\s\(\)]+/ } // take from the beginning 1+ characters until you hit a ' ', '(', or ')' // TODO - support escaped double quote
];
@jameslaneconkling
jameslaneconkling / myriahedron.js
Created October 18, 2017 01:55
generate and project a myriahedral grid onto the globe, in the style of Buckminster Fuller's famous Dymaxion map
const {
Readable
} = require('stream');
const {
readFileSync
} = require('fs');
const degrees2Radians = degrees => degrees * (Math.PI / 180);
const radians2Degrees = radians => radians * (180 / Math.PI);
@jameslaneconkling
jameslaneconkling / index.html
Created July 18, 2017 15:44
React-Router@5 Template
<div id="root">
</div>