Skip to content

Instantly share code, notes, and snippets.

View seantrane's full-sized avatar

Sean Trane Sciarrone seantrane

View GitHub Profile
@seantrane
seantrane / readme.md
Created November 11, 2024 11:36
New Relic snippets

New Relic snippets

Alert Workflows

Email Notification

  • Email subject:

[{{ priority }}-{{ state }}] {{#replace "/query.*minutes on/" annotations.title.[0]}}-{{else}}{{entitiesData.names}}{{/replace}}

@seantrane
seantrane / bash_strict_mode.md
Created November 6, 2024 16:18 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@seantrane
seantrane / README.md
Last active October 30, 2024 15:10
MegaLinter Usage

MegaLinter Usage

MegaLinter via Docker CLI

NOTE: When using Trivy, it will download a Vulnerability DB, Java Index DB, and Checks Bundle during every run. This quickly triggers rate-limiting errors. The script below will pre-cache the DB's every 24 hours, to ensure that excessive MegaLinter scans do not trigger rate-limiting.

bin/megalinter:

#!/usr/bin/env bash
@seantrane
seantrane / README.md
Last active February 14, 2024 17:25
SonarQube / SonarCloud Instructions

SonarQube / SonarCloud Instructions

Pay attention to these importants facts regarding Sonar inclusions/exclusions:

  • SonarQube, an opensource product, calculates coverage using percentage of lines-of-code (LOC) covered by tests.
  • SonarCloud calculates cost based on lines-of-code (LOC). This only applies to private repositories.
  • Adjust relative paths in sonar.sources and sonar.exclusions config properties to match your requirements.
  • Only scan the files you've written. DO NOT scan external libraries.
  • If you must scan large amounts of code, use an ephemeral SonarQube instance to reduce cost.
@seantrane
seantrane / LS_COLORS.md
Last active November 2, 2023 16:35 — forked from thomd/LC_COLORS.md
LSCOLORS & LS_COLORS

Color Configuration for ls (LS_COLORS)

TLDR: lscolors generator tool: [http://geoff.greer.fm/lscolors/]

LSCOLORS

The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.

The color designators are as follows:

@seantrane
seantrane / -upstream-sync.md
Last active October 31, 2023 15:01
Upstream Sync, with Tags, without Forking

Upstream Sync, with Tags, without Forking

This approach uses the Upstream Sync GitHub Action to keep a remote/origin in sync with the remote/upstream repo.

  1. Create and navgiate to, directory for repo: mkdir <repo_name> && cd <repo_name>
  2. Initiate a new git repo: git init
  3. Add upstream remote config: git remote add --tags -t upstream [email protected]:/.git
@seantrane
seantrane / File Naming.titleformat
Last active December 19, 2021 09:51
MusicBrainz Picard Configuration
$if(%albumartist%,%albumartist%,$if(%_multiartist%,Various Artists,$if2(%albumartist%,%artist%)))/
$if($gt($lenmulti(%artists%),2),$join(%artists%, & )--,)
$if(%album%,%album%,$trim($rreplace($replace($replace($replace($replace(%title%,",'), _ , - ),:,-),/,-),\([\\?\\!_]*\),)))
$if(%releasetype%, [%releasetype%],)/
$if(%date%, \($if(%media%,%media%-,)%date%\),)/
$if(%tracknumber%,$if($gt(%totaldiscs%,1),$num(%discnumber%,2),$if(%discnumber%,$num(%discnumber%,2),))$num(%tracknumber%,2)--,%artist%--)
$trim($rreplace($replace($replace($replace($replace(%title%,",'), _ , - ),:,-),/,-),\([\\?\\!_]*\),))
$if(%tracknumber%,$if(%_multiartist%,--%artist%,$if(%albumartist%,$if($ne(%albumartist%,%artist%),--%artist%,),)),)
@seantrane
seantrane / devops-checklist.md
Created March 30, 2021 08:33
Gruntwork's Production Readiness Checklist using Issue Checklist for Jira

--- Server-side

  • Build AMIs

If you want to run your apps directly on EC2 Instances, you should package them as Amazon Machine Images (AMIs) using a tool such as Packer. Although we recommend Docker for all stateless apps (see below), we recommend directly using AMIs and EC2 Instances for all stateful apps, such as any data store (MySQL, MongoDB, Kafka), and app that writes to its local disk (e.g., WordPress, Jenkins).

  • Deploy AMIs using Auto Scaling Groups

The best way to deploy an AMI is typically to run it as an Auto Scaling Group. This will allow you to spin up multiple EC2 Instances that run your AMI, scale the number of Instances up and down in response to load, and automatically replace failed Instances.

  • Build Docker images >> If want to run your apps as containers, you should package your apps as [Docker](http://d

Keybase proof

I hereby claim:

  • I am seantrane on github.
  • I am seantrane (https://keybase.io/seantrane) on keybase.
  • I have a public key ASBzyNMCrHYsez6rHgpQB1cJ89pgoMQatRJzoqZHqUFx3go

To claim this, I am signing this object:

@seantrane
seantrane / README.md
Last active November 2, 2024 02:20
Visual Studio Code Preferences

My Visual Studio Code Preferences

The various settings I use in VS Code. Useful, not only for new setups, but also sharing with others.

These preferences are organized in the order you might configure VS Code from scratch.

  1. Keyboard Shortcuts (keybindings.json)
  2. Settings (settings.json)
  3. Extensions
  4. Workspace config (projects.code-workspace)