Skip to content

Instantly share code, notes, and snippets.

View elmuerte's full-sized avatar

Michiel Hendriks elmuerte

View GitHub Profile
@elmuerte
elmuerte / CommandPromptHere.reg
Created April 13, 2021 07:20
Command Prompt Here
Windows Registry Editor Version 5.00
; Adds an "Open command window here" option when holding Shift and right clicking on a directory in Explorer
; Right above the Open PowerShell window here and Open Linux shell here options
[HKEY_CLASSES_ROOT\Directory\shell\OpenCommandPrompt]
@="@shell32.dll,-8506"
"ShowBasedOnVelocityId"=dword:00639bc8
"NoWorkingDirectory"=""
"Extended"=""
/* article listing */
.article-engagement-count.reactions-count {
display: none !important;
}
.article-engagement-count.comments-count {
left: 20px !important;
}
/* article view */
#article-reaction-actions .reaction-number,
@elmuerte
elmuerte / Unwritten.txt
Last active August 21, 2017 16:13
Long list of unwritten rules
@elmuerte
elmuerte / Discourse SAML with Google.md
Last active April 20, 2021 20:57
Discourse SAML with Google

Setting up Discourse to perform authentication via Google G-Suite using SAML is quite easy once you figure it out.

Add the discourse-saml plugin to your discourse as documented.

To configure the plugin you need some information from Google G-Suite. In the admin console add a new SAML application and setup a "Custom application". This will show you the information you need. The URL mentioned in SSO URL needs to be used as the DISCOURSE_SAML_TARGET_URL. This is something like https://accounts.google.com/o/saml2/idp?idpid=XXXXX Now you need the certificate information you put in DISCOURSE_SAML_CERT and DISCOURSE_SAML_CERT_FINGERPRINT. This is a bit more tricky. The content for DISCOURSE_SAML_CERT

@elmuerte
elmuerte / UrlMappedRenderer.java
Last active April 5, 2018 11:47
Alternative renderer for Jericho HTML Parser
/*
Copyright (c) 2015 Michiel Hendriks
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
### Keybase proof
I hereby claim:
* I am elmuerte on github.
* I am elmuerte (https://keybase.io/elmuerte) on keybase.
* I have a public key whose fingerprint is 77A9 4B8E 643D 0F36 C101 24CB 3FBC 20CD 4EAE 9ED6
To claim this, I am signing this object:
@elmuerte
elmuerte / gist:5378430
Created April 13, 2013 13:36
Updated ALSA configuration for HDA-Intel based sounds cards where the channel mapping is wrong (e.g. nVidia ION based cards). This is just the updated segment of the file /usr/share/alsa/cards/HDA-Intel.conf The fix is in the extra slave.pcm section containing the ttable arguments.
HDA-Intel.pcm.hdmi.common {
@args [ CARD DEVICE CTLINDEX AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.DEVICE {
type integer
}
@args.CTLINDEX {
type integer