Skip to content

Instantly share code, notes, and snippets.

View petermorlion's full-sized avatar

Peter Morlion petermorlion

View GitHub Profile
@eivindivine
eivindivine / gist:83cbfbf2efb97575ec7c1268459a05a0
Created December 3, 2020 12:33
net-core-appsettings-json-variable-replacement-in-appveyor-deploy.ps1
Write-Host "Environment Variable Substitution"
$prefix = ${env:APPLICATION_PREFIX} + "*"
$props = gci env:$prefix | Select-Object -Property Name, Value
$configPath = "$env:APPLICATION_PATH\$env:CONFIG_FILE"
Write-Output "Loading config file from $configPath"
$appSettings = Get-Content -Raw $configPath | ConvertFrom-Json
@helgatheviking
helgatheviking / wc-add-field-to-variation.php
Created October 30, 2019 00:51
Example of how to add custom fields to WooCommmerce variations admin and display on front end.
<?php
/**
* Plugin Name: Add sample field to variations
* Plugin URI: https://kathyisawesome.com/
* Description: Example of how to add custom fields to variations admin and display on front end.
* Version: 0.1.0
* Author: helgatheviking
* Author URI: https://kathyisawesome.com
* Text Domain: extra-variation-data
*
using System.Linq;
using Autofac;
using Autofac.Builder;
using Autofac.Core;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Tests
{
[TestClass]
public class When_container_builder_is_build
#!/bin/sh
SOLUTION_FILE="src/Foo.sln"
MSBUILD_PATH="C:/Windows/Microsoft.NET/Framework64/v4.0.30319/MSBuild.exe"
NUGET_PATH="nuget"
NUGET_SOURCE="https://www.myget.org/F/myfeed/"
NUNIT_PATH="src/Packages/NUnit.Runners.2.6.3/tools/nunit-console.exe"
NUGET_PROJECTS=("src/Foo.Client/Foo.Client.csproj")