Skip to content

Instantly share code, notes, and snippets.

View axis7818's full-sized avatar
🎧
jamin'

Cameron Taylor axis7818

🎧
jamin'
View GitHub Profile
@axis7818
axis7818 / iterm2_switch_automatic.md
Last active June 21, 2023 20:12 — forked from FradSer/iterm2_switch_automatic.md
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/Application Support/iTerm2/Scripts/AutoLaunch with:
@axis7818
axis7818 / settings.jsonc
Last active August 11, 2020 15:57
VSCode Peacock Extension Dracula Colors
{
// 1. Install the Dracula Theme: https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula
// 2. Install the Peacock Extension: https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock
// 3. Add this snippet to your VSCode's settings.json fie.
"peacock.favoriteColors": [
{
"name": "Dracula",
"value": "#44475a",
@axis7818
axis7818 / !Axis7818-zsh-configuration.md
Last active April 10, 2020 22:18
axis7818 zsh configuration

Axis7818 ZSH Configuration

Here are the various configurations and rc files I use to configure my terminal environment.

I use iTerm2 and oh-my-zsh

The iTerm2 color theme comes from here

.zshrc: configuration for my zsh behavior axis7818.zsh-theme: PS1 customization

@axis7818
axis7818 / acrWithGeoreplication-armDeploymentWithCompleteMode.md
Last active January 8, 2019 22:37
ACR With Geo-Replication Complete Mode ARM Deployment

101-container-registry-geo-replication

Issue Details

I am working on an infrastructure-as-code project that requires the automatic provisioning of ACR with geo-replication. And, I found an issue with ACR and ARM interactions that causes deployment to hang.

I used this template to provision ACR with geo-replication enabled and one additional replication. The goal being to setup a CI pipeline that will provision and apply updates to these resources through a resource group deployment. In order for these automatic updates to happen, I have been trying to use ARM deployments with the Complete mode.

When ACR is provisioned with geo-replication, it automatically creates a home replication resource that is not specified

MyCRT Code and Test: Cameron Taylor

Description

The following code provides an interface to a file storage backend for MyCRT. There is an abstract class StorageBackend which is implemented in subclasses LocalBackend and S3Backend. When MyCRT is running locally for development, the LocalBackend is used, but when MyCRT is running remotely, the S3Backend is used.

Technology

All of the code is written in TypeScript and tested with mocha and chai. To mock or spy certain objects, ts-mockito is used.

  • adjusted schema key retrieval methods to rely on broader prefixes, no more DRY
  • rename function to have consistent naming
  • handle null case for getting a type string
  • remove type redundancies
  • refactor await in if statement to be more readable
  • call existing function
  • throw error when multiple IMetricsList of same type are found.
@axis7818
axis7818 / description.md
Last active February 15, 2018 19:01
mycrt code review

metrics-storage.ts

Author: Cameron Taylor

This class is responsible for reading metrics from our defined s3 storage schema and managing the files as it reads. It is designed to work for both captures and replays, while in-progress and after they have finished running.

Tear it up!

Core Concepts

My Atom Settings