Skip to content

Instantly share code, notes, and snippets.

View mefellows's full-sized avatar

Matt Fellows mefellows

View GitHub Profile
@mefellows
mefellows / vagrant-bootstrapper.ps1
Created December 17, 2014 00:53
Windows Vagrant with Rsync powershell bootstrap script
Write-Host -ForegroundColor green "Bootstrapping machine"
Write-Host "Setting up package management and installing required packages for Dev."
#
# Install Choco (if not already installed) + required packages
#
if ( (Get-Command "choco" -errorAction SilentlyContinue) ) {
Write-Host "Chocolatey already installed. Skipping."
} else {
@mefellows
mefellows / packer.json
Created January 28, 2015 05:15
Parallels Windows Setup
{
"variables": {
"build_version": "1.0.0"
},
"builders": [
{
"type": "parallels-iso",
"guest_os_type": "win-2012",
"disk_size": 65536,
"name": "basebox-parallels",
@mefellows
mefellows / bash-alias
Last active August 29, 2015 14:15
cg - Bash Alias function to switch to a go project
changedir_go() {
if [ "$#" -eq "2" ]; then
cd $GOPATH/src/github.com/$1/$2
else
cd $GOPATH/src/github.com/mefellows/$1
fi
}
alias cg=changedir_go
@mefellows
mefellows / Vagrantfile
Last active August 29, 2015 14:17
Mono Vagrantfile for building images
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "deb/jessie-amd64"
config.vbguest.auto_update = false
# Provision the Debian server with the Mono build environment
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y curl
rm -rf /var/lib/apt/lists/*
@mefellows
mefellows / build.sh
Created March 17, 2015 21:56
Mono static binary build script
#!/bin/bash
nuget restore -NonInteractive
PACKAGES_DIR=$(find ./packages/ -name *.dll)
PACKAGES=""
for f in $PACKAGES_DIR; do
PACKAGES="$PACKAGES $f"
done
@mefellows
mefellows / NancyDemo.cs
Created March 18, 2015 00:05
Demo Nancy .NET Hello World API
using Nancy;
namespace NancyDemo
{
public class HelloModule : NancyModule
{
public HelloModule()
{
Get["/"] = parameters => "Hello World";
}
}
@mefellows
mefellows / vagrant.sh
Created March 18, 2015 02:05
Run Minimal Mono Docker API
vagrant up
vagrant ssh
cd /vagrant
./build.sh
docker run -d -p 8888:8888 mfellows/mono-api
@mefellows
mefellows / Dockerfile
Created March 18, 2015 02:11
Mono static binary Dockerfile
FROM progrium/busybox
RUN opkg-install libc-dev
ADD ./consoleapp console
CMD [ "./console" ]
@mefellows
mefellows / win2008r2-packer.json
Last active August 29, 2015 14:17
Windows 2008r2 Elevated Provisioning Example
{
"builders": [{
"type": "virtualbox-windows-ovf",
"name":"win2008updates",
"source_path": "/Users/mfellows/Downloads/packer-output-updates/virtualbox-win-2008-base.ovf",
"headless": false,
"boot_wait": "1m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_wait_timeout": "5m",
@mefellows
mefellows / packer.json
Last active November 14, 2019 19:50
Packer Community Valid Exit Codes
{
"builders": [
{
"type": "virtualbox-windows-ovf",
"source_path": "output-basebox-vbox/talentsearch-api-1.0.0.ovf",
"headless": false,
"boot_wait": "1m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_wait_timeout": "5m",