Skip to content

Instantly share code, notes, and snippets.

View gabrieljoelc's full-sized avatar

Gabriel Chaney gabrieljoelc

View GitHub Profile

Journaling with vim and Gist

2018-11-21

The Requirements

I have been been searching for a way to keep a developer journal. Here are my requirements:

  1. Supports vim on laptop/desktop
  2. Supports GitHub-style Markdown
@gabrieljoelc
gabrieljoelc / mstest_fixture_steps.md
Last active September 14, 2022 20:56
How to get .NET Core MSTest tests working locally and in Azure DevOps (previously Visual Studio Team Services or VSTS)

These steps are for getting .NET Core 2.1 MSTest tests to support building up the environment variables that an Azure Function uses both in a local environment and in Azure DevOps CI.

Assumptions

  • Need to use live resources for integration testing because Event Hub doesn't have an emulator
    • This means I have connection strings that must be treated like secrets (can't use UseDevelopment=true for everything)
  • Can't easily build up my own configuration using ConfigurationBuilder in the application because I'm using Azure Functions (and Webjobs)
    • Can't use something like this
  • Need to be able to run locally and in Azure DevOps (VSTS)

Microsoft is not going to support emulators for Mac or Linux (see here). Here is a workaround:

  1. Install docker
  2. Install https://github.com/Azure/Azurite: docker pull arafato/azurite
  3. docker run -d -t -p 10000:10000 -p 10001:10001 -p 10002:10002 -v /Users/user1/azurite:/opt/azurite/folder arafato/azurite
  4. az storage table create --name 'test' --connection-string 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;'

Note that the port number is table storage specific as is blob and queue (see here).

@gabrieljoelc
gabrieljoelc / steps.md
Created June 21, 2018 00:10
Use different port for Azure Function running in VS 2017
@gabrieljoelc
gabrieljoelc / Generated.cs
Created June 1, 2018 16:43
Generated C# classes from Redox json
public class Source
{
public string ID { get; set; }
public string Name { get; set; }
}
public class Destination
{
public string ID { get; set; }
public string Name { get; set; }
@gabrieljoelc
gabrieljoelc / bio.md
Last active April 19, 2018 07:01
A short bio

After graduating from Arizona State University, Gabe moved with his wife to Maryland to take his first software engineering job. He had the privilege of working with high performing teams building enterprise web applications. He had his first experiences with distributed systems with a team in Washington, D.C. Missing family and warmer weather, he and his family, now including two children, moved back to Phoenix. Shortly after moving, he obtained his first startup gig as the lead of a small team. The company was acquired by RetailMeNot in 2016. He supported three teams as an engineering manager at RetailMeNot until getting the startup itch again. He’s excited to join Medumo to help ship software that improves the patient experience and operational efficiency for our clients. He loves this phase of a business and looks forward to helping grow the engineering team as well. When he’s not building software, he likes cooking, spending time with family and friends, and traveling.

@gabrieljoelc
gabrieljoelc / .0_windows_setup.md
Last active March 5, 2021 20:14
Gabe's Windows Setup

https://www.howtogeek.com/265900/everything-you-can-do-with-windows-10s-new-bash-shell/

  1. Install "Windows Subsystem on Linux" for
  2. Install Debian instead of Ubuntu because it doesn't include GUI which I'm not going to use
  3. Debian WSL requires Windows build 1083 so you'll need to ensure this is upgraded before it'll work
  4. https://www.howtogeek.com/258518/how-to-use-zsh-or-another-shell-in-windows-10/
  5. Install hyper.is Hyper was pretty slow even in typing responsiveness. I switched to just using the out-of-the-box Debian WSL terminal and tmux for tabs (see tmux section below)
  6. Run the following:
sudo apt update && sudo apt upgrade
sudo apt-get install zsh

Git flow deployment

Prerequesites

  1. gitflow
  2. Initialize git flow in your repo
git flow init

Steps

@gabrieljoelc
gabrieljoelc / .gitignore_global
Last active September 28, 2022 20:13
Gabe's Mac Setup Checklist - since I can't dockerize my host :(
# add to home directory
# git config --global core.excludesfile ~/.gitignore_global
# ignore vim swap files
*.swp