By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
using System; | |
using System.Runtime.InteropServices; | |
// ReSharper disable SuspiciousTypeConversion.Global | |
// ReSharper disable InconsistentNaming | |
namespace VideoPlayerController | |
{ | |
/// <summary> | |
/// Controls audio using the Windows CoreAudio API | |
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer |
Table of Contents generated with DocToc
#!/bin/bash | |
echo | |
echo "Processing all *.md files in current directory..." | |
echo | |
# Loop through all .md files in directory and rename spaces to dashes | |
for file in *" "*; do | |
echo "Renaming $file" | |
mv -- "$file" "${file// /-}" |
void Main()
{
GetTypeFromList(new List<string>()).Dump();
GetTypeFromFunc((string s, int i) => true).Dump();
}
public Type GetTypeFromList<TType>(IEnumerable<TType> dummy)
{
return typeof(TType);
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
Now let’s extract the certificate: | |
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
void Main() | |
{ | |
var x = XDocument.Load(@"...\packages.config") | |
.Document.Root.Elements().Select (r => r.Attribute("id").Value) | |
.Select (r => { | |
var cq = CsQuery.CQ.CreateFromUrl("https://www.nuget.org/packages/" + r); | |
return new{ | |
Package = r, | |
License = cq[".licenseName"].Html(), | |
LicenseUrl = cq["a"].Single (el => el.InnerText == "License")["href"] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
namespace YourNamespace | |
{ | |
/// <summary> | |
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine | |
/// the association between the name of the column in the query results and the member to | |
/// which it will be extracted. If no column mapping is present all members are mapped as | |
/// usual. | |
/// </summary> | |
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam> | |
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper |