Skip to content

Instantly share code, notes, and snippets.

View cloudcosmonaut's full-sized avatar

Hindrik Bruinsma | DevOps Consultant cloudcosmonaut

View GitHub Profile
@cloudcosmonaut
cloudcosmonaut / line-numbers-with-errors-in-bash.sh
Last active March 25, 2024 14:17
Small snipet to show how to show line numbers and called file when exiting on an error
function exit_error() {
MESSAGE="$(caller | awk '{print $2":"$1} ') $1"
ERROR_CODE=$2
echo "::error::${MESSAGE}"
exit $ERROR_CODE
}
@cloudcosmonaut
cloudcosmonaut / Setup-git-for-AzDO.md
Last active March 27, 2024 06:18
Git config for AzDO to enforce SSO login

Prerequisite

Now update your git settings file your $HOME folder. ~/.gitconfig on Linux Mac, most likely C:/Users/$USER/.gitconfig on Windows.

Add the below snippet to your config file and replace:

  • {{ORGANIZATION}} - with your AzDO organization
  • {{AZURE-AD-TENANT}} - the guid of your Azure AD tenant
  • {{UPN}} - User principle name in Azure AD. Should be your organization e-mail address
### Keybase proof
I hereby claim:
* I am readefries on github.
* I am readefries (https://keybase.io/readefries) on keybase.
* I have a public key ASBIrNAI53KHmIT_yypJvNGdJVUXxJxF_9zNnib_6mwweAo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am readefries on github.
  • I am readefries (https://keybase.io/readefries) on keybase.
  • I have a public key ASBnx-ZOYUjeZdwepBEiLWdzAv1UAo-c0JakpMkN3N-4Dgo

To claim this, I am signing this object:

Verifying myself: My Bitcoin username is +hbruinsma. https://onename.io/hbruinsma
# line 42 of image_tag.rb
+++ "<span class=\"image-wrapper #{@img['class']}\"><img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}></span>"
--- "<img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}>"