Skip to content

Instantly share code, notes, and snippets.

View mikesigs's full-sized avatar
😁

Mike Sigsworth mikesigs

😁
View GitHub Profile
@mikesigs
mikesigs / reboot-notifier.bat
Last active March 17, 2017 21:41
Pushbullet Reboot Notifier
@echo off
:: Broadcast a "Reboot complete" message to all PushBullet devices after a machine finishes rebooting
:: This is helpful when you restart a remote machine and want to know when you can reconnect
:: STEP 1: Get a Pushbullet API Access Token from your account page - https://www.pushbullet.com/#settings/account
set token=YOUR TOKEN HERE
:: STEP 2: Save this script somewhere on the target PC
:: STEP 3: Follow these instructions to make it a startup script - https://technet.microsoft.com/en-ca/library/cc770556.aspx
:: STEP 4: Test the script by simply running it. If you get the notification, then try rebooting to see if it works.
:: STEP 5: ???
@mikesigs
mikesigs / cloudSettings
Created February 9, 2018 03:11
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-02-09T03:11:48.470Z","extensionVersion":"v2.8.7"}
@mikesigs
mikesigs / BoxStarter_BasicWorkstation
Last active July 6, 2018 18:43
Developer Machine Setup using BoxStarter
if (Test-PendingReboot) { Write-Warning "mikesigs - Reboot pending right from the start!" }
$GitUserName='Mike Sigsworth'
$GitUserEmail='mikesigsworth@gmail.com'
# Boxstarter Options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# Windows Configuration
@mikesigs
mikesigs / replace_root.sh
Created March 24, 2016 20:30 — forked from pmiossec/replace_root.sh
Script to permit to rcheckin a git repository to a newly created TFVC repository with git-tfs
#Script to permit to rcheckin a git repository to a newly created TFVC repository with git-tfs
#adaptation from my answer: http://stackoverflow.com/questions/645450/insert-a-commit-before-the-root-commit-in-git/30558271#30558271
#usage: pass to the script (1) the url of the tfs server, (2) the tfs path in the repository, (3) the changeset id
#../replace_root.sh "https://urlOfYourTfs/DefaultCollection" "$/EmptyTfs/Trunk" 21
# Command to get Changeset ID
# tf history "$/EmptyTfs/Trunk" /collection:"https://urlOfYourTfs/DefaultCollection" /noprompt /stopafter:1
# Clean up any previous attempt
rm -rf ./.git/refs/replace
@mikesigs
mikesigs / AddSelfAsSqlAdmin.bat
Created July 30, 2019 01:11
Add Self as SQL Admin on local instance
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
@mikesigs
mikesigs / 1 - PowerShell Customization.md
Last active October 12, 2021 15:25 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@mikesigs
mikesigs / !SQL Templates
Last active February 3, 2022 18:30
SQL Templates
SQL Templates
@mikesigs
mikesigs / angular-directive-priority.md
Last active November 17, 2022 12:49 — forked from awerlang/angular-directives
Angular Directive Priority - Quick Reference

##Angular Directive Priority - Quick Reference

When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The priority is used to sort the directives before their compile functions get called. Priority is defined as a number. Directives with greater numerical priority are compiled first. Pre-link functions are also run in priority order, but post-link functions are run in reverse order. The order of directives with the same priority is undefined. The default priority is 0.

For a brief description of each directive, click here.

Directive | Priority | Terminal | Creates new scope | Can be used as multiElement ---------- | :---------: | :---------: | :---------------

@mikesigs
mikesigs / DeleteExcludedFiles.ps1
Last active May 10, 2023 11:40
PowerShell Script to Find (and delete) all excluded files in a Visual Studio Solution
<#
.SYNOPSIS
Find all files excluded from a Visual Studio solution with options to delete.
.DESCRIPTION
Finds all excluded files in all projects in the provided Visual Studio solution with options to delete the files.
.PARAMETER Solution
The path to the .sln file
@mikesigs
mikesigs / bin\alias.bat
Last active February 26, 2024 04:06
Cmder Customization
@echo off
set ALIASES=%CMDER_ROOT%\config\aliases
setlocal
:: handle quotes within command definition, e.g. quoted long file names
set _x="%*"
set _x=%_x:"=%
:: check command usage
if ["%_x%"] == [""] echo Use /? for help & echo. & goto :p_show