Skip to content

Instantly share code, notes, and snippets.

@ZachBray
ZachBray / install_dotnet_2.1_on_18.04.sh
Last active October 1, 2018 13:38
Install dotnetcore 2.1 on Ubuntu 18.04
# 16.04
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
# 18.04
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys EB3E94ADBE1229CF
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
# All
@ZachBray
ZachBray / install_ngrok.sh
Created August 12, 2018 09:47
ngrok install
#!/bin/bash
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
rm ngrok-stable-linux-amd64.zip
sudo mv ngrok /usr/bin/
@ZachBray
ZachBray / GitHubIntegration.gs
Created June 29, 2018 00:29
Google Sheets GitHub Issue Integration
var paramsSheetName = "GitHub Params";
function createGitHubParams() {
var sheets = SpreadsheetApp.getActiveSpreadsheet();
var sheet = sheets.insertSheet(paramsSheetName);
sheet.appendRow(["API Token", "TODO"]);
sheet.appendRow(["Owner", "TODO"]);
sheet.appendRow(["Repository", "TODO"]);
}
@ZachBray
ZachBray / Event Sourcing - Competing Event Transformers.md
Last active December 8, 2023 15:43
Design ideas for building fault-tolerant systems of micro-services leveraging a distributed event log

Competing Transformers/Producers - WIP

Design ideas for building fault-tolerant systems of micro-services leveraging a distributed event log.

Components

A Distributed Event Log (DEL)

A DEL maintains an event-log and some computed state across several machines. Each event is tagged with an Event Source Key (ESK) that describes its origin. A DEL provides a total order of all events regardless of their ESK.

@ZachBray
ZachBray / .vimrc
Last active March 13, 2016 20:34
Vim Config File
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
imap ii <Esc>
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'ap/vim-css-color'
@ZachBray
ZachBray / CSharpFunctionalQueue
Created November 27, 2014 22:14
Functional style queue in C# - quite ugly
internal class LinkedListNode<T>
{
private readonly T _item;
private readonly LinkedListNode<T> _nextNode;
public LinkedListNode(T item, LinkedListNode<T> nextNode)
{
_item = item;
_nextNode = nextNode;
}
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cache.Tests
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Disposables;
using System.Reactive.Subjects;
using System.Text;
using System.Threading;