This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param | |
( | |
[string] $ThemeURL, | |
[string] $ConfigPath = "~\AppData\Roaming\ConEmu.xml" | |
) | |
cls | |
$ErrorActionPreference = "Stop" | |
#Config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
#Docker Engine and Compose needs to be installed or added to provision. | |
ip_address = "192.168.30.30" | |
hostname = 'dockerbox.dev' | |
subdomains = ['git.dockerbox.dev', 'whoami.dockerbox.dev', 'jenkins.dockerbox.dev'] | |
Vagrant.configure(2) do |config| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p /opt/bin | |
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose | |
chmod +x /opt/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/coreos/coreos-vagrant/ | |
cd coreos-vagrant | |
cp {config.rb.sample,config.rb} | |
sed -i 's/#$forwarded_ports = {}/$forwarded_ports = { 8080 => 8080 }/g' config.rb | |
vagrant up | |
vagrant ssh | |
docker run -d --name web1 -p 8080:80 tutum/hello-world | |
exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Work in Progress | |
Sync-Modules -Package ("PSGallery/Pester:3.4.*", "PSGallery/PSake:*") -Scope CurrentUser -Force | |
Module version for Pester must be in the rage: <= 3.4.0 and > 3.5 | |
Module version for PSake: latest | |
#> | |
function Sync-Modules | |
{ | |
[CmdletBinding()] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Example | |
Import-Module -Name BuildHelpers | |
Set-BuildEnvironment | |
$ModuleInfo = @{ | |
RepoName = 'PoshRepo' | |
RepoPath = '\\server\PoshRepo' | |
ModuleName = 'BuildHelpersTest' | |
ModulePath = '.\BuildHelpersTest.psd1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$repoName = 'PoshGallery' | |
$repoPath = '\\server\PoshGallery' | |
$moduleName = 'MyModule' | |
$modulePath = 'C:\Temp\MyModule.psd1' # Jenkins would determine path | |
# Resister SMB Share | |
if(!(Get-PSRepository -Name $repoName -ErrorAction SilentlyContinue)) | |
{ | |
Register-PSRepository -Name $repoName -SourceLocation $repoPath -InstallationPolicy Trusted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A task runner that invokes Pester to run all Pester tests under the | |
// current workspace folder. | |
// NOTE: This Test task runner requires an updated version of Pester (>=3.4.0) | |
// in order for the problemMatcher to find failed test information (message, line, file). | |
// If you don't have that version, you can update Pester from the PowerShell Gallery | |
// with this command: | |
// | |
// PS C:\> Update-Module Pester | |
// | |
// If that gives an error like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Lagrange Interpolation Example | |
#> | |
function Point($x, $y) | |
{ | |
return [pscustomobject]@{ | |
PSTypeName = 'Point' | |
x = $x | |
y = $y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Send-WakeOnLan | |
{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$True, Position=1, ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True)] | |
[Alias("Name")] | |
[string[]] $ComputerName | |
) | |
Begin |