Learning

📚 Documenting my learning journey | 💻 Dev diary | 🌴 Digital Garden

  • Published On

    What I'm doing now

    Updated : 17 Sep 2023

    Inspired by Derek Sivers' Now - LINK 🔗

    • 🎨 Learning Svelte and experimenting at svelte-box
    • 🧑‍💻 Learning Golang with this repo Link
    • 📚 Reading Rust Books and Actix Web Example repo - Link

    17 Sep 2023

    13 Sep 2023

    Notes

    Create go workspace

    go work init
    
    # add a module
    go work use ./<module_name>
    

    Setup Github Actions with Bun

    name: CI
    on:
      pull_request:
      merge_group:
        branches: [main, develop, release/**]
    concurrency:
      group: ${{ github.ref }}
      cancel-in-progress: true
    jobs:
      lint-check:
        name: ESLint & Test
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          - uses: oven-sh/setup-bun@v1
            with:
              node-version: '18.x'
          - name: Install dependencies
            run: bun install
          - name: Build and lint
            run: bun run lint
          - name: Test
            run: bun run test:ci
    

    06 Jan 2023

    • I challenged myself to learn CSS but focused on Animation, and I currently have five days in a row learning already. The collection on Codepen. Link

    01 Jan 2023

    • [💻 ] Fixed warning message for my Next.js project "A title element received an array with more than 1 element as children" - Reference

    10 Nov 2022

    Notes

    Add files/folders to IPFS

    
    ipfs add <file>
    
    # only hash
    
    ipfs add --only-hash -r <folder>
    
    # get and list data
    
    ipfs ls <CID>
    ipfs cat <CID>
    
    

    6 Oct 2022

    • [💻 ] Learn how to verify smart contract on Blockscout (It's so different from Etherscan)
    • [💻 ] Learn how to use Ethers.js Logs and Filtering

    Notes

    Flatten solidity

    npx hardhat flatten Hello.sol > FlattenVersion.sol
    

    Subscribe events with ethers.js

    const contract = new ethers.Contract(address, abi, provider);
    contract.on('event', cb);
    
    // with filter
    const filters = contract.filters.EventName(null, 'toAddress'); // topics set.
    contract.on(filters, cb);
    

    29 Sep 2022

    • [💻 ] Research and Learn about Sui - My notes here

    22 Jun 2022

    • [💻 ] Create Next.js Tutorial for Beginners on Devahoy (Work in Progress)

    7 May 2022

    Note

    Delete all node_modules folders.

    # listing
    find . -name "node_modules" -type d -prune -print | xargs du -chs
    
    # delete
    find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
    

    Reference : How to Delete ALL node_modules folders on your machine

    2 May 2022

    • [💻 ] Completed Build Multi-Chain Applications with Moonbeam - Link

    26 April 2022

    25 April 2022

    24 April 2022

    • [💻 ] Create NEAR NFT - Link
    • [💻 ] Create NEAR Guestbook - Link

    21 April 2022

    • [💻 ] Create Smart Contract on NEAR with AssemblyScript - Link

    20 April 2022

    • [💻 ] Try Tauri with create-tauri-app to build Desktop app with Rust - Link

    18 April 2022

    • [💻 ] Try esbuild the first time - Link

    17 April 2022

    15 April 2022

    • [💻 ] Create NEAR Hello World Smart Contract with Rust - Link

    14 April 2022

    12 April 2022

    9 April 2022

    8 April 2022

    • [💻 ] Published blog post about Solana + Anchor on Devahoy - Link

    7 April 2022

    • [💻 ] Published blog post about Solana on Devahoy - Link
    • [💻 ] Published blog post about Chainlink Solana Bootcamp - Link

    3 April 2022

    2 April 2022

    31 March 2022

    Notes

    solana-cli included:

    solana-bench-tps       solana-genesis         solana-install-init    solana-log-analyzer    solana-sys-tuner       solana-validator
    solana-dos             solana-gossip          solana-keygen          solana-net-shaper      solana-test-validator  solana-watchtower
    solana-faucet          solana-install         solana-ledger-tool     solana-stake-accounts  solana-tokens
    

    Checking and updating solana-cli

    solana-install update
    

    27 March 2022

    25 March 2022

    23 March 2022

    • [📚 ] Read the article and watched youtube about Serverless. This is my first time after hearing about it for a long time. 😄 - Link
    • [📚 ] Learn tmux / tmux command and blog about it in Thai language via Devahoy

    22 March 2022


    19 March 2022

    Notes

    Get address of the signer, ethers.js return Promise but hardhat return an address.

    • ethers.js - signer.getAddress() -> <Promise>
    • hardhat - signer.address -> String

    ethers.js

    const { Wallet, providers } = require('ethers');
    
    const url = '<RPC_URL>';
    
    const provider = new ethers.providers.JsonRpcProvider(url);
    const signer = provider.getSigner(0);
    const address = await signer.getAddress();
    

    Hardhat

    const { ethers } = require('hardhat');
    
    const [signer] = await ethers.getSigners();
    const address = signer.address;
    

    18 March 2022

    Notes

    • TIL: To use TailwindCSS with next/image together for keep image to original ratio.
    <div className="relative h-64 w-full md:h-32 md:w-48">
      <Image src={imageSrc} layout="fill" objectFit="cover" alt={title} />
    </div>
    

    Reference: https://github.com/vercel/next.js/discussions/18739


    14 March 2022

    • [💻 ] - A Configuration of Prettier & Solhint together with different rules, Use prettier.overrides - Link

    12 March 2022

    • [💻 ] - Create sample RESTFul API with Rust and Actix and writing a blog post - Article and Source Code

    10 March 2022

    • [📌 ] - Bookmark to read it later - Ray Tracing in One Weekend - Link

    Notes

    Install PostgreSQL on Mac OS:

    brew install postgresql
    
    # start/restart service
    brew services restart postgresql
    

    Connect postgresql:

    # default
    psql postgres
    
    # with connection string
    psql postgresql://custom_user:supersecret_password@localhost:5432/postgres
    # or
    psql -U custom_user -W -h localhost
    

    List and remove docker volume:

    docker volume ls
    
    # remove
    docker volume rm <VOLUME_NAME>
    

    9 March 2022

    • [📚 ] Read article - Create a blazingly fast REST API in Rust - Link
    • [💻 ] Setup sample REST API project to learn about Actix, Serde, PostgreSQL
    • [ ✍️ ] Published new article - Learn Solidity by Build Wave Portal

    7 March 2022


    6 March 2022

    • [💻 ] I finished the 50th Day of #100DaysOfcode - Link