Skip to content

Instantly share code, notes, and snippets.

View flcdrg's full-sized avatar

David Gardiner flcdrg

View GitHub Profile
@flcdrg
flcdrg / CreateVSTSItems.ps1
Created June 22, 2018 06:28
Migrate Redmine issues to Visual Studio Team Services work items
param(
$user, # "VSTS username - doesn't need @domain suffix"
$token, # VSTS personal access token
$project, # the VSTS project to create items in
$vstsAccountName, # the bit before .visualstudio.com
$csvFile, # path to the .csv file
$redmineIssueUrl # URL to legacy redmine server. eg. https://redmine/issues
)
$ErrorActionPreference = "Stop"
@flcdrg
flcdrg / moderation.md
Last active May 24, 2025 07:46
Chocolatey Moderation

Please resolve these to allow this package to be approved:

  • tools\VERIFICATION.txt should contain instructions on how the user can independently verify that the embedded file is the same as available for download from the original site.
  • tools\LICENSE.txt should contain the text of the software license. This must also permit redistribution for the software to be embedded in the package.
  • Remove tools\chocolateybeforemodify.ps1 as it isn't being used
  • Remove tools\LICENSE.txt and tools\VERIFICATION.txt as they are only required when embedding files in the package
  • If you are the software author, please confirm that via a comment here. Alternatively, if you are not the software author, put your own name in the owners field.
  • Remove the file ReadMe.md
  • Remove the file update.ps1
  • Add minimum version numbers for package dependencies
@flcdrg
flcdrg / Create-Groups.ps1
Created October 12, 2017 22:45
TeamCity
$data = @{
"GROUP_KEY" = "Group Description"
}
$user = "xxxxxx"
$password = "xxxxxx"
$pair = "$($user):$($password)"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
@flcdrg
flcdrg / profile.ps1
Last active February 2, 2025 02:14
PowerShell Profile
if ($PSVersionTable.PSEdition -eq "Core") {
$vsshell = Start-ThreadJob {
# .NET build
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
# Set this to the value returned by 'vswhere -property instanceId'
#$vsInstanceId2019 = "73b5fa7b"
if ($env:ComputerName -eq "DELPHINIUM") {
@flcdrg
flcdrg / FreshBing.ps1
Created April 11, 2016 02:45
Updated version of https://github.com/ndabas/FreshBing with image description
# FreshBing
# https://github.com/ndabas/FreshBing
#
# Copyright 2012-2013 Nikhil Dabas
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@flcdrg
flcdrg / 1-boxstarter-bare-v4.ps1
Last active April 13, 2025 00:01
My BoxStarter Scripts
# 1. Install Chocolatey
<#
Set-ExecutionPolicy RemoteSigned -Force
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory $directory | Out-Null
}