Skip to content

Instantly share code, notes, and snippets.

View xyombo's full-sized avatar
:octocat:
stand by

yombo xyombo

:octocat:
stand by
  • Beijing
  • 16:05 (UTC +08:00)
View GitHub Profile
@xyombo
xyombo / system.service-example.md
Created November 29, 2024 06:22
Spring boot 程序添加到system.service

systemd 服务配置文件

创建一个名为 system.service 的文件,通常位于 /etc/systemd/system/ 目录下。

/etc/systemd/system/system.service 示例

[Unit]
Description=System Service
After=network.target
@xyombo
xyombo / sdkman_oracle_jdk.sh
Created June 21, 2023 03:31 — forked from smola/sdkman_oracle_jdk.sh
Install Oracle JDK 8 for use with SDKMAN
#!/bin/bash
#
# Install Oracle JDK 8 for use with SDKMAN
#
set -eu
# This URL can be discovered using https://sites.google.com/view/java-se-download-url-converter
DOWNLOAD_URL="https://javadl.oracle.com/webapps/download/GetFile/1.8.0_331-b09/165374ff4ea84ef0bbd821706e29b123/linux-i586/jdk-8u331-linux-x64.tar.gz"
TARBALL="jdk-8u331-linux-x64.tar.gz"
@xyombo
xyombo / MySql-5.6-installation guide.md
Created December 6, 2021 14:09 — forked from vinodpandey/MySql-5.6-installation guide.md
Install MySQL 5.6.xx on Ubuntu 18.04 & Ubuntu 20.04

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@xyombo
xyombo / gist:7694dc1f9be2ff10d2086fede0426fc1
Created January 8, 2021 15:40
java判断某月属于第几季度
// month can be [1,2,3,4,5,6,7,8,9,10,11,12]
int quarter = (month - 24) / 3 + 8;
// month can be [0-11] ,just as calendar.get(Calendar.MONTH)
int quarter = (month-1) / 3+1