Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Sunday, April 24, 2022

Delete Linux File with Special Characters in the Name

I mistakenly created a file called "vscode.list'". Note that there is a single quote appended to the last character. This will create a problem when trying to execute rm vscode.list'.
This is the workaround as executed through the terminal command line.
root@mya55:/etc/apt/sources.list.d# ls
google-chrome.list vscode.list vs.code.list'
root@mya55:/etc/apt/sources.list.d# ls -li
total 8
3933142 -rwxr-xr-x 1 root root 190 Nov 11 14:26 google-chrome.list
3933031 -rw-r--r-- 1 root root 129 Apr 23 18:38 vscode.list
3933030 -rwxr-xr-x 1 root root 0 Apr 24 2022 vscode.list’
root@mya55:/etc/apt/sources.list.d# find . -inum 3933030 -exec rm -v {} \;
removed './vscode.list’'
root@mya55:/etc/apt/sources.list.d# ls
google-chrome.list vscode.list
root@mya55:/etc/apt/sources.list.d#

Sunday, April 3, 2022

bash: ./saycheese.sh: Permission denied

  • https://kalilinuxtutorials.com/saycheese/
  • https://baasith-shiyam1.medium.com/how-to-hack-into-a-phone-camera-kali-linux-7618da3149d1
  • https://github.com/hangetzzu/saycheese
  • Tried to run a shell script in the folder /saycheese.

    Output from Terminal Emulator

    mya55@mya55:~/saycheese$ ./saycheese.sh
    bash: ./saycheese.sh: Permission denied

    mya55@mya55:~/saycheese$ getfacl saycheese.sh
    # file: saycheese.sh
    # owner: mya55
    # group: mya55
    user::rw-
    group::r--
    other::r--

    mya55@mya55:~/saycheese$ chmod u+x saycheese.sh
    mya55@mya55:~/saycheese$ getfacl saycheese.sh
    # file: saycheese.sh
    # owner: mya55
    # group: mya55
    user::rwx
    group::r--
    other::r--

    Thursday, March 24, 2022

    Sunday, March 6, 2022

    Successfully minted NFT to Ethereum Ropsten Network

    Using only my linux laptop, I wanted to send an NFT to the Ethereum block chain in order to better understand the process. After checking out several on-line tutorials and failing, I went straight to the source and followed the steps in the following web pages:

      1. https://ethereum.org/en/developers/tutorials/how-to-write-and-deploy-an-nft/
      2. https://ethereum.org/en/developers/tutorials/how-to-mint-an-nft/
      3. https://ethereum.org/en/developers/tutorials/how-to-view-nft-in-metamask/

    My previous attempts may have failed because there were too many steps including creating a web app on my laptop, starting localhost http://localhost:3000/, putting the NFT MetaData file at http://localhost:3000/api/erc721/, and then making that file available to the internet using ngrok. Somewhere in there, I am sure there was a typo or a piece missing.

    The Ethereum tutorials uploaded the actual NFT image and the NFT meta data to Pinata so there was no need to open up my laptop to the internet. Moreover since I am not creating a production ready NFT, I used my own website at http://spideronfire.com to store the actual image and the meta data

    Essentially this is what happens:

  • Create a smart contract
  • Make it Ethereum compliant with OpenZeppelin, Hardat and ethers
  • Connect to Ethereum through the Alchemy Node
  • Send the smart contract to the Alchemy node through your MetaMask wallet
  • Wait for Alchemy to validate the transaction
  • Get the contract address from Alchemy or https://ropsten.etherscan.io/
  • Mint the NFT using the contract address and a meta data file
  • The meta data file has a url to the actual image file

  • The following is a dump of the steps that I took so I can refer back to them after I forget what I did 5 minutes from now.
    1. Sign into Alchemy with google
    https://dashboard.alchemyapi.io/apps/d8wedo96vjsesxnw
    2. MetaMask Chrome extension connected to Ropsten Network
    Wallet funded with fake wei
    3. mkdir nft-project2
    4. cd nft-project2 and open terminal
    5. mya55@mya55:~/nft-project2$ npm init
    6. mya55@mya55:~/nft-project2$ npm install --save-dev hardhat
    7. mya55@mya55:~/nft-project2$ npx hardhat
    8. Select “create an empty hardhat.config.js”:
    9. mya55@mya55:~/nft-project2$ mkdir contracts
    10. mya55@mya55:~/nft-project2$ mkdir scripts
    11. Create contracts/MyNFT.sol and paste code
    12. remove the word Ownable on line 10 and onlyOwner on line 17 ?
    13. constructor() ERC721("SpiFiGen", "SFG")
    14. mya55@mya55:~/nft-project2/contracts$ npm install @openzeppelin/contracts
    15. mya55@mya55:~/nft-project2$ npm install dotenv --save
    16. create .env file in /nft-project2/
    17. Populate with Alchemy and MetaMask keys
    18. /nft-project2$ npm install --save-dev @nomiclabs/hardhat-ethers ethers@^5.0.0
    19. UPDATE HARDHAT.CONFIG.JS
    20. mya55@mya55:~/nft-project2$ npx hardhat compile
    21. Create /scripts/deploy.js
    22. mya55@mya55:~/nft-project2$ npx hardhat --network ropsten run scripts/deploy.js
    23. Compiled 1 Solidity file successfully
    Contract deployed to address: 0x157FCaD0869E00E1412C3af5C6AC21f7D22c8783
    24. https://ropsten.etherscan.io/
    25. END: https://ethereum.org/en/developers/tutorials/how-to-write-and-deploy-an-nft/
    26. Start: https://ethereum.org/en/developers/tutorials/how-to-mint-an-nft/
    27. mya55@mya55:~/nft-project2$ npm install @alch/alchemy-web3
    28. /scripts/ CREATE A MINT-NFT.JS FILE
    29. Code with ABI file location and contract address from etherscan.io
    30. contract: 0x157fcad0869e00e1412c3af5c6ac21f7d22c8783
    31. mintNFT("https://spideronfire.com/SpiFiGen/metadata.js")
    instead of IPFS Pinata upload
    32. node scripts/mint-nft.js
    33. The hash of your transaction is:
    0x86c7937597433eb4f9de36902081baf6849e2bbd6f0952730d8423a34ac360a2
    Check Alchemy's Mempool to view the status of your transaction!
    34. https://dashboard.alchemyapi.io/mempool
    35. Start https://ethereum.org/en/developers/tutorials/how-to-view-nft-in-metamask/
    36. Open MetaMask Android. Ropsten Network. Import NFT from contract address
    37. It WORKED!

    Tuesday, March 1, 2022

    Kali Linux Install Node

    Steps culled from https://www.freecodecamp.org/news/how-to-install-node-in-your-machines-macos-linux-windows/
  • Open terminal: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
  • Close terminal
  • Open terminal: nvm ls
  • Same terminal: nvm install 12.18.1
  • Same terminal: nvm use 12.18.1
  • Same terminal: node -v
  • Uninstall Node: rm -rf $NVM_DIR ~/.npm ~/.bower

  • Thursday, February 24, 2022

    The SpiderOnFire NFT Drop Strategy

    This seems like a natural fit since the creator of W.A.R. (me under the purview of SpiderOnFire) envisioned dead drops as a possible application when first releasing the W.A.R. app in 2012.

    SpiderOnFire will be minting W.A.R. NFTs through its page https://spideronfire.com/makenft.php

    Here is how we would like to integrate the NFT world into our metaverse a.k.a. Widespread Augmented Reality (W.A.R.).

  • Drop SpiderOnFire NFTs under private handles at physical locations.
  • W.A.R. users within 3 miles of these locations will be able to tap on the NFT geotag in their heads up display and start a redeem process.
  • Still hashing out the redeem process.
  • Maybe the first user to tap on the NFT geotag will own it with a signed transaction sent to a blockchain.
  • Maybe subsequent taps will trigger a bid to buy the NFT geotag.
  • Still hashing out the incentive or motivation.
  • Perhaps this is finally a way to gamify and monetize the W.A.R. app.
  • Go ahead. Feel free to steal my idea.

    Monday, February 7, 2022