Skip to content

Instantly share code, notes, and snippets.

View fenneh's full-sized avatar
🔥
Hi

fen fenneh

🔥
Hi
View GitHub Profile
@fenneh
fenneh / gist:2942550
Created June 16, 2012 21:32 — forked from swanson/gist:2942386
Don't ask permission to be awesome
"And have a healthy disregard for rules. There are way too many rules, and they usually have only
one effect: to slow down those who are active. If you believe your activities are in the best
interest of the company that employs you - yet you fear you have broken enough rules that you
might be fired - then you are doing well."
--Sebastian Thrun
http://www.reddit.com/r/IAmA/comments/v59z3/iam_sebastian_thrun_stanford_professor_google_x/c51gi53
@fenneh
fenneh / chat-wish-list.md
Created July 16, 2012 00:38 — forked from rtgibbons/chat-wish-list.md
Chat wish list

Why

I hate Skype, but it has become un-official default chat of many businesses and developers. Because it is free, secure and provides voice and video. But Skype is missing so many other features that make it annoying to use.

Existing Options

  • Skype
  • Campfire
  • HipChat
  • Grove.io
@fenneh
fenneh / gist:3164721
Created July 23, 2012 17:01 — forked from kfrancis/gist:3164709
PowerShell Method for Telling NewRelic of Deployment
if ($OctopusEnvironmentName -eq "Production") {
# in production, we need to
#Create a URI instance since the HttpWebRequest.Create Method will escape the URL by default.
$URL = "http://api.newrelic.com/deployments.xml"
$post = "deployment[account_id]=<id here>&deployment[user]=OctopusDeploy&deployment[app_id]=<app id here>&deployment[revision]=($OctopusPackageVersion)"
$URI = New-Object System.Uri($URL,$true)
#Create a request object using the URI
$request = [System.Net.HttpWebRequest]::Create($URI)
param
(
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
)
Set-StrictMode -Version Latest
$libPath = (Split-Path -Parent $MyInvocation.MyCommand.Definition)
Import-Module $libPath\SecurityLib.psm1
function New-WindowsService {
param
(
[Parameter(Mandatory=$True,Position=0,HelpMessage="The name of the Windows Service")]
[string]$serviceName,
<Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<!-- These settings control what the service's name, description etc appear in services.msc task panel. -->
<PropertyGroup Label="ServiceMetaData">
<ServiceName>ShinyNewService</ServiceName>
<ServiceDisplayName>Shiny New Service</ServiceDisplayName>
<ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription>
</PropertyGroup>
<Choose>
param
(
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
)
@fenneh
fenneh / msbuild-aliases.ps1
Created May 9, 2014 10:03
MSBuild Aliases
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0").MSBuildToolsPath -ChildPath "MSBuild.exe")
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5").MSBuildToolsPath -ChildPath "MSBuild.exe")
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0").MSBuildToolsPath -ChildPath "MSBuild.exe")
#
# Assumptions
#
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git
# tag set for that commit in GitHub that is "v1.0.0.73".
#
# 2. You have TeamCity label each successful build in GitHub with the format
# "v{build number}. Sidenote: it appears that TeamCity only labels the
# default branch, but not feature branches.
#
@fenneh
fenneh / Update-StepTemplatesOnDeploymentProcesses.ps1
Last active August 27, 2015 15:32 — forked from Dalmirog-zz/Update-StepTemplatesOnDeploymentProcesses.ps1
Update-StepTemplatesOnDeploymentProcesses (nice name, i know)
<#
.Synopsis
Updates the Step Templates used on Deployment Processes to the latest versions
.DESCRIPTION
Step templates can be updated from the library on Octopus, but that doesnt mean that the Deployment processes using that template will start using the latest version right away. Normally, the user would have to update the step template on each deployment process manually. This script takes care of that.
.EXAMPLE
Update-StepTemplatesOnDeploymentProcesses -ActionTemplateID "ActionTemplates-3" -OctopusURI "http://localhost" -APIKey "API-RLMWLZBPMX5DRPLCRNZETFS4HA"
.EXAMPLE
Update-StepTemplatesOnDeploymentProcesses -AllActionTemplates -OctopusURI "http://Octopusdeploy.MyCompany.com" -APIKey "API-TSET42BPMX5DRPLCRNZETFS4HA"
.LINK