Skip to content

Instantly share code, notes, and snippets.

View pRoy24's full-sized avatar

Roy pRoy24

View GitHub Profile

Keybase proof

I hereby claim:

  • I am proy24 on github.
  • I am roy2407 (https://keybase.io/roy2407) on keybase.
  • I have a public key ASAvcLBX7GGNMm3zjlT8EBMrd3Cy3PPpaX41nhUefHLvrgo

To claim this, I am signing this object:

-----BEGIN CERTIFICATE-----
MIICUjCCAbugAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJ1czEL
MAkGA1UECAwCQ0ExEjAQBgNVBAoMCU1pcnJvciBNZTEWMBQGA1UEAwwNYXBwLm1p
cnJvci5tZTAeFw0yMDA2MTkxODA5MzBaFw0yMTA2MTkxODA5MzBaMEYxCzAJBgNV
BAYTAnVzMQswCQYDVQQIDAJDQTESMBAGA1UECgwJTWlycm9yIE1lMRYwFAYDVQQD
DA1hcHAubWlycm9yLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7SDwn
re3GpnxrYefE+du/I9BczpnBRC6zwSnbihcGjv5brT+OpQfCOcqCplgTk8CS7gaM
UvNQ++TdnUiKwKB4TXYpFnRP3r+BmfxBqVDcq2oPczIdM/O9Vy1bKy6uvHW3MJ1u
9R07Tgj4TES+zYZ1SodjLH/MKuwj+a5/f5oNIwIDAQABo1AwTjAdBgNVHQ4EFgQU
FBcQ7xDVR1EIwpTEohszunPqz+4wHwYDVR0jBBgwFoAUFBcQ7xDVR1EIwpTEohsz
const req_query =
mutation productDuplicate($productId: ID!, $newTitle: String!) {
productDuplicate(productId: $productId, newTitle: $newTitle) {
userErrors {
field
message
}
imageJob {
id
}
@pRoy24
pRoy24 / iota_multisig.js
Last active February 16, 2018 17:33
Creating a mutisig signature using the IOTA protocol
// IOTA JS reference library https://github.com/iotaledger/iota.lib.js/
// Examples of multi-sig transfers can be found at https://github.com/iotaledger/iota.lib.js/blob/master/examples/multisig.js
iota.multisig.initiateTransfer(input, remainderAddress, multisigTransfer, function(e, initiatedBundle) {
iota.multisig.addSignature(initiatedBundle, address, iota.multisig.getKey('ABCDFG', 0, 3), function(e,firstSignedBundle) {
iota.multisig.addSignature(firstSignedBundle, address, iota.multisig.getKey('FDSAG', 0, 3), function(e,finalBundle) {
if (isNonEmptyObject(e)) {
console.log("IS VALID SIGNATURE: ", iota.utils.validateSignatures(finalBundle, address));
}
});
});
@pRoy24
pRoy24 / KafkaProcessor.java
Created February 16, 2018 06:29
Creating a data processor configuration for Spark
//Conf File for Kafka
public static void main(String[] args) throws Exception {
//read config file
Properties prop = PropertyFileReader.readPropertyFile();
String zookeeper = prop.getProperty("com.iot.app.kafka.zookeeper");
String brokerList = prop.getProperty("com.iot.app.kafka.brokerlist");
String topic = prop.getProperty("com.iot.app.kafka.topic");
logger.info("Using Zookeeper=" + zookeeper + " ,Broker-list=" + brokerList + " and topic " + topic);
// set producer properties