Skip to content

Instantly share code, notes, and snippets.

View knight-ryu12's full-sized avatar
🔧
making questionable quality softwares.

Chromaryu knight-ryu12

🔧
making questionable quality softwares.
  • Japan
View GitHub Profile
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
Thread GCThread = new Thread(() -> {
long CurrentMem = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory() / (1024 * 1024));
System.gc();
CurrentMem = CurrentMem - (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory() / (1024 * 1024));
logger.info("GC executed. Freed Memory " + CurrentMem+"MB");
try{
Thread.sleep(Long.parseLong(configuration.getProperty("GCTime")));
} catch (InterruptedException e) {
e.printStackTrace();
}
/**
* This source code is licensed under the CC-BY-NC.
* This source code is developed by Chromaryu.
* @author Chromaryu
*/
package net.unlimi_server.advancedwhois.utils;
public class UUIDdasher {
/**
* dash is make 8-4-4-4-12 pattern UUID-like string to be dashed.
import com.sun.istack.internal.NotNull;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
/**
* ItemGiver is Giving Item to someone
class ircsock:
#IRC = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
def __init__(self):
self.IRC = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
def connect(self):
self.IRC.connect(("irc.esper.net", 6667))
def send_data(self,command):
self.IRC.send((command + '\r\n').encode())
public List<String> getDataValueFromDataName(String dataname) {
Connection con = null;
List<String> list = new ArrayList<>();
try {
con = open();
PreparedStatement ps = con.prepareStatement(
"SELECT DataValue FROM PDAPI WHERE DataName = ?"
);
ResultSet rs = ps.executeQuery();
while(rs.next()) {
### Keybase proof
I hereby claim:
* I am knight-ryu12 on github.
* I am chromaryu (https://keybase.io/chromaryu) on keybase.
* I have a public key whose fingerprint is F0AE 45C4 787F 1221 8DCA 28D3 E334 F028 2699 12FC
To claim this, I am signing this object:
<dependencies>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>

Keybase proof

I hereby claim:

  • I am knight-ryu12 on github.
  • I am chromaryu (https://keybase.io/chromaryu) on keybase.
  • I have a public key ASBcp1YOkYI2no54bKFhN-KICIw0C6Br_SAqFE_eWlMCCgo

To claim this, I am signing this object:

{
"id":"0000000-0000-0000-0000-0000000",
"compressMethod":"LZ4",
"uid":"0000000-0000-0000-0000-0000000",
"filename":"test.json",
"origfilesize":100,
"filesize":80,
"checksum":{
"method":"SHA-256",
"hash":"00000000000000000000000000000000",