Skip to content

Instantly share code, notes, and snippets.

@jpierson
jpierson / nix-pwsh-cheatsheet.md
Last active May 7, 2023 15:25
Unix/Linux to Powershell Command Cheatsheet

Unix/Linux to Powershell Command Cheatsheet

This guide aims to document useful commands that I commonly see used in Linux and Unix environments to their closest equivalent in Powershell.

Command: wc

Use: Counts some aspect of the input stream and returns a summarized value as output.

@jpierson
jpierson / switch-local-git-repo-to-fork.md
Last active December 26, 2022 21:48 — forked from jagregory/gist:710671
How to move to a fork after cloning

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step)

    git clone git@github...some-repo.git
@jpierson
jpierson / useful-ad-commands.md
Last active July 15, 2021 17:57
Useful Windows Active Directory commands

Useful Windows commands for finding information on Active Directory groups and users.

Get a list of groups on the domain

net group /domain

List groups your current user belongs to

@jpierson
jpierson / shadow-dom-example.html
Last active August 25, 2020 16:10
Shadow DOM example for isolating HTML content embedded from a CMS
<!doctype html>
<html>
<head>
<style>
.row {
display: flex;
}
.column {
@jpierson
jpierson / windows-long-path-support.md
Created October 11, 2018 13:14
windows-long-path-support
@jpierson
jpierson / min-max-dates.md
Last active January 19, 2018 14:29
A summary of min/max date values used by various systems

Summary of Min/Max date values for various systems

System/Type Min Max Notes
.NET (DateTime) 1/1/0001 12:00:00 AM 12/31/9999 11:59:59 PM
T-SQL (datetime) January 1, 1753 December 31, 9999 Default value is 1900-01-01 00:00:00
Oracle (DATE) 0001-01-01 9999-12-31
Oracle (TIME) 00:00:00 24:00:00
Oracle (TIMESTAMP) 0001-01-01-00.00.00.000000 9999-12-31-23.59.59.999999
ISO 8601 1583-01-19T0:00:00Z 9999-12-31T023:59:59Z
@jpierson
jpierson / advent-of-code-2017-elm-day1-part2.elm
Created December 8, 2017 05:20
Code solution for Advent of Code 2017 Day 1 (http://adventofcode.com/2017/day/1)
module Main exposing (main)
import Html exposing (Html, li, text, ul)
import Html.Attributes exposing (style)
-- Advent of Code 2017 - Day 1 Part 2 (http://adventofcode.com/2017/day/1)
main : Html msg
main =
ul []
@jpierson
jpierson / advent-of-code-2017-elm-day1.elm
Last active December 8, 2017 05:19
Code solution for Advent of Code 2017 Day 1 (http://adventofcode.com/2017/day/1)
module Main exposing (main)
import Html exposing (Html, li, text, ul)
import Html.Attributes exposing (style)
-- Advent of Code 2017 - Day 1 (http://adventofcode.com/2017/day/1)
-- https://ellie-app.com/hBMTrVXyna1/1
main : Html msg
main =
@jpierson
jpierson / ElmScratchPad.md
Last active August 2, 2017 03:38
Experimentation with the Elm language

Elm experiments

Lists

Join a list of strings into a single string with specified separator

import Html exposing (text)

v = [1,2,3]
@jpierson
jpierson / gitflow-breakdown.md
Last active May 24, 2017 02:37 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository