Written for Rx.Net 2.2.5 (released July 2014)
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.IO; | |
using System.Linq; | |
using System.Xml.Linq; | |
class TenCSharpOneLiners | |
{ | |
static void Main() | |
{ |
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
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 $_} |
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; | |
class Program { | |
static void Main() { | |
WriteAmount(new DateTime(2008, 11, 01), 1.00M); | |
WriteAmount(new DateTime(2009, 01, 01), 1.00M); | |
WriteAmount(new DateTime(2010, 12, 01), 1.00M); | |
WriteAmount(new DateTime(2011, 12, 01), 1.00M); | |
} |
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
# 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 |
A demo of the d3.interpolateZoom plugin. See http://bl.ocks.org/rbirkby/5598350 Reduced from http://bl.ocks.org/mbostock/3828981
I quite agree that a dogmatic or religious application of the SOLID principles is neither realistic nor beneficial. If you had read through any of the articles and/or books I’ve written on these principles over the last 15 years, you’d have found that I don’t recommend the religious or dogmatic approach you blamed me for. In short, you jumped to a erroneous conclusion about me, and about the principles, because you weren’t familiar with the material.
Robert C. Martin
https://sites.google.com/site/unclebobconsultingllc/an-open-letter-to-joel-spolsky-and-jeff-atwood
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
#include "LedControl.h" | |
#define DIN 2 | |
#define CLK 3 | |
#define LOAD 4 | |
LedControl lc=LedControl(DIN, CLK, LOAD, 1); | |
unsigned long delaytime=20; | |
void setup() { |
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
# 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 |
NewerOlder