(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
function Out-Diff { | |
<# | |
.Synopsis | |
Redirects a Universal DIFF encoded text from the pipeline to the host using colors to highlight the differences. | |
.Description | |
Helper function to highlight the differences in a Universal DIFF text using color coding. | |
.Parameter InputObject | |
The text to display as Universal DIFF. | |
#> | |
[CmdletBinding()] |
/* | |
* This work (Modern Encryption of a String C#, by James Tuley), | |
* identified by James Tuley, is free of known copyright restrictions. | |
* https://gist.github.com/4336842 | |
* http://creativecommons.org/publicdomain/mark/1.0/ | |
*/ | |
using System; | |
using System.IO; | |
using System.Text; |
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Call this from inside a startup task/batch file as shown in the next two lines (minus the '# ') | |
# PowerShell -ExecutionPolicy Unrestricted .\HardenSsl.ps1 >> log-HardenSsl.txt 2>&1 | |
# EXIT /B 0 | |
# Credits: | |
# http://azure.microsoft.com/blog/2014/10/19/how-to-disable-ssl-3-0-in-azure-websites-roles-and-virtual-machines/ | |
# http://lukieb.blogspot.com/2014/11/tightening-up-your-azure-cloud-service.html | |
$nl = [Environment]::NewLine | |
$regkeys = @( |
Add-Type -Path "Serilog.dll" | |
Add-Type -Path "Serilog.Sinks.Seq.dll" | |
Add-Type -Path "Serilog.Sinks.EventLog.dll" | |
Add-Type -Path "Serilog.FullNetFx.dll" | |
Add-Type -Path "Serilog.Extras.AppSettings.dll" | |
Add-Type -Path "Serilog.Extras.Timing.dll" | |
$Config = New-Object Serilog.LoggerConfiguration | |
[Serilog.Configuration.LoggerSinkConfiguration]$ConfigSink = $config.WriteTo | |
[Serilog.Log]::Logger = [Serilog.LoggerConfigurationFullNetFxExtensions]::RollingFile($ConfigSink, "C:\Logs\Log-{Date}.txt", ([Serilog.Events.LogEventLevel]::Verbose), "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}", $null, 10000000, 15).CreateLogger() |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
public class Encrypted { | |
public string Value { get; set; } | |
public string Salt { get; set; } | |
} |
# | |
# Generates a new cert in a .pfx file | |
# | |
param( | |
[Parameter(Mandatory = $true)] | |
$Name, | |
[Parameter(Mandatory = $true)] | |
$Password, | |
$Duration = 120 |