Skip to content

Instantly share code, notes, and snippets.

@lucko
lucko / java-stack-thread-dump.md
Created February 19, 2021 13:53
Generate a stack trace / thread dump for a Java program

Step 1: Find the process id for the application

Before you can create a stack dump, you need to know (or find out) the process id of the application.

You can use the jps command (or any other approach) to find the process for all running Java programs on the system.

e.g.

➜  jps
<scheme name="luck-theme" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2021-05-06T21:13:30</property>
<property name="ide">idea</property>
<property name="ideVersion">2021.1.0.0</property>
<property name="modified">2021-05-06T21:13:38</property>
<property name="originalScheme">luck-theme</property>
</metaInfo>
<option name="LINE_SPACING" value="1.0" />
@lucko
lucko / auto-sign-commits-mac.md
Last active April 15, 2024 08:26
Auto-sign commits with IntelliJ on MacOS

Run:

  • brew install gnupg pinentry-mac
  • git config --global user.signingkey <key>
  • git config --global commit.gpgsign true
  • git config --global gpg.program gpg

Then add the following line to ~/.gnupg/gpg-agent.conf:

pinentry-program /usr/local/bin/pinentry-mac
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@Techcable
Techcable / profile.sh
Last active November 23, 2018 20:22
WarmRoast Wrapper
JAR_FILE=WarmRoast.jar
URL="http://builds.enginehub.org/job/warmroast/4523/download/warmroast-1.0.0-SNAPSHOT.jar"
SAMPLING_INTERVAL=10
if [ ! -e "$JAR_FILE" ];
then
echo attempting to download $JAR_FILE;
curl "$URL" > "$JAR_FILE";
fi;