Skip to content

Instantly share code, notes, and snippets.

View euclideansphere's full-sized avatar

Austin Hartline euclideansphere

View GitHub Profile
@euclideansphere
euclideansphere / fuckzoom
Created June 3, 2021 16:37
osx + literally any software = just kind of works?
#!/bin/bash
sudo launchctl stop com.apple.audio.coreaudiod && sudo launchctl start com.apple.audio.coreaudiod
@euclideansphere
euclideansphere / github-runner-install.sh
Last active March 12, 2021 19:49
github runner install
#!/usr/bin/env bash
# first this - https://github.com/GenoPalate/GenoPalateWeb/settings/actions/add-new-runner?arch=x64&os=linux
sudo ./svc.sh install
sudo ./svc.sh start
sudo yum install -y git rsync jq postgresql docker
sudo amazon-linux-extras install docker
# yarn also should be installed on the machine, but setup-node makes a coinflip decision to install yarn so you gotta install it in the runner task probably
@euclideansphere
euclideansphere / vbox-set-vm-bounds.sh
Created January 21, 2021 15:35
set vm machine limits
docker-machine stop
VBoxManage modifyvm default --cpus 2
VBoxManage modifyvm default --memory 4096
docker-machine start

proposed development workflow for a team of 4-8 people

State

branches

master

  • represents last production deploy + any changes currently being deployed within production vpc
  • tag represents last deployed version, format v${major}.${minor}.${patch} (format is arbitrary, semver not required. will be determined by the deployment process).

Keybase proof

I hereby claim:

  • I am euclideansphere on github.
  • I am austinhartline (https://keybase.io/austinhartline) on keybase.
  • I have a public key whose fingerprint is 84FF E754 BFF1 0BB3 2933 5FA7 F163 2BA1 4510 7FAC

To claim this, I am signing this object:

# this works in Ruby 2.3 / Rails 4.2. Untested in other versions.
# ActiveRecord::Calculations.pluck implementation is essentially this with additional
# relation / scoping helpers (for chaining & type saftey) and caching logic.
def pluck(relation, *column_names)
relation.select_values = column_names
ActiveRecord::Base.connection.select_all(relation.arel).cast_values
end