Skip to content

Instantly share code, notes, and snippets.

View ughitsaaron's full-sized avatar
🙈

Aaron Petcoff ughitsaaron

🙈
View GitHub Profile
@ughitsaaron
ughitsaaron / eng-mgmt-unionism.md
Created June 18, 2022 20:05
Engineering and software management and unionism
@ughitsaaron
ughitsaaron / timer.sh
Created June 19, 2020 15:31
timer.sh
#!/bin/zsh
# For Mac only. Will play a Glass "ding" until the process is terminated manually
# after a given amount of time, e.g.,
# $ timer 5m
# $ timer 30s
# $ timer 1h
# Source this file in you .zsh_profile or .zshrc
# Requires https://github.com/trehn/termdown
# pip install termdown
timer() {
@ughitsaaron
ughitsaaron / validationSchema.js
Last active March 20, 2020 15:26
Is this a desirable API for a schema validation library?
// default schema factory
import schema from './lib';
// each property type is exported separately with named validation helpers
import string, { max, min, matches, required } from './lib/string';
import number from './lib/number';
import shape from './lib/shape';
import array, { every } from './lib/array';
const validationSchema =
schema('schemaName',
@ughitsaaron
ughitsaaron / index.js
Last active April 15, 2020 16:39
Functional utilities with generators
function range(start = 0, end, step = 1) {
function* rangeIter(start, end, step) {
if (start <= end) {
yield start;
let next = typeof step === 'function' ? step(start) : start + step;
yield* rangeIter(next, end, step);
}
}
@ughitsaaron
ughitsaaron / Dockerfile
Last active August 3, 2019 20:29
rust/arm7
FROM ubuntu:latest
SHELL ["/bin/bash", "-c"]
# Install arm build dependencies
RUN apt-get update && apt-get install -y \
sudo \
curl \
git \
build-essential \
gcc-arm-linux-gnueabihf && \
@ughitsaaron
ughitsaaron / steering_proposal_process.md
Last active May 21, 2019 14:39
TWC(NYC) Steering Proposal Process

TWC(NYC) Steering Proposal Process

This is an outline for the process to approve the proposal to form an elected steering committee for TWC(NYC).

Guiding principles

This process is intended to be simple and inclusive. It is based on the assumption that everyone participating has the common motivation to build an effective and democratic movement. This process is meant to draw in as broad participation as possible by having very few restrictions and minimizing confusion through simplicity.

Voting

Voting will take place over the web (e.g., a Google form, SurveyMonkey, Riseup) and be open for a period of 48 hours.

Those who've been to at least one TWC meeting before the voting period begins will be eligible to vote. Those who vote in this process will be taken on the "honor system" that they've met this requirement.

@ughitsaaron
ughitsaaron / modules-and-functions-4-and-5.exs
Last active December 22, 2018 23:31
Programming Elixir Exercises
defmodule Mod do
def sum(0), do: 0
def sum(n), do: n + sum(n - 1)
def gcd(x, 0), do: x
def gcd(x, y), do: gcd(y, rem(x, y))
end
@ughitsaaron
ughitsaaron / recursive-list-functions.js
Last active March 21, 2017 20:15
Common functions for lists using recursion…I did this for "funn" dot javascript
/**
* Just a collection of common list functions written recursively.
* https://jsbin.com/zupafusuco/1/edit?js,console
*/
/**
* callback function for iterating over a list
*
* @callback listCallback
* @param {any} value
@ughitsaaron
ughitsaaron / log
Last active February 21, 2017 19:49
Console output
"followed by Darius Kazemi tinysubversions
{ Item: { username: { S: 'tinysubversions' } } }"
this person already subscribes!
"followed by Darius Kazemi tinysubversions
{ Item: { username: { S: 'tinysubversions' } } }"
Express listening on 8081...
setting up stg/prd server
error in file write! null
error in file write! null
error in file write! null
env:
node: true
browser: true
mocha: true
parserOptions:
sourceType: module
ecmaVersion: 6
extends: eslint:recommended
rules:
brace-style: error