Skip to content

Instantly share code, notes, and snippets.

View OwenMcDonnell's full-sized avatar

Owen McDonnell OwenMcDonnell

View GitHub Profile
@OwenMcDonnell
OwenMcDonnell / ruby_install.ps1
Created July 26, 2024 07:12
Install Ruby versions with defaults on AppVeyor CI
$rubies = @(
@{
"version" = "Ruby 2.6.9-1"
"install_path" = "C:\Ruby26"
"download_url" = "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.9-1/rubyinstaller-2.6.9-1-x86.exe"
"devkit_url" = ""
"devkit_paths" = @()
"bundlerV2" = $true
}
@{
{
"info": {
"title": "Win32/Win64 OpenSSL Installer Hashes",
"description": "Latest file hashes for Win32/Win64 OpenSSL installers.",
"source": "https://github.com/slproweb/opensslhashes/",
"alt_source": "https://github.com/slproweb/opensslhashes/raw/master/win32_openssl_hashes.json",
"website": "https://slproweb.com/products/Win32OpenSSL.html"
},
"files": {
"Win32OpenSSL-1_1_1w.exe": {
@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
@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 / 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
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..."
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"
@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"
}
@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 / 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"