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: ???
######## Phil's dev VM boxstarter script ########
###############
#### notes ####
###############
### running remotely on VM fails on Configuring CredSSP settings
## check http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/30/understanding-powershell-remote-management.aspx
### running locally on VM
@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
@mikesigs
mikesigs / DevEnvironment.ps1
Created December 9, 2015 19:47 — forked from johnkattenhorn/DevEnvironment.ps1
Boxstarter Script for VM-based Development Environment
function SetPowerPlan([string]$PreferredPlan)
{
Write-Host "Setting Powerplan to $PreferredPlan"
$guid = (Get-WmiObject -Class win32_powerplan -Namespace root\cimv2\power -Filter "ElementName='$PreferredPlan'").InstanceID.tostring()
$regex = [regex]"{(.*?)}$"
$newpowerVal = $regex.Match($guid).groups[1].value
# setting power setting to high performance
powercfg -S $newpowerVal
}
@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 / !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 ---------- | :---------: | :---------: | :---------------

public class FeatureViewLocationRazorViewEngine : RazorViewEngine
{
public FeatureViewLocationRazorViewEngine()
{
ViewLocationFormats = new[]
{
"~/Features/{1}/{0}.cshtml",
"~/Features/{1}/{0}.vbhtml",
"~/Features/Shared/{0}.cshtml",
"~/Features/Shared/{0}.vbhtml",
@mikesigs
mikesigs / git.lua
Created January 20, 2015 05:15
Added remote status (ahead/behind) to ConEmu prompt
---
-- This file is intended to be used with cmder
-- http://bliker.github.io/cmder/
--
-- Replace your existing <path_to_cmder>\config\git.lua with this file
-- This will append the branch status to your prompt, e.g. [ahead 1, behind 2]
-- It basically takes the output of git status -sb and appends it (with coloring) to the cmder prompt (before the lambda)
---
---
@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