Skip to content

Instantly share code, notes, and snippets.

View zengxs's full-sized avatar

Xiangsong Zeng zengxs

  • Singapore/London
  • 03:45 (UTC +08:00)
View GitHub Profile
@zengxs
zengxs / openssl.cnf
Created June 5, 2016 12:35
libressl configuration file
[ req ]
#default_bits = 2048
#default_md = sha256
#default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_min = 2
@zengxs
zengxs / tomcat.service
Last active August 14, 2022 17:26
tomcat systemd service script
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
@zengxs
zengxs / CharacterCast.java
Created May 9, 2016 06:10
第18章 图形界面 -> 习题4 编写程序,在文本框中输入英文字母,再根据“大写字母按钮”或“小写字母按钮”将输入的内容进行转换, 并将转换后的结果显示在标签上。
import javax.swing.*;
import java.awt.*;
public class CharacterCast {
private JFrame frame;
private JTextField textField;
private JButton lowerButton;
private JButton upperButton;
private JLabel label;