Written for Rx.Net 2.2.5 (released July 2014)
- http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2014/02/05/rx-and-getting-paged-data-from-the-moviedb-api.aspx
- http://blogs.msdn.com/b/rxteam/archive/2012/03/12/reactive-extensions-v2-0-beta-available-now.aspx
- http://www.clipcode.net/mentoring/RxReferenceLibrary.pdf
- https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reactive.Linq; | |
class X : IObservable<int> | |
{ | |
public IDisposable Subscribe(IObserver<int> observer) | |
{ | |
return Observable.Interval(TimeSpan.FromSeconds(1)) |
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
internal class VideoExample { | |
/** | |
* Demonstrate how Rx is used to compose Observables together such as | |
* how a web service would to generate a JSON response. | |
* | |
* The simulated methods for the metadata represent different services | |
* that are often backed by network calls. | |
* | |
* This will return a sequence of dictionaries such as this: |
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 ($accessToken, $organisation) | |
(invoke-webrequest -Uri https://api.github.com/orgs/$organisation/repos?per_page=200"&"access_token=$accessToken"&"type=private).Content | ConvertFrom-Json | % {$_.clone_url} | % {git clone $_} |
"%ProgramFiles(x86)%\IIS Express\iisexpress.exe" /path:%cd%
Defaults to port 8080
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
# Paste this into the Nuget Package Manager window in Visual Studio to attach to all w3wp processes | |
$DTE.Debugger.LocalProcesses | ? Name -m "w3wp.exe" | % Attach |
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
# Also see https://cyber-defense.sans.org/blog/2015/08/23/powershell-protect-cmsmessage-example-code | |
$cert = New-SelfSignedCertificate -subject 'CN=TestCert' -Type DocumentEncryptionCert -NotAfter 2100-07-01 -TextExtension @("2.5.29.37={text}1.3.6.1.4.1.311.80.1") -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" | |
Export-Certificate -cert $cert -FilePath cert.cer | |
$ciphertext = Protect-CmsMessage -Content 'password' -To $cert.Thumbprint | |
$ciphertext | |
$plaintext = Unprotect-CmsMessage -Content $ciphertext |
OlderNewer