Skip to content

Instantly share code, notes, and snippets.

Chromaryu knight-ryu12

Block or report user

Report or block knight-ryu12

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@knight-ryu12
knight-ryu12 / Main.java
Created Mar 5, 2018
Java BouncyCastle ECDSA sect233r1 signing
View Main.java
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.*;
import java.security.spec.ECPrivateKeySpec;
import java.security.spec.InvalidKeySpecException;
import org.bouncycastle.jce.ECNamedCurveTable;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
View example.fs.json
{
"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",
View keybase.md

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:

View pom.xml
<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>
View gist:485e43022ed7423806a0b98a03532f90
### 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:
View help.java
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()) {
View test.py
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())
View ItemGiver.java
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
View UUIDdasher.java
/**
* 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.
View Useless.java
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();
}
You can’t perform that action at this time.