Skip to content

Instantly share code, notes, and snippets.

View jeremysimmons's full-sized avatar

Jeremy Simmons jeremysimmons

View GitHub Profile
@jeremysimmons
jeremysimmons / multipart.cs
Last active June 20, 2024 17:44 — forked from erkantaylan/multipart.cs
c# download multi part
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
namespace TestApp
{
internal class Program
{
@jeremysimmons
jeremysimmons / admin_head_post_edit_check.php
Created September 18, 2023 20:50 — forked from petenelson/admin_head_post_edit_check.php
WordPress admin action hooks for listing/adding/editing posts or pages
/* actions fired when listing/adding/editing posts or pages */
/* admin_head-(hookname) */
add_action( 'admin_head-post.php', 'admin_head_post_editing' );
add_action( 'admin_head-post-new.php', 'admin_head_post_new' );
add_action( 'admin_head-edit.php', 'admin_head_post_listing' );
function admin_head_post_editing() {
echo 'you are editing a post';
}
@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 / 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 / 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" />
@jeremysimmons
jeremysimmons / breadcrumbs.css
Last active January 4, 2017 20:42 — forked from alexisnomine/breadcrumbs.css
Breadcrumb when navigating folders in a Sharepoint 2010 Document Library WebPart.(Pure JS, No jQuery, IE8+) Can be inserted via a "HTML Content Editor Web Part" or referenced in a custom masterpage.
.ms-WPHeader .breadcrumbs{
display:block;
font-style:italic;
}
.ms-WPHeader .breadcrumbs,.ms-WPHeader .breadcrumbs a{
font-size: 0.8em;
color:#D1D1D1;
}