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 New-Prototype { | |
param($baseObject = (new-object object)) | |
$prototype = [PSObject]::AsPSObject($baseObject) | |
$prototype.PSObject.TypeNames.Insert(0,"Prototype") | |
$prototype | |
} | |
filter New-Property { | |
param( | |
[string]$name, |
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
$foo = @{ | |
Message = "This is a pre-recorded message" | |
} | |
$foo.say = { | |
param([string]$message) | |
$speaker = new-object -com SAPI.SpVoice | |
($speaker.Speak($message, 1)) | out-null | |
} |
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
public static class SpinWhileExtension | |
{ | |
public static IObservable<TSource> SpinWhile<TSource>(this IObservable<TSource> source, Func<bool> predicate) | |
{ | |
return source.SpinWhile(predicate, TimeSpan.Zero, () => { }, () => { }); | |
} | |
public static IObservable<TSource> SpinWhile<TSource>(this IObservable<TSource> source, Func<bool> predicate, TimeSpan sleep) | |
{ | |
return source.SpinWhile(predicate, sleep, () => { }, () => { }); |
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
Please wait for a Samsung Agent to respond. | |
You are now chatting with 'Suzanne'. There will be a brief survey at the end of our chat to share feedback on my performance today. | |
Your Issue ID for this chat is LTK5640844954X | |
Suzanne: Hi, thank you for contacting Samsung Technical Support. How may I help you today? | |
Visitor: I have a galaxy s2 SGH-T98 | |
Suzanne: Please let me know how I may help you. | |
Visitor: I downloaded kies Kies_2.1.0.11112_41_7 from the device support site | |
Visitor: when I start the app. it instantly crashes every time with a MemoryAccessViolationException | |
Suzanne: Please let me know the issue, so that I can help you. | |
Visitor: I can pull out the stack track from Visual Studio if you like |
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
C:\dev\fubumvc [master]> rake | |
rake aborted! | |
Run `git submodule update --init` to populate your buildsupport folder. | |
(See full trace by running task with --trace) | |
C:\dev\fubumvc [master +0 ~0 -1]> git submodule update --init | |
Submodule 'buildsupport' () registered for path 'buildsupport' | |
fatal: unable to connect to github.com: | |
github.com[0: 207.97.227.239]: errno=No error |
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
<?xml version="1.0"?> | |
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | |
<id>Issue1949</id> | |
<version>0.2.2</version> | |
<authors>Ian Davis</authors> | |
<requireLicenseAcceptance>true</requireLicenseAcceptance> | |
<licenseUrl>https://raw.github.com/idavis/Toji/master/LICENSE.txt</licenseUrl> | |
<description>Toji is a bootstrapping project for setting up psake builds.</description> | |
<summary>Custom brewed psake goodness</summary> |
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
public class Foo { | |
public void Bar() { | |
if(IsBaz()) { | |
Console.WriteLine("CRAP"); | |
} else { | |
Console.WriteLine("W00T"); | |
} | |
} | |
public bool IsBaz() { |
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
require 'autotest/growl' | |
require 'autotest/fsevent' if RUBY_PLATFORM =~ /darwin/ |
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
public void Sample() | |
{ | |
for ( int i = 0; i < 100; i++ ) | |
{ | |
Console.WriteLine(Locator.GetLocationNear()); | |
} | |
} | |
using System; |
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-XADUserPasswordExpirationDate { | |
param ([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, HelpMessage="Identity of the Account")] | |
$accountIdentity) | |
$accountObj = Get-ADUser $accountIdentity -properties PasswordExpired, PasswordNeverExpires, PasswordLastSet | |
if ($accountObj.PasswordExpired) { | |
Write-Host ("Password of account: $($accountObj.Name) already expired!") | |
return | |
} |