Skip to content

Instantly share code, notes, and snippets.

View patrickwyler's full-sized avatar

Patrick Wyler patrickwyler

View GitHub Profile
@patrickwyler
patrickwyler / useOsxKeychainAsTruststore.md
Created January 4, 2022 08:49
Use OSX KeyChain as Truststore

Use OSX KeyChain as Truststore

Java

-Djavax.net.ssl.trustStoreType=KeychainStore

Gradle

Just pass a dummy file.. otherwise it's not working.

systemProp.javax.net.ssl.trustStore=/dev/null

@patrickwyler
patrickwyler / fixteams.sh
Last active May 4, 2021 12:27
Workaround for MS Teams Helper using up >100% of CPU MacBook
#!/bin/bash
#
# See: https://answers.microsoft.com/en-us/msteams/forum/msteams_other/ms-teams-helper-using-up-100-of-cpu-macbook/9305b96e-5381-43cf-88c4-d3ba39b37a58?page=11
my_array=( $(pgrep -f "Microsoft Teams Helper \(Renderer\)") )
for i in "${my_array[@]}"; do
renice -n 10 -p $i
done
@patrickwyler
patrickwyler / setProxyForBash
Last active December 27, 2020 13:15
Set proxy for bash session
# Place this method in your .bashprofile and replace the proxy placeholders @<proxy>:<proxy-port>
# Set proxy for current Bash session
# -------------------------------------------------------------------
setProxyForBash() {
echo -e --- set proxy for bash session ---
read -p "Enter your Password: " -s password && echo -e " "
read -r -p "Are you sure? [y/N] " response
@patrickwyler
patrickwyler / git-cleanup-repo
Created September 4, 2020 08:31 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch