Skip to content

Instantly share code, notes, and snippets.

@mvanlonden
mvanlonden / glacier_multi_upload.sh
Created November 5, 2023 18:55
Upload multiple directories to AWS Glacier
#!/bin/bash
# Function to upload directory to Glacier
upload_directory_to_glacier() {
local directory_path=$1
local vault_name=$2
local account_id=$3
local compressed_archive_path="/tmp/$(basename "$directory_path").tar.gz"
local archive_description="Backup of $(basename "$directory_path") on $(date +%Y-%m-%d)"
@mvanlonden
mvanlonden / canvas_ucd.md
Created May 10, 2022 19:07
A description of Canvas Medical's UCD process for ONC certification.

Our mechanism for developing user centered designs involves (1) continuous user interviews to understand customer needs, (2) providing a support chat, in every application window, that is constantly being monitored where users can denote any issues to our teams, (3) tracking of all bugs and issues through customer support teams and zendesk tickets that are inputted by users and reviewing by our operations team, (4) acquiring feedback on any scoping documents and designs prior to development to ensure usability of proposed solutions, and (5) enabling users to submit features requests that we review and scope internally to be part of development roadmaps.

labor_factor = .15
insulation_cost = 2 # per surface sqft
surface_area = width * length * 2 + length * height * 2 + height * width * 2
cost = surface_area * insulation_cost * (1 + labor_factor)
labor_factor = .13
window_cost = 1600
sliding_door_cost = 10000
window_spacing = 15 # ft per window
windows = perimeter / window_spacing * stories
sliding_doors_per_story = 2
sliding_doors = stories * sliding_doors_per_story
@mvanlonden
mvanlonden / structural_cost.py
Last active February 3, 2019 22:04
Structural system cost
floor_columns = (width / floor_column_grid_spacing) * \
(length / floor_column_grid_spacing)
columns = floor_columns * stories + \
(width / roof_column_grid_spacing) * (length / roof_column_grid_spacing)
columns_length = columns * ceiling_height
beams = length / joist_spacing * (stories + 1)
beams_length = beams * width
structural_framing_cost = (decking_cost * decking_area + column_cost * columns_length +

Keybase proof

I hereby claim:

  • I am mvanlonden on github.
  • I am mvanlonden (https://keybase.io/mvanlonden) on keybase.
  • I have a public key ASBgC1OymRWNqsU0aOM-24v6zMujo6UCgRdm7ykMDLvAAAo

To claim this, I am signing this object:

function moveModuleIntoBoard(module, board) {
return new Promise((resolve, reject) => {
const mutation = `
{
moveModuleToBoard(input: {
clientMutationId: "${new Date().getTime()}",
boardId: "${board.id}",
moduleId: "${module.id}"
}) {
viewer {
@mvanlonden
mvanlonden / withForm.js
Last active October 3, 2017 04:32
React HOC for form submission
import { isArray, keys, isEmpty, values } from 'lodash'
import { compose, curry, map, mapValues, mergeWith, get, pickBy, set, pick, every } from 'lodash/fp'
import { withState, mapProps } from 'recompose'
const makePredicate = ([test, errorMsg]) => a =>
test(a) ? null : errorMsg
const makePredicates = map(makePredicate)
const runPredicates = ({ input, validations }) =>
@mvanlonden
mvanlonden / prerenderPersistStorage.js
Created August 27, 2017 21:28
Combines prender.cloud and redux-persist to rehydrate your redux state. Use as your redux-persist storage.
import storage from 'redux-persist/es/storage'
const isPrerendering = window.prerenderCloudIsServerSideRendering
export default {
getItem: (key, cb) => {
storage.getItem(key, (err, item) => {
if (err) {
return cb(err)
}
Successfully built c7bc39858b1f
➜ occamz-razor-dev-env OC-31_docker_dev_environment_a_new_hope ✓
➜ occamz-razor-dev-env OC-31_docker_dev_environment_a_new_hope ✓ docker-compose up
Creating occamzrazordevenv_sync_client_1
Creating occamzrazordevenv_sync_api_1
Creating occamzrazordevenv_client_1
Creating occamzrazordevenv_test_api_1
Creating occamzrazordevenv_api_1
Creating occamzrazordevenv_test_client_1
Attaching to occamzrazordevenv_sync_client_1, occamzrazordevenv_sync_api_1, occamzrazordevenv_client_1, occamzrazordevenv_test_api_1, occamzrazordevenv_api_1, occamzrazordevenv_test_client_1