Skip to content

Instantly share code, notes, and snippets.

Jon LaBelle jonlabelle

Block or report user

Report or block jonlabelle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jonlabelle on github.
  • I am jonlabelle (https://keybase.io/jonlabelle) on keybase.
  • I have a public key whose fingerprint is BD8F 9567 0380 3D50 3C71 2322 BE6E A205 A865 F811

To claim this, I am signing this object:

View powershell_get_commands.md
title subtitle author date source notoc
PowerShellGet Commands
PowerShell command examples to discover, install, update and publish PowerShell artifacts, and from the online PowerShell Gallery
Jon LaBelle
June 1, 2019
false

*PowerShellGet is a module with commands for discovering, installing, updating

@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active Jul 19, 2019
Docker Compose Cheatsheet
View docker_compose_cheatsheet.md
View sublime-merge-command-line-usage.md

Sublime Merge Command Line Usage

Sublime Merge includes a command line tool, smerge, to work with repositories on the command line. This can be used to open repositories, search, and merge files.

Setup

Windows

View iis_config_file_paths.md

IIS Config File Paths

Internet Information Services (IIS) 7 and later use an XML-based configuration system for storing IIS settings which replaces the metabase that was used in IIS 6.0 and earlier. This new configuration system was introduced with ASP.NET and is based on a hierarchical system of management system that uses *.config files. The configuration files for IIS 7 and later are located in the %windir%\System32\inetsrv\config folder.

applicationHost.config

@jonlabelle
jonlabelle / exec_with_retry.sh
Created Jan 27, 2019
Bash script to execute a command and (exponentially) retry if it fails.
View exec_with_retry.sh
#!/usr/bin/env bash
set -e
#
# Executes a command and (exponentially) retries if it fails.
#
# Usage:
#
# exec_with_retry <command>
@jonlabelle
jonlabelle / search.sh
Last active Nov 22, 2018
Bash script to search file contents (by file extension) for the specified search term. Uses grep under the hood.
View search.sh
#!/usr/bin/env bash
# shellcheck disable=SC2034,SC2086,SC2155,SC2001,SC2048
#
# Search file contents (by file extension) for the specified search term.
#
# grep options:
#
# -i Perform case insensitive matching.
# −r Recursively search subdirectories listed.
@jonlabelle
jonlabelle / clean_dotnet_build_files.sh
Last active Jan 25, 2019
Delete dotnet build dirs and files ('bin', 'obj', etc) recursively, starting from the current working directory.
View clean_dotnet_build_files.sh
#!/usr/bin/env bash
#
# Delete dotnet build dirs and files ('bin', 'obj', etc) recursively, starting
# from the current working directory.
#
# Author: Jon LaBelle
# https://jonlabelle.com/snippets/view/shell/clean-visual-studio-project-build-files-sh
# January 25, 2019
#
@jonlabelle
jonlabelle / Settings.StyleCop
Last active Oct 6, 2018 — forked from sneal/Settings.StyleCop
StyleCop settings
View Settings.StyleCop
<StyleCopSettings Version="105">
<GlobalSettings>
<CollectionProperty Name="RecognizedWords">
<Value>upsert</Value>
<Value>api</Value>
<Value>deserializer</Value>
<Value>deserializing</Value>
<Value>json</Value>
<Value>json:api</Value>
</CollectionProperty>
@jonlabelle
jonlabelle / relative_time.py
Last active May 27, 2019 — forked from zhangsen/relative_time.py
python-relative-time
View relative_time.py
from datetime import datetime, timedelta
def relative_time(date):
"""Take a datetime and return its "age" as a string.
The age can be in second, minute, hour, day, month or year. Only the
biggest unit is considered, e.g. if it's 2 days and 3 hours, "2 days" will
be returned.
You can’t perform that action at this time.