Skip to content

Instantly share code, notes, and snippets.

View craigminihan's full-sized avatar

Craig Minihan craigminihan

View GitHub Profile
@craigminihan
craigminihan / gist:e953ae2d973905baee8e92440dc0a5d1
Created May 2, 2018 09:27
Example interfaces file for balance-alb bonding
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
@craigminihan
craigminihan / gist:cb97b2d855e1cd7b50b32c9eabb38779
Last active July 10, 2018 13:20
Windows 2016 Docker Install

Update Windows

Windows 2016 must be updated to the latest version to ensure containers work as expected.

Install Docker

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
Add-MpPreference -ExclusionPath C:\ProgramData\docker\volumes\
using System;
using System.Linq;
namespace TestCodility1
{
class Program
{
public static int move(int[] positions, int[] knownCosts, int maxHop, int start)
{
var minCost = int.MaxValue;
@craigminihan
craigminihan / gist:389e5ff6c4d945c2e4698c756528ed55
Last active February 7, 2017 11:28
Build CouchDB 2.0 on FreeBSD 11
# install bash (optional)
# pkg install bash
# run as root
pkg install erlang-19.2_1,3 spidermonkey185 icu-58.2,1 gmake curl wget
# run as a user
wget http://www.mirrorservice.org/sites/ftp.apache.org/couchdb/source/2.0.0/apache-couchdb-2.0.0.tar.gz
tar xf apache-couchdb-2.0.0.tar.gz
cd apache-couchdb-2.0.0
@craigminihan
craigminihan / gist:229b0ee9dcf4ab6d794c4c8ee1f0d92e
Last active February 9, 2018 05:16
Install GCC-4.9 and LLVM/Clang-3.6 on Ubuntu 12 a bit like Travis CI
# replace your local package mirror if it is borked
#apt-get clean
#sed -i 's/http\:\/\/..\.archive\./http:\/\/us.archive./g' /etc/apt/sources.list
apt-get update
# add launchpad's ppa to apt
apt-get install -y python-software-properties
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
@craigminihan
craigminihan / install_kafka.bat
Last active October 2, 2023 14:09
A batch script to install Kafka and Zookeeper on Windows
@echo off
rem ************************************************************
rem Installs Kafka (and Zookeeper) as services and runs them
rem ************************************************************
set NSSM_VER=2.24
set TMP_ROOT=c:\tmp
set OPT_ROOT=c:\opt
set KAFKA_ROOT=%OPT_ROOT%\kafka
@craigminihan
craigminihan / gist:f980f16f359c16b93b70
Last active January 20, 2016 12:13
Configure an AWS Ubuntu 14 server to host openvpn and accept client connections
@craigminihan
craigminihan / gist:334a4c3be3d134e48afc
Last active April 14, 2016 09:25
Create a Kafka 0.9 node running on Ubuntu 14.04
sudo su
add-apt-repository -y ppa:webupd8team/java
apt-get update
apt-get -y install oracle-java8-installer
apt-get -y install wget unzip zookeeperd
mkdir ~/Downloads
cd ~/Downloads
wget "http://mirror.ox.ac.uk/sites/rsync.apache.org/kafka/0.9.0.0/kafka_2.11-0.9.0.0.tgz" -O kafka.tgz
@craigminihan
craigminihan / Dockerfile
Last active August 1, 2016 22:50
A Dockerfile for creating an AvanceDB 0.1-alpha image
FROM debian:8.1
MAINTAINER Craig Minihan <craig@ripcordsoftware.com>
RUN apt-get update && apt-get install -y apt-utils wget
#RUN apt-get install -y libboost1.55
RUN apt-get install -y libboost-system1.55.0 libboost-filesystem1.55.0 libboost-thread1.55.0 libboost-date-time1.55.0 libboost-regex1.55.0 libboost-program-options1.55.0 libboost-chrono1.55.0
RUN adduser --disabled-password --gecos "" avancedb && cd ~avancedb && mkdir Downloads && cd Downloads && wget ftp://ftp.ripcordsoftware.com/pub/avancedb/avancedb-0.1.0-alpha-debian-8.x.tar.gz
RUN cd ~avancedb && mkdir bin && cd bin && tar xvfz ../Downloads/avancedb-0.1.0-alpha-debian-8.x.tar.gz
EXPOSE 5994
CMD su -c "cd ~/bin && ./avancedb" avancedb
@craigminihan
craigminihan / gist:f22ce6c3653a0725b4fd
Last active October 8, 2015 18:59
Build Mono 4.0.4 and MonoDevelop 5.9.7 on Debian 8
# the script below is under development, use it and weep because it will probably fail
GECKOSHARPVERSION="2.0-0.12"
# Download missing packages
sudo apt-get update
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install libglade2-dev
sudo apt-get install libcanberra-gtk-module
sudo apt-get install dos2unix