Skip to content

Instantly share code, notes, and snippets.

View brandonmartinez's full-sized avatar

Brandon Martinez brandonmartinez

View GitHub Profile
#Requires -Version 3.0
param($websiteNames, $jobname, $jobtype, $packOutput, $slotName = "")
$VerbosePreference = "continue"
$ErrorActionPreference = "continue"
# Helper Functions (based on or from https://github.com/aspnet/vsweb-publish/blob/master/publish-module.psm1)
function Get-MSDeploy{
[cmdletbinding()]
@brandonmartinez
brandonmartinez / vncboot
Created February 13, 2015 19:14
Raspberry Pi VNC Boot Script
# First configure the user you want to run this under - this will generally be pi, unless you've created your own users
export USER='pi'
eval cd ~$USER
# Check the state of the command - this'll either be start or stop
case "$1" in
start)
# if it's start, then start vncserver using the details below
su $USER -c '/usr/bin/vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565'
@brandonmartinez
brandonmartinez / Email Regex
Created September 19, 2014 14:34
A basic regex for email validation
[A-z0-9!#$%&'*+/=?^_`{|}~-]+[A-z0-9!#$%&'*+/=?.^_`{|}~-]*(?:-/.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?
@brandonmartinez
brandonmartinez / gist:8336110
Created January 9, 2014 15:39
A sample structure map configuration. Requires the StructureMap nuget package (obviously). Can paste into a console app to run and test the demo.
using System;
using System.Collections.Generic;
using System.Linq;
using StructureMap;
using StructureMap.Configuration.DSL;
namespace StructureMapExample
{
/// <summary>
/// A registry; I configure these one per "area" of my application. If it's a