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
@SyntaxC4
SyntaxC4 / config.hdf
Last active December 28, 2015 04:48
Upstart script for hhVM on Ubuntu 13.04
Server {
SourceRoot = /var/www
}
@SyntaxC4
SyntaxC4 / SetPHPVersion.ps1
Created September 23, 2013 09:49
Explicitly Set PHP Version for a Windows Azure Web Site
Set-AzureWebsite -PhpVersion 5.3 -Name <site-name>
@SyntaxC4
SyntaxC4 / wincache.php
Created August 23, 2013 07:07
This Gist contains the sample code which is available on http://windowsazurewebsitescheatsheet.info.
<?php
/*
+----------------------------------------------------------------------------------------------+
| Windows Cache for PHP |
+----------------------------------------------------------------------------------------------+
| Copyright (c) 2009, Microsoft Corporation. All rights reserved. |
| |
| Redistribution and use in source and binary forms, with or without modification, are |
| permitted provided that the following conditions are met: |
| - Redistributions of source code must retain the above copyright notice, this list of |
@SyntaxC4
SyntaxC4 / .user.ini
Last active December 20, 2015 06:09
ZendGuard .user.ini file for Windows Azure Web Sites
[WinCache]
wincache.fcenabled=Off
[ZendGuard]
;zend_loader.enable=1
;zend_loader.disable_licensing=0
;zend_loader.obfuscation_level_support=3
;zend_loader.license_path=
@SyntaxC4
SyntaxC4 / info.php
Created May 25, 2013 07:18
Just a simple phpinfo file.
<?php
echo phpinfo();
?>
{
"require": {
"microsoft/windowsazure": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
[PHP_WINCACHE]
extension=php_wincache.dll
<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"
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
#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]