"%ProgramFiles(x86)%\IIS Express\iisexpress.exe" /path:%cd%
Defaults to port 8080
# 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 |
# 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 |
"%ProgramFiles(x86)%\IIS Express\iisexpress.exe" /path:%cd%
Defaults to port 8080
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 $_} |
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: |
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)) |
Written for Rx.Net 2.2.5 (released July 2014)
powershell -command "ipmo WebAdministration; (gi $(gi 'iis:\Sites\Default Web Site\VDIR').physicalpath).parent.fullname | write-host" > destinationtmp.txt | |
SET /p DESTINATION=<destinationtmp.txt | |
del destinationtmp.txt |
A demo of the d3.interpolateZoom plugin. See http://bl.ocks.org/rbirkby/5598350 Reduced from http://bl.ocks.org/mbostock/3828981