Skip to content

Instantly share code, notes, and snippets.

View jeremysimmons's full-sized avatar

Jeremy Simmons jeremysimmons

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jeremysimmons on github.
* I am jeremysimmons (https://keybase.io/jeremysimmons) on keybase.
* I have a public key ASDIP-c5HuHQmDj7RHXsgbpuzy-rz3dvocAQAqQ7XYMK2Ao
To claim this, I am signing this object:
@jeremysimmons
jeremysimmons / .gitignore
Created October 9, 2021 17:34 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ 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)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# 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
jeremysimmons / checkpoint-dismiss.js
Created September 30, 2021 16:20
Automatically dismiss CheckPoint access warning pages
// ==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 *://10.2.1.4/*
// @grant none
// @run-at document-idle
// ==/UserScript==
@jeremysimmons
jeremysimmons / exceptions.cs
Last active March 27, 2020 17:22
c# throwing exceptions
// For example, in .NET if an exception is thrown/re-thrown from the catch block, then the finally block will not execute.
try
{
try
{
Console.WriteLine("try");
throw new Exception("intentional");
Console.WriteLine("will not print");
apiVersion: apps/v1
kind: Deployment
metadata:
name: azure-vote-back
spec:
replicas: 1
selector:
matchLabels:
app: azure-vote-back
template:
@jeremysimmons
jeremysimmons / VS Project GUIDS
Created January 7, 2019 22:30
visual studio project guids
https://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-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
jeremysimmons / scheduled_tasks.ps1
Created January 31, 2018 22:38
show the LastRunTime of scheduled task
<#
.Synopsis
Get the list of scheduled Tasks from Windows 7 or Windows 2008 computers
.Description
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
jeremysimmons / SelfCompile
Created January 30, 2018 15:23 — forked from plaurin/SelfCompile
Self Compiling LinqPad query
void Main()
{
Environment.CurrentDirectory = Path.GetDirectoryName(Util.CurrentQueryPath);
Compiler.CompileFiles(Options.CreateOnDiskDll(
@namespace: "LinqPad.QueriesCompiler",
outputFile: "LinqPad.QueriesCompiler.dll")
.AddCodeFile(CodeType.LinqProgramTypes, Util.CurrentQueryPath))
.Dump("Successfully created assembly at " + DateTime.Now.ToLocalTime());
}
@jeremysimmons
jeremysimmons / HtmlHelperPartialExtensions.cs
Last active June 7, 2017 19:17
Html.Partial for asp.net core mvc
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
jeremysimmons / build.proj
Created June 6, 2017 01:06 — forked from dasMulli/build.proj
Sample CI build definition using MSBuild
<Project>
<ItemGroup>
<Solution Include="*.sln" />
<PublishProject Include="XXX.Mvc\XXX.Mvc.csproj" />
<TestProject Include="**\*.Test*.*proj" Exclude="XXX.Tests.Shared\XXX.Tests.Shared.csproj" />
</ItemGroup>
<Target Name="Build">
<MSBuild Projects="@(Solution)" Targets="Restore" ContinueOnError="ErrorAndStop" UnloadProjectsOnCompletion="true" UseResultsCache="false" />
<MSBuild Projects="@(PublishProject)" Targets="Publish" Properties="Configuration=Release" ContinueOnError="ErrorAndContinue" />