Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Diagnostics;
using System.Linq;
using CyberCoders.Background.Diagnostics;
using CyberCodersEmailProcessor.Bounce.Data;
using CyberCodersEmailProcessor.Bounce.EmailParsing;
using CyberCodersEmailProcessor.Bounce.Exchange;
using Humanizer;
using Microsoft.Exchange.WebServices.Data;
using NLog;
"AppStatus": "Enabled",
"ImageDeleteAfterTimeSpan": "7.00:00:00",
"WallpaperOverrideUrl": "",
"Search": {
"DefaultOptions": {
"Filters": "Size:Large",
"Adult": "Moderate",
"MinWidth": 1920,
"MinHeight": 1080,
// left join as a safety precaution
jobAdPosts = (from b in SqlContext.JobBoards
join jap in SqlContext.JobAdPosts on new { JobBoardId = b.Id, JobAdId = vm.JobAd.Id } equals new { jap.JobBoardId, jap.JobAdId } into j1
from jap in j1.DefaultIfEmpty()
where b.IsActive
orderby b.SortOrder ascending
select jap).ToList();
System.Data.SqlTypes.SqlNullValueException was unhandled by user code
Message=Data is Null. This method or property cannot be called on Null values.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i)
at HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProfiledDataReader.GetInt32(Int32 ordinal)
at System.Data.Entity.Core.Objects.Internal.ShapedBufferedDataRecord.ReadInt(DbDataReader reader, Int32 ordinal)
at System.Data.Entity.Core.Objects.Internal.ShapedBufferedDataRecord.Initialize(DbDataReader reader, DbSpatialDataReader spatialDataReader, Type[] columnTypes, Boolean[] nullableColumns)
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
<!-- ... -->
<nlog xmlns:xsi="" throwExceptions="false">
<targets async="true">
<!-- size in bytes: 10485760 = 10 MB - set to 5 for most -->
<!-- master/all/combined log file -->
<target name="allTarget" xsi:type="File" fileName="${basedir}/logs/log-all.txt" layout="${time}|${level:uppercase=true}|${threadid}|${logger}|${message}" archiveAboveSize="10485760" archiveNumbering="Sequence" archiveFileName="${basedir}/logs/archive/log-all.{#####}.txt" maxArchiveFiles="3" keepFileOpen="false" deleteOldFileOnStartup="true" />
<!-- logs scheduling/job/quartz related separately -->
<target name="scheduleTarget" xsi:type="File" fileName="${basedir}/logs/log-schedule.txt" layout="${time}|${level:uppercase=true}|${threadid}|${logger}|${message}" archiveAboveSize="5242880" archiveNumbering="Sequence" archiveFileName="${basedir}/logs/archive/log-schedule.{#####}.txt" maxArchiveFiles="3" keepFileOpen="false" deleteOldFileOnStartup="true" />
<nlog xmlns:xsi=""
<!-- size in bytes: 10485760 = 10 MB - set to 5 for most -->
<!-- master/all/combined log file -->
<target name="asyncAllTarget"
REM This is intended to be run only via the self-extracting zip exe created by build.
REM It copies extracted files to a known location in the event of an error, re-deploy, logging output etc.
REM It then hands off the real work to PowerShell for the deployment
@echo off
mode con cols=120
echo You are here: %~dp0
echo Copying extracted files to a known location
thnk2wn / My-GitUtilities.psm1
Last active September 7, 2017 05:33
Misc. Git Utility Module - Help, Applying Stash by Message, Deleting Merged Branches etc.
$instructionColor = "green"
$headerColor = "yellow"
$cheatCategories = @("branch", "commit", "diff", "history", "remote", "stage", "stash", "undo")
function Get-GitCheatSheet
[Parameter(Mandatory=$false, Position=0)]
private void InstallOpenCoverFromLocalPackage()
var settings = new NuGetInstallSettings
//Source = new[] { @"..\Tools\LocalPackages\" },
Source = new[] { @"C:\Some\FullPath\Tools\LocalPackages" },
OutputDirectory = "tools"