Skip to content

Instantly share code, notes, and snippets.


Jeremy Simmons jeremysimmons

View GitHub Profile
jeremysimmons / .gitignore
Created Oct 9, 2021 — forked from salcode/.gitignore
Please see for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
View .gitignore
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
# From the root of your project run
# curl -O
# to download this file
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
jeremysimmons / checkpoint-dismiss.js
Created Sep 30, 2021
Automatically dismiss CheckPoint access warning pages
View checkpoint-dismiss.js
// ==UserScript==
// @name Dismiss Checkpoint Access Warning
// @namespace checkpoint
// @version 1
// @description automatically dismiss the checkpoint access pages so I don't have to.
// @author Jeremy Simmons
// @match *://*
// @grant none
// @run-at document-idle
// ==/UserScript==
jeremysimmons / exceptions.cs
Last active Mar 27, 2020
c# throwing exceptions
View exceptions.cs
// For example, in .NET if an exception is thrown/re-thrown from the catch block, then the finally block will not execute.
throw new Exception("intentional");
Console.WriteLine("will not print");
View azure-vote.yaml
apiVersion: apps/v1
kind: Deployment
name: azure-vote-back
replicas: 1
app: azure-vote-back
jeremysimmons / VS Project GUIDS
Created Jan 7, 2019
visual studio project guids
View VS Project GUIDS
ASP.NET 5 {8BB2217D-0F2D-49D1-97BC-3654ED321F3B}
ASP.NET MVC 1 {603C0E0B-DB56-11DC-BE95-000D561079B0}
ASP.NET MVC 2 {F85E285D-A4E0-4152-9332-AB1D724D3325}
ASP.NET MVC 3 {E53F8FEA-EAE0-44A6-8774-FFD645390401}
ASP.NET MVC 4 {E3E379DF-F4C6-4180-9B81-6769533ABE47}
ASP.NET MVC 5 {349C5851-65DF-11DA-9384-00065B846F21}
C# {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
C++ {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
jeremysimmons / scheduled_tasks.ps1
Created Jan 31, 2018
show the LastRunTime of scheduled task
View scheduled_tasks.ps1
Get the list of scheduled Tasks from Windows 7 or Windows 2008 computers
This script displays all the scheduled tasks available in a windows 7 or windows 2008 computer.
.Parameter ComputerName
Computer Name(s) from which you want to get the scheduled tasks information. If this
parameter is not used, the the script gets the scheduled tasks list from local computer.
jeremysimmons / SelfCompile
Created Jan 30, 2018 — forked from plaurin/SelfCompile
Self Compiling LinqPad query
View SelfCompile
void Main()
Environment.CurrentDirectory = Path.GetDirectoryName(Util.CurrentQueryPath);
@namespace: "LinqPad.QueriesCompiler",
outputFile: "LinqPad.QueriesCompiler.dll")
.AddCodeFile(CodeType.LinqProgramTypes, Util.CurrentQueryPath))
.Dump("Successfully created assembly at " + DateTime.Now.ToLocalTime());
jeremysimmons / HtmlHelperPartialExtensions.cs
Last active Jun 7, 2017
Html.Partial for core mvc
View HtmlHelperPartialExtensions.cs
public static class HtmlHelperPartialExtensions
public static IHtmlContent PartialWithPrefix(this IHtmlHelper htmlHelper, string partialViewName, object model, string prefix)
var htmlFieldPrefix = (string.Empty.Equals(prefix) ? "." : "") + prefix;
return htmlHelper.Partial(partialViewName, model, new ViewDataDictionary(htmlHelper.ViewData) { TemplateInfo = { HtmlFieldPrefix = htmlFieldPrefix } });
public static Task<IHtmlContent> PartialWithPrefixAsync(this IHtmlHelper htmlHelper, string partialViewName, object model, string prefix)
jeremysimmons / build.proj
Created Jun 6, 2017 — forked from dasMulli/build.proj
Sample CI build definition using MSBuild
View build.proj
<Solution Include="*.sln" />
<PublishProject Include="XXX.Mvc\XXX.Mvc.csproj" />
<TestProject Include="**\*.Test*.*proj" Exclude="XXX.Tests.Shared\XXX.Tests.Shared.csproj" />
<Target Name="Build">
<MSBuild Projects="@(Solution)" Targets="Restore" ContinueOnError="ErrorAndStop" UnloadProjectsOnCompletion="true" UseResultsCache="false" />
<MSBuild Projects="@(PublishProject)" Targets="Publish" Properties="Configuration=Release" ContinueOnError="ErrorAndContinue" />
jeremysimmons / default boolean behavior
Created Jun 5, 2017
Conditional attribute rendering
View default boolean behavior
@using System.Collections.Generic
ViewData["Title"] = "Home Page";
var Colors = new List<string>