Skip to content

Instantly share code, notes, and snippets.

View matthiasbalke's full-sized avatar

Matthias Balke matthiasbalke

  • Germany
View GitHub Profile
@matthiasbalke
matthiasbalke / build.gradle
Created April 7, 2017 13:45
Gradle Dependency Tree
// https://solidsoft.wordpress.com/2014/11/13/gradle-tricks-display-dependencies-for-all-subprojects-in-multi-project-build/
allprojects {
task allDeps(type: DependencyReportTask) {}
}
@matthiasbalke
matthiasbalke / get_ip.sh
Created March 31, 2017 11:08
Get external IP from console
#!/bin/bash
wget -q -O - http://www.wieistmeineip.de/ | grep -A2 '<div id="ipv4"'
@matthiasbalke
matthiasbalke / find-ad.bat
Created March 16, 2017 13:43
Find AD server
nltest /dclist:adesso.local
@matthiasbalke
matthiasbalke / get_certificate_info_from_server.sh
Created February 9, 2017 14:25
Get certificate info from server
openssl s_client -showcerts -state -crlf -ign_eof -connect www.heise.de:443
@matthiasbalke
matthiasbalke / get_certificate_infos.sh
Last active May 18, 2021 17:29
Get certificate infos
openssl x509 -in Deutsche_Telekom_Root_CA_2.pem -noout -text | less
openssl x509 -in Deutsche_Telekom_Root_CA_2.pem -noout -issuer -subject| less
openssl x509 -in Deutsche_Telekom_Root_CA_2.pem -noout -serial -fingerprint -issuer -subject -dates | less
# Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key
# source: https://www.sslshopper.com/article-most-common-openssl-commands.html
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5
openssl req -noout -modulus -in CSR.csr | openssl md5
@matthiasbalke
matthiasbalke / convert_certificate_der_pem.sh
Created February 9, 2017 14:19
Convert a DER certificate to PEM
openssl x509 -inform DER -in Deutsche_Telekom_Root_CA_2.cer -outform PEM -out Deutsche_Telekom_Root_CA_2.pem
@matthiasbalke
matthiasbalke / deleteGradleCache.sh
Created February 1, 2017 18:46
delete a selected artifact / group from gradle local cache
#!/bin/bash
deleteGradleCache() {
local id=$1
if [ -z "$id" ]; then
echo "Please provide an group or artifact id to delete"
return 1
fi
find ~/.gradle/caches/ -type d -name "$id" -prune -exec rm -rf "{}" \; -print
}
@matthiasbalke
matthiasbalke / helper.gradle
Last active October 20, 2024 11:40
Gradle resolveDependencies Task
// found here: http://jdpgrailsdev.github.io/blog/2014/10/28/gradle_resolve_all_dependencies.html
task resolveDependencies {
doLast {
project.rootProject.allprojects.each { subProject ->
subProject.buildscript.configurations.each { configuration ->
resolveConfiguration(configuration)
}
@matthiasbalke
matthiasbalke / .bash_profile
Created December 20, 2016 09:35
delete artifact groups from Gradle cache
#!/bin/bash
# ...
# usage: deleteGradleCache groupId
deleteGradleCache() {
local id=$1
if [ -z "$id" ]; then
echo "Please provide an group or artifact id to delete"
return 1
@matthiasbalke
matthiasbalke / IE_JSON_as_plain_text.reg
Created September 4, 2015 13:35
Internet Explorer display JSON as plain text
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=dword:00013880
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/hal+json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=dword:00013880