This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Threading; | |
using System.Net.Sockets; | |
using System.Net; | |
namespace FromAsyncLeakTest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography.X509Certificates; | |
using System.Security.Cryptography; | |
var abyPublicKey = AssemblyUtility.GetEmbeddedFileAsByteArray("WebServer.SslCertificate.cer"); | |
var abyPrivateKey = AssemblyUtility.GetEmbeddedFileAsByteArray("WebServer.SslCertificate.pvk"); | |
var certificate = new X509Certificate2(abyPublicKey, string.Empty, | |
X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable); | |
var cspParams = new CspParameters | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
namespace SwitchVsDictionary | |
{ | |
static class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dayPartToMoment(dayPart) { | |
return moment(dayPart, 'HHmm'); | |
} | |
function momentAtDayPart(moment, dayPart) { | |
return dayPartToMoment(dayPart).set({ | |
year: moment.year(), | |
month: moment.month(), | |
date: moment.date() | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
<title>Brewsheet: $NAME</title> | |
<style type="text/css"> | |
body { | |
font-size: 16px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import logging | |
import os | |
import time | |
TIER = os.environ.get('TIER') | |
MAX_OBJECTS = 10000 | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.INFO) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Amazon.Lambda.Core; | |
using Amazon.S3; | |
using Amazon.S3.Model; | |
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LINUX_PATH=$(pwd) | |
#echo ${LINUX_PATH} | |
WINDOWS_PATH="\"U:${LINUX_PATH//\//\\}\"" | |
#echo ${WINDOWS_PATH} | |
GIT_EXTENSIONS_PATH="\"/mnt/c/Program Files (x86)/GitExtensions/GitExtensions.exe\"" | |
GIT_EXTENSIONS_COMMAND="${GIT_EXTENSIONS_PATH} browse ${WINDOWS_PATH}" | |
echo ${GIT_EXTENSIONS_COMMAND} | |
eval ${GIT_EXTENSIONS_COMMAND} & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To execute this from a command prompt: | |
# curl https://gist.githubusercontent.com/BrandonLWhite/41b2a16487eef8abd193d9481dfd37f3/raw | bash | |
# TODO : Determine shell config file. (eg .profile, .zsh, etc). I guess though if we are piping this into bash it is always | |
# going to be .profile? | |
# Hell, maybe just add it to both?! | |
# Create a local user bin folder if one doesn't already exist (recent Linux distros already have this) | |
# and add it to the PATH if it isn't already there. This is so we don't have to keep adding stuff to the PATH. |