Skip to content

Instantly share code, notes, and snippets.

View szalapski's full-sized avatar

Patrick Szalapski szalapski

View GitHub Profile
@szalapski
szalapski / philosophy.md
Last active July 1, 2024 00:44
Philosophy flowchart

Philosophy flowchart

flowchart TD

subgraph Classical
    Pythagoreans[Pythagoreans 500-300 BC]
    --> Socrates[Socrates 410 BC]
    --> Plato[Plato 380 BC]
    --> Aristotle[Aristotle 350 BC]
Imports Datadog.Trace
Imports System.IO
Public Class DatadogSoapRequestModule
Implements IHttpModule
Public Sub Init(context As HttpApplication) Implements IHttpModule.Init
AddHandler context.BeginRequest, AddressOf Application_BeginRequest
End Sub

The Wellness Flowchart

  • Wellness can be overwhelming; this flowchart will help you take it one step at a time. Don't be concerned about later steps till you have habitualized the steps above it.
  • Roughly follow the order below for optimal benefit; Progress in all columns, one step at a time. Some steps you will have already achieved when first reaching it--take the win and move to the next one!
  • This is an opinionated one-size-fits-all framework. You may wish to customize or change some of them. The best wellness plan is whatever one you can stick to.
  • Most habits take 30-60 days to establish. Take on one or two new habits at a time and build on your success.
  • Most improvements in wellness require sustained, permanent changes. If you find yourself regressing, it is far better to pick up where you left off than to regress farther. If you struggle with a step, feel free to skip it or come back to it later. This isn't all or nothing. Don't round down to zero.
  • Inspired by the [Financial Independence
@szalapski
szalapski / gcp.bat
Last active February 25, 2024 18:12
@rem gcp.bat: Git Add, Commit, Push
@rem USAGE: gcp [just type your commit message without any quotation marks anywhere]
@rem EXAMPLE: gcp code cleanup for abc feature for issue 1234
git add -A && git commit -m "%*"
@if errorlevel 1 goto end
git push
:end
@inject NavigationManager navigationManager
...
@code {
// example code to change state based on the querystring.
// Call perhaps from an event callback or whenever the query may have changed.
private void LoadFromQuery()
{
Uri uri = navigationManager.ToAbsoluteUri(navigationManager.Uri);
public static class GeneralExtensions {
/// <summary>
/// Throws an exception if the task fails to complete within a number of milliseconds from when invoked.
/// </summary>
/// <param name="task">The task on which to enforce the timeout</param>
/// <param name="milliseconds">The timeout in milliseconds.</param>
/// <param name="operationDescription">The text description that should appear in the timeout exception message.
/// Useful for pinpointing the timed-out operation.</param>
/// <returns>The completed task, if the task completed in time.</returns>
/// <exception cref="TimeoutException">Thrown when the timeout is reached before the task is completed.</exception>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace GeneralMills.ResourceDemand.Core.Extensions
{
/// <summary>
/// Contains static methods for working with data queries and LINQ.
/// </summary>
@szalapski
szalapski / TfsWebCompact.bookmarklet.js
Last active January 26, 2024 15:06
TfsWebCompact neatens up the look-and-feel of your Azure DevOps web backlog and task board. See also http://www.szalapski.com/2014/05/a-compact-layout-for-tfs-web-work-items.html .
/* The following is a bookmarklet.
To actually use it, it is easier to drag-and-drop starting with my blog post:
http://www.szalapski.com/2014/05/a-compact-layout-for-tfs-web-work-items.html */
javascript:/* version 2024-01-26 */(function () { var s = document.createElement('style'); s.innerText = `
/* for backlog list */
#header-row {display: none;}
.header-section .hubs-section {left:300px; top:-5px;}
.nav-separated .hub-groups-section, .nav-separated .search-box {margin-top:0; padding-top:0;}