Skip to content

Instantly share code, notes, and snippets.

View motowilliams's full-sized avatar

Eric Williams motowilliams

View GitHub Profile
@JustinGrote
JustinGrote / Switch-AZContext.ps1
Last active May 29, 2020 19:01
A helper command to quickly switch current Azure Contexts
using namespace System.Management.Automation.Host
function Switch-AzContext {
param (
[Parameter(ValueFromPipeline)]
[Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext[]]
[ValidateNotNullOrEmpty()]
$Contexts = (Get-AzContext -ListAvailable | Sort-Object Name),
[Switch]$GUI
)
// MIT License
//
// Copyright (c) 2018 Kristian Hellang
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@dahlbyk
dahlbyk / github.md
Last active April 22, 2023 11:48
Mastering GitHub

Mastering GitHub

GitHub is often used as a basic Git host, but its platform has so much more to offer. From simple and powerful issues and pull requests, to advanced features for power users and integrators, it’s a tool worth knowing well in its own right. This session will review everything you need to know to master collaboration with GitHub, from best practices for GitHub Issues and how it represents basic Git concepts, to hidden features and the tools enabling its developer ecosystem.

  • Git Hosting
$exitCode = 0;
Write-Host "=== inetcons git hooks ==="
$devenv = Get-Process -Name devenv |where{$_.mainWindowTItle -like 'ContosoUniversity*'}
if($devenv)
{
Write-Host "Please close Visual Studio before rebasing."
$exitCode = 1;
}
exit $exitcode
@nickytonline
nickytonline / cobalt2_agnoster_theme.jpg
Last active November 7, 2020 09:29
My VS Code Setup
cobalt2_agnoster_theme.jpg
@forcewake
forcewake / extractTextBetweenCurlyBraces.js
Created June 5, 2015 12:55
Getting content between curly braces in javascript regex
var found = [], // an array to collect the strings that are found
rxp = /{([^}]+)}/g,
str = "a {string} with {curly} braces",
curMatch;
while( curMatch = rxp.exec( str ) ) {
found.push( curMatch[1] );
}
console.log( found ); // ["string", "curly"]
@sheastrickland
sheastrickland / UrlRewriteResources.ps1
Created March 19, 2015 23:28
Powershell DSC for UrlRewrite Module install and ApplicationHost changes
Package UrlRewrite
{
#Install URL Rewrite module for IIS
DependsOn = "[WindowsFeaturesWebServer]windowsFeatures"
Ensure = "Present"
Name = "IIS URL Rewrite Module 2"
Path = "http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi"
Arguments = "/quiet"
@jongalloway
jongalloway / recursive-nuget-package-restore.ps1
Last active May 12, 2016 18:16
Recursive NuGet Package Restore
get-childitem . -include *.sln -recurse | foreach ($_) { nuget restore $_.FullName -verbosity detailed}
get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"}
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links