Skip to content

Instantly share code, notes, and snippets.

View himitsu-fushigi's full-sized avatar
💭
I may be slow to respond.

Himitsu Fushigi himitsu-fushigi

💭
I may be slow to respond.
View GitHub Profile
@himitsu-fushigi
himitsu-fushigi / Ubuntu-HLF.sh
Created September 17, 2021 05:02
Initialize the instance of AWS - Ubuntu for Hyper Ledger Fabric
#!/bin/sh
# make sure the .pem or .cer is in the respsective directory
cd "Documents/Hash Technologies/Hyper Ledger Fabric" && ssh -i "HyperLedgerFabric.cer" ubuntu@ec2-18-188-175-34.us-east-2.compute.amazonaws.com
{
"blood_type": "B+ve",
"full_name": {
"first_name": "Himitsu",
"middle_name": "Phinshog",
"last_name": "Fushigi"
},
"contact_details": {
"email": {
"primary": "himitsu.fushigi.07.26@protonmail.com",
// @dev cargo doc --open will build a documentation of dependencies and their methods
// @dev alike C,C++ input and output is from standard io library
// @dev std has many features but this time we imported for input feature
use std::io;
// @dev rand is a package/dependency added later through toml
use rand::Rng;
// @dev main is the entry point in the rust program
fn main(){
// Here's how we would access our contract:
var abi = /* abi generated by the compiler */
var ZombieFactoryContract = web3.eth.contract(abi)
var contractAddress = /* our contract address on Ethereum after deploying */
var ZombieFactory = ZombieFactoryContract.at(contractAddress)
// `ZombieFactory` has access to our contract's public functions and events
// some sort of event listener to take the text input:
$("#ourButton").click(function(e) {
var name = $("#nameInput").val()