Skip to content

Instantly share code, notes, and snippets.

View agnelvishal's full-sized avatar
😀

Agnel Vishal agnelvishal

😀
View GitHub Profile
Verifying my Blockstack ID is secured with the address 1DniMeJtwwKnePwYRR1c8ujGa8i3HgZ1PV https://explorer.blockstack.org/address/1DniMeJtwwKnePwYRR1c8ujGa8i3HgZ1PV
Transactional value Investment value Total Value Remarks
1% of all currency and 1% of gold investment $20,000 $3,000 $23,000 Probable
1% of all currency and 10% of gold investment $20,000 $30,000 $50,000
10% of all currency and 1% of gold investment $200,000 $3,000 $203,000
50% of all currency and 50% of gold investment $1,000,000 $150,000 $1,150,000
100% of all currency and 100% of gold investment $2,000,000 $300,000 $2,300,000 Very Unlikely
@agnelvishal
agnelvishal / pylinkvalidate.py
Created June 3, 2018 12:24
pylinkvalidator crawler simple program. (Python 2.7)
#install pylinkvalidator and lxml from pip
from pylinkvalidator.api import crawl_with_options
import lxml
crawled_site = crawl_with_options(["https://en.wikipedia.org/wiki/Introduction_to_quantum_mechanics"], {"progress":True, "parser":'lxml', "workers": 400,"depth":1000})
@agnelvishal
agnelvishal / encryptAndDecrypt.js
Created September 28, 2019 14:53
Encrypt and Decrypt using Js
async function main() {
keyPair = await window.crypto.subtle.generateKey(
{
name: "RSA-OAEP",
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
hash: "SHA-256",
},
true,
["encrypt", "decrypt"]

Keybase proof

I hereby claim:

  • I am agnelvishal on github.
  • I am agnel (https://keybase.io/agnel) on keybase.
  • I have a public key ASC3V3MG5WQsg9qVstCq_uxNA0sKRs2S_2Cyl2zKWnK_Qgo

To claim this, I am signing this object:

<script src="https://unpkg.com/blockstack@19.2.1/dist/blockstack.js" integrity="sha384-+qYCYoUGzsMLAzHm80c4DyhbWgHBBb2N0RFqsg7Lws5ljtBtj/IwpgxZkiR7j7lp" crossorigin="anonymous"></script>
<button id="signin-button">Sign in with Blockstack </button>
<script>
const appConfig = new blockstack.AppConfig();
const userSession = new blockstack.UserSession({ appConfig: appConfig });
document.getElementById('signin-button').addEventListener('click', function() {
userSession.redirectToSignIn();
});
if (userSession.isUserSignedIn()) {
@agnelvishal
agnelvishal / createAddressApi.js
Last active October 23, 2019 09:13
Rydeum Generate Address api code
var addR = await fetch("http://localhost:3000/createAdd") //Calls the api for creating address
var addJ = await addR.json() // Converts binary stream to json
console.log(addJ.ethWallet.address) // Prints the wallet address
console.log(addJ.ethWallet.privateKey) // Prints the PrivateKey
@agnelvishal
agnelvishal / api.js
Last active October 23, 2019 09:14
Rydeum wallet transfer api call code
async function walletTransfer(amount,fromAddress,fromPrivateKey,Daddress, Oaddress, Raddress, DPercent = 60, OPercent = 20, RPercent) {
if(typeof RPercent != 'undefined')
{
RPercent = Math.round(100-OPercent-DPercent)
}
const serverUrl = "http:///localhost:3000/send"
let fetchUrl = serverUrl + "?amount=" + amount + "&fromAddress="+fromAddress+"&fromPrivateKey=" + fromPrivateKey +"&Daddress=" + Daddress + "&Oaddress=" + Oaddress + "&Raddress=" + Raddress + "&DPercent=" + DPercent + "&OPercent=" + OPercent + "&RPercent=" + RPercent;
promiseData = await fetch(fetchUrl);
jsonData = await promiseData.json();
return jsonData
[{"name":"vishal"},{"name":"some"},{"name":"some Cat"},{"name":"aaa"}]