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 / manualsas.cs
Created May 14, 2013 11:06
Manually create blob shared access signature
namespace SASManually
{
using System;
using System.Security.Cryptography;
using System.Text;
class Program
{
public static string MakeBlobReadSignature(
string accountname, string accountkey, DateTime? starttime, DateTime? endtime, string container, string blobname)
class VM {
public name: KnockoutObservableString = ko.observable("");
public commits: KnockoutObservableArray = ko.observableArray();
public changeName: () => void;
constructor(name: string) {
this.name(name);
this.changeName = () => { this.name("Fumbler"); };
}
}
<?php
error_reporting(E_ALL);
require_once "azure_sdk/library/Microsoft/WindowsAzure/Storage/Blob.php";
define("STORAGE_ACCOUNT_NAME", "......");
define("STORAGE_ACCOUNT_KEY", "......");
$storageClient = new Microsoft_WindowsAzure_Storage_Blob('blob.core.windows.net', STORAGE_ACCOUNT_NAME, STORAGE_ACCOUNT_KEY);
@chgeuer
chgeuer / setup_env.cmd
Created June 19, 2013 13:48
My Environment
SET _CSRUN_STATE_DIRECTORY=C:\A
@chgeuer
chgeuer / CreateSnapshotURI.cs
Created July 24, 2013 09:13
Compute the snapshot URI for an Azure blob
Microsoft.WindowsAzure.Storage.Blob.CloudPageBlob snapshot = ...;
var builder = new Microsoft.WindowsAzure.Storage.Core.UriQueryBuilder();
builder.Add("snapshot", snapshot.SnapshotTime.Value.ToUniversalTime()
.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffff'Z'", CultureInfo.InvariantCulture));
string uriRequest = builder.AddToUri(snapshot.Uri).AbsoluteUri;
@chgeuer
chgeuer / gist:6112131
Created July 30, 2013 11:22
#WindowsAzure VM shutdown PostShutdownAction StoppedDeallocated
POST https://management.core.windows.net/ ..... subscriotion guid ... /services/hostedservices/golzheimcms/deployments/golzheimcms/roleInstances/golzheimcms/Operations HTTP/1.1
Host: management.core.windows.net
Content-Type: application/xml; charset=utf-8
x-ms-version: 2013-06-01
<ShutdownRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<OperationType>ShutdownRoleOperation</OperationType>
<PostShutdownAction>StoppedDeallocated</PostShutdownAction>
</ShutdownRoleOperation>
@chgeuer
chgeuer / gist:6112133
Created July 30, 2013 11:23
makecert command line
makecert -r -pe -n "CN=Christian Geuer-Pollmann Azure Management Certificate" -a sha1 -ss My -len 2048 -sy 24 -b 01/01/2013 -e 12/31/2099
@chgeuer
chgeuer / gist:6112134
Created July 30, 2013 11:23
makecert command line
makecert -r -pe -n "CN=Christian Geuer-Pollmann Azure Management Certificate" -a sha1 -ss My -len 2048 -sy 24 -b 01/01/2013 -e 12/31/2099
@chgeuer
chgeuer / Install-Erlang.ps1
Created January 9, 2014 21:24
Install Erlang via command line
#
# Check if Erlang is installed
#
$erlangkey = Get-ChildItem HKLM:\SOFTWARE\Wow6432Node\Ericsson\Erlang -ErrorAction SilentlyContinue
if ( $erlangkey -eq $null ) {
Write-Host "Erlang not found, need to install it"
Start-Process -Wait otp_win64_R16B03.exe /S
}
#