Skip to content

Instantly share code, notes, and snippets.

@mrled
mrled / Show-OctopusVariables.ps1
Created August 31, 2017 01:03
[Show Octopus Variables in Powershell] #powershell #octopus
<#
.synopsis
Show Octopus parameters defined in files
.parameter rootPath
Search recursively from here.
If the tree is large, this command will take a long time. If you're working in a Git repository of a project directory, it might be worth running 'git clean -fxd' beforehand. This will delete all your bin/ and obj/ directories (meaning any binaries you have built will be deleted), but will make this command run faster.
.parameter filePattern
Look for files whose name matches this pattern. By default, only look for *.Octopus.config files.
#>
function Show-OctopusVariables {
@mrled
mrled / cloudbuilder.json
Last active August 31, 2017 01:06
wintriallab cloudbuilder template #bugreport
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"metadata": {
"description": "Storage Account Name; must be a valid Azure DNS hostname"
}
},
@mrled
mrled / BackUpAllDatabases.sql
Last active September 26, 2017 20:46
Back up all mssql databases
-- NOTE: Backs up to the default backup directory
DECLARE @prefix VARCHAR(20) -- a prefix for the filename, set below
DECLARE @name VARCHAR(50) -- database name, set automatically
DECLARE @fileName VARCHAR(256) -- filename for backup, set automatically
DECLARE @fileDate VARCHAR(20) -- used for file name, set automatically
SET @prefix = 'Autobackup'
SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)
{
"variables": {
"testinputartifact": "C:\\Windows\\system32\\cmd.exe"
},
"builders": [
{
"type": "file",
"source": "{{user `testinputartifact`}}",
"target": "testing.box"
}

Keybase proof

I hereby claim:

  • I am mrled on github.
  • I am mrled (https://keybase.io/mrled) on keybase.
  • I have a public key whose fingerprint is 1E06 1357 A257 E10E C0AF 747E 56D3 8EFB 7465 6AA0

To claim this, I am signing this object: