Skip to content

Instantly share code, notes, and snippets.

@cygaar
cygaar / EIP.sol
Last active September 7, 2022 21:08
interface IERC6000 {
/// @notice Emitted when a subscription expiration changes
/// The zero address for subscriber indicates that the subscription was canceled.
/// @dev When a subscription is canceled, the expiration value should also be 0.
event SubscriptionUpdate(address indexed subscriber, uint256 indexed tokenId, uint256 expiration);
/// @notice Renews the subscription to an NFT
/// Throws if `tokenId` is not a valid NFT
/// @param tokenId The NFT to renew the subscription for
function renewSubscription(uint256 tokenId) external payable;
@kaecy
kaecy / IRCMessageLoop.java
Last active May 5, 2022 18:54
Simple IRC Bot (Updated)
import java.io.*;
import java.net.*;
import java.util.*;
public abstract class IRCMessageLoop implements Runnable {
Socket server;
OutputStream out;
List<String> channelList;
boolean initial_setup_status;
@dopoljak
dopoljak / CertificateSigningRequestUsingSunJDK.java
Last active August 28, 2023 13:56
Example how to create PKCS#10 Certificate Signing Request (CSR) using Sun JDK, This example creates signature externally - suitable for Cryptographic devices such as Hardware Security Module (HSM)
package com.ilirium.client;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.KeyPair;