Skip to content

Instantly share code, notes, and snippets.

@jpreese
jpreese / build.cake
Last active September 30, 2017 01:22
ValidateNugetVersion
#addin "Cake.Powershell"
var target = Argument("target", "Default");
//////////////////////////////////////////////////////////////////////
// SETUP
//////////////////////////////////////////////////////////////////////
FilePath solution;
FilePathCollection projects;
@jpreese
jpreese / build.cake
Last active October 2, 2017 14:07
Default Task Implementation
#addin "Cake.Powershell"
var target = Argument("target", "Default");
//////////////////////////////////////////////////////////////////////
// SETUP
//////////////////////////////////////////////////////////////////////
FilePath solution;
FilePath nuspec;
package main
import (
"fmt"
"reflect"
)
func main() {
teststring := "ab世"
runes := []rune(teststring)
function RunIt() {
Write-Output "1"
Write-Output "2"
$var = 42
Write-Output "3"
return $var
}
package main
// Square immediately returns the result
func Square(number int) uint64 {
return 1 << uint64(number-1)
}
// SquareVariable first puts it into a variable
func SquareVariable(number int) uint64 {
result := 1 << uint64(number-1)
$fakeObject | Add-Member -MemberType NoteProperty -Name SomeProperty -Value 1
$anotherFakeObject = New-Object -TypeName psobject
$anotherFakeObject | Add-Member -MemberType NoteProperty -Name SomeProperty -Value 2
$numbers = @()
$numbers += $fakeObject
$numbers += $anotherFakeObject
package main
import (
"time"
)
var shutdown chan bool
func main() {
shutdown = make(chan bool)

Do you promise not to do bad things?

@jpreese
jpreese / CLA.md
Created February 11, 2019 16:54 — forked from pjcozzi/CLA.md
CLA for MIT license

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the MIT license; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the MIT license; or

resource "template_dir" "config" {
source_dir = "${path.cwd}/input"
destination_dir = "${path.cwd}/output"
}
data "null_data_source" "wait_for_config" {
inputs = {
destination_dir = "${template_dir.config.destination_dir}"
}
}