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
@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.
##
@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
@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

@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;
@devlead
devlead / PostMessage.ps1
Created January 8, 2015 16:10
Post to slack from PowerShell
$postSlackMessage = @{token="*topsecret*";channel="#general";text="Hello from PowerShell!";username="PowerShell";icon_url="https://pbs.twimg.com/profile_images/1604347359/logo_512x512_normal.png"}
Invoke-RestMethod -Uri https://slack.com/api/chat.postMessage -Body $postSlackMessage
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@albertbori
albertbori / MyDB.cs
Last active June 13, 2023 18:11
.NET EntityFramework Encryption Example (C#)
public class MyDB : IdentityDbContext<User>
{
//DBSet properties go here
public MyDB()
{
((IObjectContextAdapter)this).ObjectContext.ObjectMaterialized += new ObjectMaterializedEventHandler(ObjectMaterialized);
}
#region Encryption
@pdcullen
pdcullen / UploadController.cs
Created July 28, 2014 13:36
ng-flow asp.net api2 upload class
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Web;
@JamesRandall
JamesRandall / BlobStorageMultipartStreamProvider.cs
Last active March 19, 2020 23:12
Azure Blob Container Web API Image Upload
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
@turtlemonvh
turtlemonvh / main.js
Last active January 3, 2021 16:37
Angular Messaging
var MyApp = angular.module('MyApp');
MyApp.factory('msgBus', ['$rootScope', function($rootScope) {
var msgBus = {};
msgBus.emitMsg = function(msg, data) {
data = data || {};
$rootScope.$emit(msg, data);
};
msgBus.onMsg = function(msg, func, scope) {
var unbind = $rootScope.$on(msg, func);
if (scope) {