This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
using Xamarin.Forms; | |
namespace TimeTracker.Controls | |
{ | |
public class GridView : Grid |
This file contains 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 Add-Post { | |
param ( | |
[parameter(Mandatory=$true, Position=0)][string]$post, | |
[parameter(Mandatory=$false, Position=1)][switch]$draft | |
) | |
if(!(Assert-IsGitRepo)) { | |
throw 'you are currently not in a git repository.' | |
} | |
This file contains 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 Get-FullName { | |
param( | |
[parameter(position=0, parametersetname="a")] [string] $firstName, | |
[parameter(position=1, parametersetname="a")] [string] $lastName, | |
[parameter(position=0, parametersetname="b")] [hashtable] $name | |
) | |
if($PSCmdlet.ParameterSetName -eq 'b') { | |
# Doing recursion will allow for parameter validation if need be! | |
Get-FullName $name.first $name.last |
This file contains 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
$apiKey = "Your API Key" | |
$OctopusURL = "Your Octopus URL" | |
$Header = @{ "X-Octopus-ApiKey" = $apiKey } | |
#Getting all machines given an Environment name | |
$EnvironmentName = Read-Host 'What environment do you want to wipe out?' | |
Write-Warning "You are about to remove ALL machines from the $EnvironmentName environment." | |
$confirm = Read-Host 'Are you sure you want to continue? Y/N' |
This file contains 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 Add-ToPath{ | |
param( | |
[parameter(Mandatory=$true,position=0)][string] $pathToAdd | |
) | |
if(-NOT ($env:path.Contains($pathToAdd))) | |
{ | |
Write-Host "Adding '$pathToAdd' to your Environment Path." | |
$env:path += ";$pathToAdd" | |
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $env:path |
This file contains 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
# credit for getting me going in the right direction | |
# http://blogs.lessthandot.com/index.php/uncategorized/access-git-commits-during-a-teamcity-build-using-powershell/ | |
# these properties should be entered into your configuration parameters section | |
$project = "%Octopus.Project%" | |
$deployTo = "%Octopus.DefaultEnvironment%" | |
$buildVersion = "%BuildVersion%" | |
$octopusApiKey = "%Octopus.BuildDeployBot.APIKey%" | |
$octopusServer = "%Octopus.Server.Url%" |
This file contains 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
// self executing function keeps code off of the global namespace. | |
(function() { | |
// initialize the namespace at the top of your very first code file. | |
var ns = {}; | |
// begin declaring some classes | |
// This class is using the OBJECT LITERAL pattern | |
ns.Class1 = { | |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace FutureState.AppCore.Pages | |
{ | |
public class SegmentTab : ContentPage | |
{ | |
private Grid _grid; |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Globalization; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace perfomance | |
{ |
This file contains 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
using System; | |
using Cirrious.CrossCore; | |
using Cirrious.MvvmCross.Binding.Touch.Views; | |
using Cirrious.MvvmCross.Touch.Views; | |
using Cirrious.MvvmCross.Touch.Views.Presenters; | |
using Cirrious.MvvmCross.ViewModels; | |
using FutureState.AppCore.ViewModels; | |
using FutureState.BreathingRoom.Touch.Ui.Controllers; | |
using FutureState.BreathingRoom.Touch.Ui.Fragments; | |
using MonoTouch.UIKit; |