Skip to content

Instantly share code, notes, and snippets.

View chestercodes's full-sized avatar

Chester chestercodes

View GitHub Profile
@chestercodes
chestercodes / fluidpatcher_install_hifiberry.sh
Last active July 14, 2021 21:04
Fluidpatcher install adc
#!/bin/bash
installdir=""
logfile="install-log.txt"
UPDATED=false
UPGRADE=false
PYTHON_PKG=""
ASK_TO_REBOOT=false
promptorno() {
#tool "nuget:?package=Microsoft.TestPlatform&version=15.7.0"
#tool "nuget:?package=NUnitTestAdapter&version=2.1.1"
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var buildDir = Directory("./src/Example/bin") + Directory(configuration);
var slnFile = "./src/Example.sln";
var testDllPattern = "./src/**/*Tests.dll";
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.region}"
}
resource "aws_key_pair" "key_pair" {
key_name = "key_pair_key"
public_key = "${file("~/.ssh/id_rsa.pub")}"
}
workflow PauseResourcesIfRunning {
Param
(
[Parameter (Mandatory = $true)]
[string] $subscriptionName
)
write-output "Started script with:
Subscription - $subscriptionName"
#! /bin/bash
echo "Start sql driver install script"
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
echo "update apt-get sources"
sudo apt-get update
echo "updated apt-get sources"
cls
$executingDir = Split-Path -parent $PSCommandPath
$isTest = $false
$startTime = Get-Date
function EnsureDirExists($uncDir){
if(-not(Test-Path -Path $uncDir -PathType Container )){
using System.Diagnostics;
namespace Examples.DebuggerDisplayTestData
{
[DebuggerDisplay("{ToDisplay}")]
public class SimpleClass
{
public string SomeString { get; set; }
public bool SomeBool { get; set; }
public int SomeInt { get; set; }
write-error "probably best to not execute"
exit 1
cd C:\Dev\Abide\Abide.Digby
$archiveFolderName = "z-archive"
$oldUnmergedBranches = New-Object System.Collections.ArrayList
foreach($branch in git branch -r --no-merged master )
@chestercodes
chestercodes / Next.ps1
Created January 24, 2016 18:22
Script for playing files from a folder matching a regex one by one.
function next()
{
$nextFilesDir = "SomeDirContainingNextAndNextHistoryFiles"
$nextFilePath = "$nextFilesDir\Next.txt"
$nextFileContent = Get-Content ($nextFilePath)
"Next file content is: '$nextFileContent'"
$filesDir = $nextFileContent[0].Replace("files-dir:", "")
$fileRegex = $nextFileContent[1].Replace("file-regex:", "")
@chestercodes
chestercodes / DeleteRemoteBranches.ps1
Last active November 1, 2016 17:18
Gitflow delete merged branches
$lastCommitsFile = "C:\LastCommitsOfDeletedBranches.txt"
if((Test-Path $lastCommitsFile ) -eq $false){"" > $lastCommitsFile}
"Lets delete stuff..."
$repoLocations = @("C:\Dev\SomeRepo")
$pullTheTrigger = $false