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
// doesn't detect Never() | |
public static IObservable<bool> IsAlive_Merge<T>(this IObservable<T> source, TimeSpan timeout, IScheduler sched) | |
{ | |
return source.Select(_ => true) | |
.Merge(source.Select(_ => false).Throttle(timeout, sched)) | |
.DistinctUntilChanged(); | |
} | |
// D.Moore, 29 May: using the buffer count should cause this to fire as soon as it's available. | |
public static IObservable<bool> IsAlive_Buffer<T>(this IObservable<T> source, TimeSpan timeout, IScheduler sched) |
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
Get-ChildItem $psScriptRoot -filter *.ps1 | foreach { . $_.FullName } | |
if(Get-Module prompt) { Remove-Module prompt } | |
$prompt_kind = if($args[0]) { $args[0] } else { "bash" } | |
if($prompt_kind -eq "bash") { | |
function prompt { | |
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
# Git functions | |
# Mark Embling (http://www.markembling.info/) | |
# Is the current directory a git repository/working copy? | |
function isCurrentDirectoryGitRepository { | |
if ((Test-Path ".git") -eq $TRUE) { | |
return $TRUE | |
} | |
# Test within parent dirs |