Skip to content

Instantly share code, notes, and snippets.

View xinyii's full-sized avatar

Yi Xin xinyii

View GitHub Profile
@neuro-sys
neuro-sys / BCD.java
Last active May 15, 2024 12:11
BCD Conversion in java
/*
* Copyright 2010 Firat Salgur
* Improved by Abdallah Abdelazim
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
@edokeh
edokeh / index.js
Last active June 27, 2024 04:27
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@jsgao0
jsgao0 / CipherUtility.java
Last active August 8, 2023 05:15
Encryption with RSA using Java in Spring Framework.
package com.jsgao.bean;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
@radimih
radimih / Dockerfile
Last active April 20, 2023 10:53
Spring Boot Actuator based Docker HEALTHCHECK
FROM openjdk:11-jre-slim
EXPOSE 8080
ENV TZ=Europe/Moscow
RUN adduser --system --group --home /opt/app appuser
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl jq \
@sindresorhus
sindresorhus / esm-package.md
Last active July 3, 2024 15:07
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.