Skip to content

Instantly share code, notes, and snippets.

View GFoley83's full-sized avatar
☘️
CTO @ Educa

Gavin Foley GFoley83

☘️
CTO @ Educa
View GitHub Profile
@plillevold
plillevold / DeployToAzure.ps1
Last active August 29, 2015 13:56 — forked from PaulStovell/DeployToAzure.ps1
Modified version of the bundled Windows Azure deployment process used by Octopus 2.0. This version will do a deploy to Staging, VIP swap to Production and then delete the Staging slot
## --------------------------------------------------------------------------------------
##
## This script is used to control how we deploy packages to Windows Azure.
## Orignial script (https://gist.github.com/PaulStovell/5234255) customized for
## Staging-To-Production with VIP swap deployment.
##
## NOTE: the script will only do Staging+VIP swap if $OctopusAzureSlot == "Staging".
## If $OctopusAzureSlot == anything else, the script will deploy directly to that slot
## without any further swapping.
##
@panda4man
panda4man / app.js
Created January 18, 2015 01:28
Ionic Route Example
$stateProvider
.state('app', {
url: "/app",
abstract: true,
controller: 'MainCtrl',
templateUrl: "templates/tabs.html",
resolve: {
Migrations: ['$q', 'InitService', function($q, Init) {
return Init.promise.then(function(good) {
return good;
@Dalmirog-zz
Dalmirog-zz / DeleteDeployments.ps1
Last active August 16, 2016 20:06
Delete all deploments for a Project-Environment
$apiKey = "Your API Key"
$OctopusURL = "Your Octopus URL"
$Header = @{ "X-Octopus-ApiKey" = $apiKey }
$ProjectName = "Your project name"
$EnvironmentName = "Your environment name"
#Getting Environment and Project By Name
$Project = Invoke-WebRequest -Uri "$OctopusURL/api/projects/$ProjectName" -Headers $Header| ConvertFrom-Json
@jeffrafter
jeffrafter / export.sh
Created June 8, 2010 05:32
Exporting XML from Final Cut Pro using Apple Script
#!/bin/sh
# 'Enable access for assistive devices' must be selected in Universal Access preferences.
osascript -e "
try
tell application \"Final Cut Pro\" to activate
delay 0.5
tell application \"System Events\"
@munr
munr / gist:4282463
Created December 14, 2012 03:20
Helper class to simplify executing command line applications from C# and retrieving their output.
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading;
using NLog;
namespace CLE
{
/// <summary>
@yetanotherchris
yetanotherchris / gist:4746671
Last active February 14, 2017 21:20
Unique identifiers: Base62
public static string Base62Random()
{
int random = _random.Next();
return Base62ToString(random);
}
private static string Base62ToString(long value)
{
// Divides the number by 64, so how many 64s are in
// 'value'. This number is stored in Y.
@Fodsuk
Fodsuk / gist:3025099
Created June 30, 2012 18:56
service layer exampe
public class InventoryController : ApiController
{
private readonly IInventoryManagementService _inventoryManagementService;
private readonly IUnitOfWork _unitOfWork;
public InventoryController(IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork; //access services
_inventoryManagementService = _unitOfWork.Get<IInventoryManagementService>();
}
@axoplasm
axoplasm / gist:bdda3922fa43b2ef25d8
Last active January 17, 2018 12:41
Ditching Compass and Sass for LibSass

I had a large client framework extending my personal boilerplate that was taking upwards of 10seconds to compile with standard Ruby Sass. This framework had minimal dependencies:

I used Bundler to manage Ruby dependencies and ran tasks with Grunt — mainly compiling Sass via grunt-contrib-compass, and previewing with live-reload. Simple stuff.

But 10seconds was an unacceptable performance hit for me. I typically keep my monitor split in half (using Spectacle ), with a browser on one half and MacVim on the other. With Live Reload running I get a nearly realtime preview of my work … except for that one client framework, where I was gettin

@mcollier
mcollier / AzurePublish.ps1
Created April 4, 2013 11:17
This is a sample PowerShell script to deploy a Windows Azure Cloud Service. This was written using the 0.6.11 version of the Windows Azure PowerShell cmdlets. This script also uses the Cerebrata Azure Management Cmdlets.
#NOTE: This script is based on the Microsoft provided guidance example at
# https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/.
Param(
[parameter(Mandatory=$true)]
$serviceName,
[parameter(Mandatory=$true)]
$storageAccountName,
[parameter(Mandatory=$true)]
$storageAccountKey,
@tumtumtum
tumtumtum / gist:09acc1f2385575484716
Last active November 13, 2018 17:44
Updated DeployToAzure.ps1
## --------------------------------------------------------------------------------------
##
## This script is used to control how we deploy packages to Windows Azure.
## Orignial script (https://gist.github.com/PaulStovell/5234255) customized for
## Staging-To-Production with VIP swap deployment.
##
## NOTE: the script will only do Staging+VIP swap if $OctopusAzureSlot == "Staging".
## If $OctopusAzureSlot == anything else, the script will deploy directly to that slot
## without any further swapping.
##