Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Ellis elliz

  • Perth, Western Australia
View GitHub Profile
View Get Azure AD Id.ps
# From Admin PS Shell:
Install-Module -Name AzureAD
Connect-AzureAD
Get-AzureADUser -ObjectId "your email address"
@elliz
elliz / Clickable.svg
Last active Aug 20, 2020
SVG that shows local coords on hover NOTE will not work on github as js script blocked
View Clickable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elliz
elliz / git notepad editor.bat
Last active Jul 22, 2020
windows command to set Notepad++ as your git editor (for squashes, rebases etc). Make you changes, save, close window.
View git notepad editor.bat
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
View multiple git credentials.md

Different git creds for different repos

TODO confirm this for windows

In global gitconfig -- on windows in Program Files/Git/etc

# xxxxxxx Projects
[includeIf "gitdir:<path to dir you're interested in>/**"]
    path = path to specific gitconfig created for this project
View AzureDevOpsGotoSelectedWorkItem.js
// Bookmarklet for Azure DevOps work items
// Select a number, click bookmarklet and open workitem with that id in new window
// Can edit using tools such as http://subsimple.com/bookmarklets/jsbuilder.htm
// based on code found at https://stackoverflow.com/questions/26261323
javascript:
(function(){
const path = 'your/path-here'; // usually Domain/projectId
s=document.selection?document.selection.createRange().text:window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection():'';
if(s==''){
s=prompt('Enter%20ID%20of%20workitem%20:','');
@elliz
elliz / TampermonkeyFavicon.js
Last active May 11, 2020
Tampermonkey script to update Favicon with data-uri SVG for Chrome 80+ etc
View TampermonkeyFavicon.js
// ==UserScript==
// @name SVG Favicon test
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Update the favicon on a site
// @author You
// @match https://elliz.github.io/svg-favicon/
// @grant none
// ==/UserScript==
You can’t perform that action at this time.