Skip to content

Instantly share code, notes, and snippets.

@maxxwizard
maxxwizard / nginx.conf
Created April 24, 2020 23:58
nginx config with RTMP server enabled
#user nobody;
# multiple workers works !
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@maxxwizard
maxxwizard / Program.cs
Last active January 8, 2019 16:19
Sudoku Checker
using System;
namespace SudokuChecker
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine($"expected = true, actual = {DoneOrNot(SuccessBoard)}");
Console.WriteLine($"expected = false, actual = {DoneOrNot(FailureBoard)}");
@maxxwizard
maxxwizard / gist:cb4fcf5746e5cbd16e40fcec264acd2d
Created January 2, 2017 17:17
AllowImmediateReboot error
{
"Exception": {
"Message": "The PowerShell DSC resource \u0027[xExchInstall]InstallExchange\u0027 with SourceInfo \u0027::55::9::xExchInstall\u0027 threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.",
"Data": {
},
"InnerException": {
"Message": "A parameter cannot be found that matches parameter name \u0027AllowImmediateReboot\u0027.",
"ParameterName": "AllowImmediateReboot",
"ParameterType": null,
@maxxwizard
maxxwizard / Exchange2013Server.ps1
Created December 21, 2016 06:58
xExchange deploy 2013 from internet [Script resource version]
Configuration Exchange2013Server
{
Import-DscResource -Module PSDesiredStateConfiguration
Import-DscResource -Module xPSDesiredStateConfiguration
Import-DscResource -Module xPendingReboot
Import-DscResource -Module xExchange
if ($env:computername -ne "MAHUYNH-ANTEC")
{
$creds = Get-AutomationPSCredential -Name $ConfigurationData.NonNodeData.AzureAutomationCredentialName
@maxxwizard
maxxwizard / Exchange2016Server.ps1
Created December 21, 2016 04:37
xExchange install 2016 from internet
Configuration Exchange2016Server
{
Import-DscResource -Module PSDesiredStateConfiguration
Import-DscResource -Module xPSDesiredStateConfiguration
Import-DscResource -Module xPendingReboot
Import-DscResource -Module xExchange
Import-DscResource -Module xStorage
if ($env:computername -ne "MAHUYNH-ANTEC")
{
@maxxwizard
maxxwizard / Exchange2013Server.ps1
Created December 21, 2016 04:34
xExchange install 2013 from internet
Configuration Exchange2013Server
{
Import-DscResource -Module PSDesiredStateConfiguration
Import-DscResource -Module xPSDesiredStateConfiguration
Import-DscResource -Module xPendingReboot
Import-DscResource -Module xExchange
if ($env:computername -ne "MAHUYNH-ANTEC")
{
$creds = Get-AutomationPSCredential -Name $ConfigurationData.NonNodeData.AzureAutomationCredentialName