Skip to content

Instantly share code, notes, and snippets.

View SyntaxC4's full-sized avatar
🏠
Working from home

Cory Fowler SyntaxC4

🏠
Working from home
View GitHub Profile
using System;
using System.Linq.Expressions;
using System.Text.RegularExpressions;
using System.Web.Mvc;
using System.Web.Mvc.Html;
public static class ValidationExtensions
{
public static MvcHtmlString ValidationMessageLabelFor<TModel, TProperty>(this HtmlHelper<TModel> html, Expression<Func<TModel, TProperty>> expression, string errorClass = "error")
{
// Developer: Cory Fowler
// Company: SyntaxC4 Development Services
// Description: Adds Type Safety and Saves Memory over Class
namespace WageCalculator.Abstractions
{
public struct OvertimeRates
{
public const float Regular = 1.0f;
public const float Time_And_A_Half = 1.5f;
namespace Net.SyntaxC4.Blog.Examples
{
using System;
using System.Linq.Expressions;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using System.Web.Routing;
public static class HtmlExtensions
{
@echo off
IF "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO End
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" GOTO x64
:x64
sc config wuauserv start= demand
GOTO End
:End
#Gracefully Add the Windows Azure Service Management SnapIn
Add-PSSnapin -Name AzureManagementToolsSnapIn -ErrorAction SilentlyContinue
#Collect Required Variables
$serviceName = $args[0]
$slot = $args[1]
$subscriptionId = $args[2]
$certThumb = $args[3]
$package = $args[4]
$label = $args[5]
param([string]$DecryptionToken, [string]$DecryptionKey, [string]$ValidationToken, [string]$ValidationKey)
Import-Module WebAdministration
Foreach ($site in Get-Website IIS:\Sites) {
$curSite = $site.Name.ToString()
Set-WebConfigurationProperty /system.web/machinekey -PSPath "IIS:\Sites\$curSite" -Name Decryption -Value $DecryptionToken
Set-WebConfigurationProperty /system.web/machinekey -PSPath "IIS:\Sites\$curSite" -Name DecryptionKey -Value $DecryptionKey
<DiagnosticMonitorConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"
configurationChangePollInterval="PT1M"
overallQuotaInMB="4096">
<DiagnosticInfrastructureLogs bufferQuotaInMB="1024"
scheduledTransferLogLevelFilter="Verbose"
scheduledTransferPeriod="PT1M" />
<Logs bufferQuotaInMB="1024"
scheduledTransferLogLevelFilter="Verbose"
[PHP_WINCACHE]
extension=php_wincache.dll
{
"require": {
"microsoft/windowsazure": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
@SyntaxC4
SyntaxC4 / info.php
Created May 25, 2013 07:18
Just a simple phpinfo file.
<?php
echo phpinfo();
?>