Skip to content

Instantly share code, notes, and snippets.


Chris S. yetanotherchris

Block or report user

Report or block yetanotherchris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
yetanotherchris / gist:4960171
Last active Aug 13, 2019
Double Linked List C# example
View gist:4960171
public static void Main()
DoubleLinkedList list = new DoubleLinkedList();
DoubleLink link4 = list.Insert("4");
Console.WriteLine("List: " + list);
yetanotherchris /
Last active Jul 26, 2019
Install Kops and prequisites on Ubuntu
# Install AWS CLI, Kubectl, Kops
sudo apt update
sudo apt install -y awscli
sudo snap install kubectl --classic
curl -LO
chmod +x kops-linux-amd64
mv ./kops-linux-amd64 /usr/local/bin/kops
# Setup the AWS profile
aws config
yetanotherchris /
Last active Jul 24, 2019
RabbitMQ on Docker with admin UI
# AWS specific install of Docker
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# exit the SSH session, login again
# Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
yetanotherchris / git-config.ps1
Created Apr 3, 2019
Set git to use a different email (per repository)
View git-config.ps1
git config --local ""
yetanotherchris / google-cloud-pubsub-example.cs
Last active Jul 19, 2019
Google Cloud Pub/Sub C# example
View google-cloud-pubsub-example.cs
// Google Cloud Pub/Sub C# example
// NOTE: This is a .NET Core 1.1 console app.
// Use "dotnet run" to run it, run setup.ps1 first.
using System;
using System.Collections.Generic;
using Google.Cloud.PubSub.V1;
using Google.Protobuf;
yetanotherchris /
Created Sep 5, 2016
Automating Docker images and containers with Python ()
This script brings up the entire stack of Docker containers, removing the current ones.
Docker compose was tried for this task and it wasn't customisable enough.
Docker cloud was tried (with stack files) and was buggy (failed to launch, no logs returned).
Docker machine was tried, but it can't connect to existing servers only ones it created.
Rancher was too heavy weight for the task, as the containers are lightweight in DigitalOcean.
Kubernetes would've been too heavy weight for DigitalOcean.
It was written in Powershell and worked. But then converting it to Bash was too much effort.
Powershell for Linux is too much effort to install without a debian package (and none standard)
yetanotherchris /
Last active Jul 12, 2019
Install Mono on Amazon Linux (CentOS too)
sudo yum update -y
echo "======= INSTALLING RPM FOR MONO ======="
sudo mkdir -p /tmp/mono_dependencies
cd /tmp/mono_dependencies
sudo wget
sudo yum install -y libpng15-1.5.27-1.fc25.x86_64.rpm
echo "======= INSTALLING MONO ============"
sudo yum install -y yum-utils
yetanotherchris / gist:4953115
Last active Jul 7, 2019
Syntax highlighter for C#
View gist:4953115
/// <summary>
/// A basic implementation of a pretty-printer or syntax highlighter for C# soure code.
/// </summary>
public class SourceColorer
private string _commentCssClass;
private string _keywordCssClass;
private string _quotesCssClass;
private string _typeCssClass;
private bool _addStyleDefinition;
yetanotherchris /
Created Jun 26, 2019
visualise github branch history
git log --oneline --graph --decorate --all
yetanotherchris /
Last active Jun 19, 2019
Git log prettier version
git log -n2 --pretty="format:[%cD] %an : %s"
You can’t perform that action at this time.