Skip to content

Instantly share code, notes, and snippets.

View shawnweisfeld's full-sized avatar

Shawn Weisfeld shawnweisfeld

View GitHub Profile
@shawnweisfeld
shawnweisfeld / recursiveloop.cs
Created December 16, 2018 16:17
C# .net Core comparison of a loop vs. Recursion - digging through the local file system
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
@shawnweisfeld
shawnweisfeld / ChickTechLaptopSetup.md
Last active November 22, 2018 15:51
ChickTech Laptop Setup
# directories
**/bin/
**/obj/
**/out/
# files
Dockerfile*
**/*.trx
**/*.md
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"AppServicePlanName": {
"type": "string",
"metadata": {
"description": "The name of your ASP."
}
},
public static void Main(string[] args)
{
var host = BuildWebHost(args);
using (var scope = host.Services.CreateScope())
{
var services = scope.ServiceProvider;
try
{
  • Azure Subscription
    • We will have $100 Trial Azure Subscriptions for those that need it or attendees can use a subscription they already have access to.
    • Trial setup instructions
      • DO NOT redeem promo code with an email account that is attached to an EA, the pass will not work.
      • Promo code needs to be redeemed within 90-days of being received..
      • Only one promo code can be redeemed per the lifetime of a Live ID/Org ID. You can create a new outlook.com account to use for this trial.
      • Monetary credit can't be used toward third party services, premier support or Azure MarketPlace and cannot be added to existing subscriptions.
      • Accounts cannot be extended - the duration and monetary credit amount cannot be altered
  • If you remove the monetary cap by providing a payment instrument, you will be converted to a 'Pay-as-you-go' account at the end of the offer duration. However, if the account has expired, you will need to c
long numberOfBuckets = 10;
var fi = new FileInfo(path);
long bucketSize = fi.Length / (numberOfBuckets - 1);
Console.WriteLine($"Length: {fi.Length:N0}");
Parallel.For(0, numberOfBuckets, (i) => {
long start = i * bucketSize;
<ul class="nav navbar-nav navbar-right">
<li>@Html.ActionLink("Sign in Commercial", "SignIn", "Account", new { authType = "AADC" }, htmlAttributes: new { id = "loginLink" })</li>
<li>@Html.ActionLink("Sign in Government", "SignIn", "Account", new { authType = "AADG" }, htmlAttributes: new { id = "loginLink" })</li>
</ul>