Skip to content

Instantly share code, notes, and snippets.

View lbjay's full-sized avatar

Jay Luker lbjay

View GitHub Profile

Orphaned cluster configs

  1. Compare list of existing stacks with cluster config files in s3:
  2. make a note of orphans
@lbjay
lbjay / index.js
Created May 30, 2019 19:41
honk!
const car = {
honked: 0,
honk() {
console.log('beep!');
this.honked += 1;
},
};
console.log(car.honked);
car.honk();
const findInstance = (instances, name) => {
const found = instances.find((inst) => {
return inst.Tags.some((tag) => {
return tag.Key === `opsworks:layer:${name}`;
});
});
console.log(found);
return found;
};
@lbjay
lbjay / .bash_aliases
Created July 11, 2019 14:00
oc ssh andele andele
function oc-ips {
aws_profile=${1:-test}
cluster_name=$(sed -n 's/cluster=cluster_config-\([^\.]\+\)\.json/\1/p' .ocopsworks.rc)
aws --profile $aws_profile ec2 describe-instances \
--output text \
--filters "Name=tag:opsworks:stack,Values=$cluster_name" \
--query "Reservations[].Instances[].[Tags[?Key=='opsworks:instance']|[0].Value,PublicIpAddress]" \
> .oc-ips
@lbjay
lbjay / todoist.desktop
Created April 20, 2020 12:50
browser app for i3wm example
[Desktop Entry]
Version=1.0
Name=Todoist
Exec=firefox --class Todoist -P Todoist --no-remote https://todoist.com/app/#start
Terminal=false
Type=Application
Icon=~/.local/share/icons/hicolor/32x32/apps/todoist.svg
@lbjay
lbjay / gist:c39e8154622ec7223013a4a7f968fa2a
Created December 7, 2021 19:49
owlbear rodeo js console
asm.js type error: Asm.js optimizer disabled because no suitable wasm compiler is available 4.7c990e0b.chunk.js
WEBGL_debug_renderer_info is deprecated in Firefox and will be removed. Please use RENDERER. thinEngine.ts:821:41
Babylon.js v4.2.0 - WebGL2 instrument.ts:129:35
TypeError: a is undefined
lc token.ts:205
vc Token.tsx:451
hr react-reconciler.production.min.js:74
bo react-reconciler.production.min.js:181
ta react-reconciler.production.min.js:167
Zo react-reconciler.production.min.js:167
@lbjay
lbjay / Player Handout.md
Last active June 15, 2023 14:26
Player Handout.md