Skip to content

Instantly share code, notes, and snippets.

View eddiecorrigall's full-sized avatar

Eddie Corrigall eddiecorrigall

View GitHub Profile

React

A web component framework to generate HTML, that is compiled from a special JavaScript-like syntax.

Definitions

  • Component:
    • a module that is re-usable which renders the HTML content
    • can be a function or a Class
    • props:
  • used to pass data from parent to child components

Happiness

  • What do you enjoy most about the company?
  • What are challenging aspects of this role?
  • Can you describe the company culture?

Organization

  • How does work get planned and organized?
  • Is work project-based or self-driven?
  • Tell me about priority for the week, month and year
  • How does your team interact with the rest of the comapny?
@eddiecorrigall
eddiecorrigall / aws-secretsmanager-files-restore.bash
Last active January 19, 2023 04:28
AWS Secrets Manager store and restore files with pure bash
#!/bin/bash
set -e
# Example:
# SECRET_ARN='arn:aws:secretsmanager:ca-central-1:123456789012:secret:my-passbolt-secret-files-abc123' \
# ./restore.sh
export DELIMITER=','
@eddiecorrigall
eddiecorrigall / helpers.js
Created July 8, 2022 13:01
Ideas for JavaScript helpers
const range = (end, start) => {
// Return an Array of a sequence of integers from start to end-1.
// Let end be an non-negative integer, which represent the last number in a sequence exclusively.
// Let start be an (optional) integer (zero, negative or positive), which represents the first number in a sequence inclusively.
// Examples:
// range(4) produces [0, 1, 2, 3]
// range(4, -3) produces [-3, -2, -1, 0, 1, 2, 3]
if (end === undefined) return [];
if (end < 0) return [];
return Array(end - (start ?? 0))
@eddiecorrigall
eddiecorrigall / bash-101.md
Last active April 27, 2022 17:14
BASH 101 - An introduction to the command-line

BASH 101

Use a linter for learning bash, here is one highly recommended that is available as a plugin/extension is Sublime-Text and VS Code: Shellcheck

In the meantime, work on some basics through example.

Asking for help... man

Scaling

Tips

  • avoid concurrency
  • avoid cyclic dependencies
  • avoid full table scans
  • KISS (keep it stupid simple)
    • prioritize simplicity over complexity
  • don't be too clever
@eddiecorrigall
eddiecorrigall / run-with-dot-env.sh
Created January 20, 2022 19:11
CLI tool to load dot env (.env) file for a program
#!/bin/bash
set -e
# References:
# - Syntax Rules: https://docs.docker.com/compose/env-file/#syntax-rules
function ltrim() {
# Trim whitespace to the left (leading whitespace)
local text="$1"
@eddiecorrigall
eddiecorrigall / freenas.md
Last active September 19, 2022 18:02
FreeNAS and all that is Glory

FreeNAS

Troubleshooting

Mini SAS Male SFF-8087 to 4 Female SATA cables

I bought 2 cables for a FreeNAS array of 8 hard drives in 2019. I used them with an LSI HBA and a Rosewill case. I had trouble with the hard drive connections when I initially set them up. Occasionally a drive would go offline. I assumed that his was poor contact with the hot swap bays and re-seat the drives until they came online. Recently I discovered the issue: one of the SATA connections on the Mini SAS Male SFF-8087 to 4 Female SATA cables does not reliably connect. From my /var/log/messages I get these errors:

Oct 7 23:52:42 freenas mps0: Controller reported scsi ioc terminated tgt 9 SMID 2103 loginfo 31120303

@eddiecorrigall
eddiecorrigall / devcontainer-bashrc.md
Last active August 9, 2021 19:14
Custom Devcontainer Command-Prompt

Devcontainer: Custom Shell

Does your fresh devcontainer terminal feels sluggish when you cd into a /workspaces repository? You are not alone. Turns out that what ever injects the command prompt (possibly the VS Code extension) uses slow code. Want to fix that? Replace it with something else.