Skip to content

Instantly share code, notes, and snippets.

@zaus
zaus / DelayedRenderExtensions.cs
Created September 27, 2013 18:06
RenderSections in PartialViews -- delayed rendering of any HTML content. See SO answer: http://stackoverflow.com/a/18790222/1037948
public static class HtmlRenderExtensions {
/// <summary>
/// Delegate script/resource/etc injection until the end of the page
/// <para>@via http://stackoverflow.com/a/14127332/1037948 and http://jadnb.wordpress.com/2011/02/16/rendering-scripts-from-partial-views-at-the-end-in-mvc/ </para>
/// </summary>
private class DelayedInjectionBlock : IDisposable {
/// <summary>
/// Unique internal storage key
/// </summary>
@NickPolyder
NickPolyder / git-aliases
Last active October 30, 2024 17:26
Git aliases for streamlined operations (insert on .gitconfig)
[alias]
s = status
co = checkout
cob = checkout -b
del = branch -D
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
save = !git add -A && git commit -m 'chore: savepoint'
undo = reset --soft HEAD~
delete = push origin --delete
pull-updates = "!f() { (git stash && git checkout $1 && git pull --rebase && git checkout $2 && git rebase $1 && git stash pop) }; f"
@bentman
bentman / Add-DevToMyWinServer.ps1
Last active October 30, 2024 12:03
Install Dev Tools on Win Server 2022
<#
.SYNOPSIS
Script to install Dev Tools on Windows Server (tested on 2022)
.DESCRIPTION
Installs the following from multiple resources:
Microsoft.VCLibs v14.00 (github)
Microsoft.UI v2.8.6 (github)
winget-cli (dynamic version retrieval from api.github.com)
Microsoft.WindowsTerminal (dynamic version retrieval from api.github.com)
Microsoft pwsh.exe vCurrent (winget)