Skip to content

Instantly share code, notes, and snippets.

@PushOrigin
PushOrigin / figure.html
Created February 8, 2022 16:34 — forked from cpbotha/figure.html
Drop-in replacement for Hugo figure shortcode with img srcset support
{{/*
figure with auto-resizing and srcset v2020-05-10
Drop-in replacement for Hugo's figure shortcode as of 2020-05-02 that uses img srcset
to enable browsers to download only the resolution that they need.
The resizing and srcset magic only works for images that are part of the page
bundle. It will fall back to stock Hugo figure behaviour otherwise.
@PushOrigin
PushOrigin / bootstrapwindows10.ps1
Created August 6, 2019 19:13 — forked from zloeber/bootstrapwindows10.ps1
Boxstarter Windows 10 Configuration
<#
The command to run, built from the raw link of this gist
Win+R
iexplore http://boxstarter.org/package/url?<RAW GIST LINK>
OR (if you don't like the way the web launcher force re-installs everything)
@PushOrigin
PushOrigin / gist:43e21a5f9556a4a8a9ac5d4c7382877e
Last active February 28, 2017 16:52
Allows DbContextManager to manage existing DbContext
/// <summary>
/// Gets the DbContextManager object for the specified DbContext.
/// </summary>
/// <param name="context">
/// The DbContext to manage.
/// </param>
public static DbContextManager<C> GetManager(DbContext context)
{
return GetManager(context, "default");
}