Skip to content

Instantly share code, notes, and snippets.

View whyvrafvr's full-sized avatar
👾
building PoLN

_whyvrafvr whyvrafvr

👾
building PoLN
View GitHub Profile
@whyvrafvr
whyvrafvr / OwnerZero.sol
Created November 13, 2021 13:43
OwnerZero.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.0 <0.9.0;
contract Test {
address public regMsgSender = address(0);
function setMsgSender () external
{
regMsgSender = msg.sender;
}
@whyvrafvr
whyvrafvr / static_service.go
Created November 10, 2021 19:39
EncodeArgs struct
// EncodeArgs are arguments for Encode
type EncodeArgs struct {
Data string `json:"data"`
Encoding formatting.Encoding `json:"encoding"`
Length int32 `json:"length"`
}
@whyvrafvr
whyvrafvr / staking.crt
Last active October 27, 2021 17:26
read SSL certificate
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: sha256WithRSAEncryption
Issuer:
Validity
Not Before: Dec 31 00:00:00 1999 GMT
Not After : Oct 27 13:28:10 2121 GMT
Subject:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fr.trendev.controllers;
import fr.trendev.controllers.qualifiers.HazelcastReplicatedMap;
import com.hazelcast.core.ReplicatedMap;
import java.util.Collections;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fr.trendev.controllers;
import com.hazelcast.config.MapConfig;
import com.hazelcast.core.IMap;
import fr.trendev.controllers.qualifiers.HazelcastDistributedMap;
@whyvrafvr
whyvrafvr / ClusteredSingletonRecordsManager.java
Last active March 11, 2020 11:42
ClusteredSingletonRecordsManager.java
package fr.trendev.controllers;
import fr.trendev.controllers.qualifiers.ClusteredSingleton;
import fish.payara.cluster.Clustered;
import fish.payara.cluster.DistributedLockType;
import java.io.Serializable;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
{
"status": "ok",
"namespace": "helloworld",
"hostname": "helloworld-7f75f7c766-bcvfx",
"ip": "10.32.0.7",
"timestamp": 1583171446414
}
{
"status": "ok",
"namespace": "helloworld",
{
"status": "ok",
"namespace": "helloworld",
"hostname": "helloworld-7f75f7c766-7c2jg",
"ip": "10.32.0.5",
"timestamp": 1583170852635
}