Skip to content

Instantly share code, notes, and snippets.

View shawnweisfeld's full-sized avatar

Shawn Weisfeld shawnweisfeld

View GitHub Profile
public class HomeController : Controller
{
public ActionResult Index()
{
return new ContentResult()
{
Content = Environment.MachineName
};
}
}
using DistributedMutex;
using Microsoft.WindowsAzure.Storage;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using OfficeOpenXml;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ProjectGordon.ConsoleApp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectGordon.ConsoleApp
{
/// <summary>
/// Use the ColumnAttribute to decorate properties on classes you want to read/write to excel.
<?php
/**
* Plugin Name: Port Pinger
* Plugin URI: http://www.shawnweisfeld.com/
* Description: the goal of this plugin is to test outbound connectivity to a given URI and port
* Version: 0.1
* Author: Shawn Weisfeld
* Author URI: http://www.shawnweisfeld.com
* License: GPL12
*/
azure account env add --environment "AzureGovernment" --active-directory-endpoint-url "https://login.microsoftonline.com" --active-directory-graph-api-version "2013-04-05" --active-directory-graph-resource-id "https://graph.windows.net/" --active-directory-resource-id "https://management.core.usgovcloudapi.net/" --gallery-endpoint-url "https://gallery.usgovcloudapi.net/" --management-endpoint-url "https://management.core.usgovcloudapi.net" --portal-url "https://manage.windowsazure.us" --publishing-profile-url "https://manage.windowsazure.us/publishsettings/index" --resource-manager-endpoint-url "https://management.usgovcloudapi.net" --sql-management-endpoint-url "https://management.core.usgovcloudapi.net:8443/" --sql-server-hostname-suffix ".database.usgovcloudapi.net" --storage-endpoint-suffix "core.usgovcloudapi.net"
azure account import "C:\<<Path to your file>\<<your filename>>.publishsettings"
azure login --username "[email protected]" --password "password" --environment "AzureUSGovernment"
@shawnweisfeld
shawnweisfeld / Unary.cs
Created March 2, 2016 03:29
EF Unary Relationship with Child Collection and Parent Object
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EFUnary
@shawnweisfeld
shawnweisfeld / Unary2.cs
Created March 2, 2016 03:39
setting a child page
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EFUnary