Skip to content

Instantly share code, notes, and snippets.

View zxh's full-sized avatar
🎈

zxh zxh

🎈
  • Cloud Valley
  • Beijing
View GitHub Profile
@zxh
zxh / gen_pem_file.sh
Created June 26, 2018 01:59
generate .pem file
# Using ssh-keygen to export the key in the .pem format worked for me.
ssh-keygen -f id_rsa.pub -m 'PEM' -e > id_rsa.pem`
# Then simply copy the .pem key as necessary.
# For reference:
# the -f id_rsa.pub portion indicates the input file to read from
# -m 'PEM indicates a PEM filetype
# the -e option indicates that the output will be exported
@zxh
zxh / LoggerFilter
Created July 14, 2018 07:49 — forked from calo81/LoggerFilter
Filter for reading and logging HttpServletRequest body, and resetting the input stream
package com.paddypower.financials.market.management.rest.logging;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.servlet.Filter;
import javax.servlet.FilterChain;