Skip to content

Instantly share code, notes, and snippets.

View chgeuer's full-sized avatar
🏠
Working from Düsseldorf

Dr. Christian Geuer-Pollmann chgeuer

🏠
Working from Düsseldorf
View GitHub Profile
@chgeuer
chgeuer / Windows8ForAzureMobileServicesConverters.cs
Created September 3, 2012 08:36
This sample illustrates how we can simply bring more complex data types into Azure Mobile Services.
namespace Sample
{
using System;
using System.Runtime.Serialization;
using System.Xml.Linq;
using Windows.Data.Json;
using Microsoft.WindowsAzure.MobileServices;
/// <summary>
@chgeuer
chgeuer / 4mario.sample
Created September 20, 2012 12:50
Für Mario
public override bool OnStart()
{
Trace.TraceInformation("OnStart() called");
MicrosoftCorpnetAuthenticationFixer.TweakIdentityWhenRunningInCorpnet();
TimeSpan scheduledTransferPeriod = TimeSpan.FromMinutes(1);
ServicePointManager.DefaultConnectionLimit = 12;
DiagnosticMonitorConfiguration diagConfig = DiagnosticMonitor.GetDefaultInitialConfiguration();
diagConfig.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Information;
diagConfig.DiagnosticInfrastructureLogs.ScheduledTransferPeriod = scheduledTransferPeriod;
$vmname = "ptvlinux1"
$linuxUser = "ptvadmin"
$adminPassword = "!!test123"
$imagename = "ptv-itb-test1-linux-galleryimage"
$subnet = "azure2b"
$affinitygroup = "ptvtest"
$vnetname = "azure253"
$media = "https://portalvhdszxpyfbp32jw28.blob.core.windows.net/vhds/ptv-itb-1.vhd"
$cloudSvcName = "ptvlinux1"
@chgeuer
chgeuer / rename-iplusplus.ps1
Created November 21, 2012 20:07
PS1 Rename
function Rename-ItemsPrepend {
[CmdletBinding()]
param
(
[Parameter(Mandatory=$True,
ValueFromPipeline=$False,
ValueFromPipelineByPropertyName=$True,
HelpMessage='Which number should be first prefixed')]
[int]$start
)
@chgeuer
chgeuer / wrapException.cs
Created December 4, 2012 17:35
Display Exceptions in Windows 8
private async void showPotentialException(Func<System.Threading.Tasks.Task> a)
{
string message = null;
try
{
await a();
}
catch (Exception ex)
{
message = ex.Message;
using Elmah;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using Microsoft.WindowsAzure.Storage.Table.DataServices;
using System;
using System.Collections;
using System.Data.Services.Client;
using System.Linq;
using System.Threading.Tasks;
@chgeuer
chgeuer / aspnetwebstacknightly.md
Last active December 15, 2015 10:19
Add ASP.NET Nightly Builds to Visual Studio and ensure they are updated on Windows Azure Web Sites

Add ASP.NET Nightly Builds to Visual Studio and ensure they are updated on Windows Azure Web Sites

Configure Visual Studio

Configure NuGet

@chgeuer
chgeuer / SAS.cs
Created April 11, 2013 13:11
Create and check own SAS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HMac
{
class Program
{
@chgeuer
chgeuer / LInq Powershell.ps1
Created April 15, 2013 08:12
Tweak an XML Document with Powershell and LINQ
[Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")
$roleroot = Get-Content Env:\RoleRoot
$pathToPhp = "$roleroot\approot\php\php-cgi.exe";
$content = [System.IO.File]::ReadAllText("C:\PHP\web.config");
$doc = [System.Xml.Linq.XDocument]::Parse($content);
$elements = $doc.Element("configuration").Element("system.webServer").Element("handlers").Elements("add");