Skip to content

Instantly share code, notes, and snippets.

View OwenMcDonnell's full-sized avatar

Owen McDonnell OwenMcDonnell

View GitHub Profile
@OwenMcDonnell
OwenMcDonnell / ValidateYaml.ps1
Last active August 15, 2018 18:30
check validity of yaml file
Param(
[string]$yamlPath
)
if(!(test-path $yamlPath)) { write-warning "YAML path is invalid"; return; }
$token = "<your_token>"
$headers = @{
"Authorization" = "Bearer $token"
@OwenMcDonnell
OwenMcDonnell / appveyor-multiple-env-deployments.ps1
Last active October 24, 2018 21:25
appveyor multiple env deployments
Param(
[string]$environmentName1,
[string]$environmentName2,
[string]$buildVersion
)
$accountName = <your-account-name>
$projectSlug = <your-project-slug>
$token = $env:API_TOKEN #This should be added as a secure variable. Other variables used in script already exist
@OwenMcDonnell
OwenMcDonnell / Get_project_builds_by_branch.ps1
Created June 14, 2019 23:36
Querying api for project history and filtering by branch
$env:API_TOKEN="your_api_token" # use secure variable in case script runs from the build
$env:APPVEYOR_ACCOUNT_NAME="your_account_name" # no need to setup in case script runs from the build (default environment variable)
$env:APPVEYOR_PROJECT_SLUG="your_project_slug" # no need to setup in case script runs from the build (default environment variable)
$env:RECORDS_NUMBER=100 # build history depth to search
$env:BRANCH="your_branch" # which branch's builds do you want to return
$headers = @{
"Authorization" = "Bearer $env:API_TOKEN"
"Content-type" = "application/json"
}
image: Visual Studio 2015
environment:
matrix:
- JOB_NAME: test
JOB_DESC: "the one that should run every time"
- JOB_NAME: release
JOB_DESC: "the one that should run on the release branch"
Write-Host "Installing boost 1.83.0..." -ForegroundColor Cyan
New-Item 'C:\Libraries' -ItemType Directory -Force
Write-Host "Downloading x86..."
$exePath = "$env:TEMP\boost_1_83_0-msvc-14.3-32.exe"
(New-Object Net.WebClient).DownloadFile('https://boostorg.jfrog.io/artifactory/main/release/1.83.0/binaries/boost_1_83_0-msvc-14.3-32.exe', $exePath)
Write-Host "Installing x86..."
@OwenMcDonnell
OwenMcDonnell / appveyor.yml
Last active December 19, 2023 17:25
git-lfs-mac-test
environment:
LARGE_FILE: node-7.8.0-x64.7z
LARGE_FILE_MD5: 781ca1e775f0f9811bb552f9e08e8af0
test_script:
- cmd: dir node-7.8.0-x64.7z
- git --version
- git lfs version
- brew upgrade git-lfs
- git lfs version
@OwenMcDonnell
OwenMcDonnell / boostratp-macOS.sh
Last active January 10, 2024 21:14
Bootstrap macOS script
sudo systemsetup -setremotelogin on
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
#sudo launchctl load -w /System/Library/LaunchAgents/com.apple.screensharing.agent.plist
@OwenMcDonnell
OwenMcDonnell / rvm
Last active February 23, 2024 07:12
wrap rvm calls to rbenv
#!/bin/bash
USE=$1
VERSION=$2
OPTIONS=$3
COUNT="${VERSION//[^.]}"
echo "dot count: ${#COUNT}"
# cut version down if necessary