Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • yalamber 1:41 pm on December 23, 2021 Permalink | Reply
    Tags: blockchian, grpc, Iotex   

    RPC call to read state of iotex blockchian and get voters bucket list

         import RpcMethod from 'iotex-antenna/lib/rpc-method';
         import { IReadStakingDataMethodToBuffer, IReadStakingDataMethodName, 
            IReadStakingDataRequestToBuffer } from 'iotex-antenna/lib/rpc-method/types';
         import { VoteBucketList } from 'iotex-antenna/protogen/proto/types/state_data_pb';
    
          const ioAddress = from(god.currentNetwork.account)?.string();
          const state = await provider.readState({
            protocolID: Buffer.from('staking'),
            methodName: IReadStakingDataMethodToBuffer({
              method: IReadStakingDataMethodName.BUCKETS_BY_VOTER
            }),
            arguments: [
              IReadStakingDataRequestToBuffer({
                bucketsByVoter: {
                  voterAddress: ioAddress,
                  pagination: {
                    offset: 0,
                    limit: 1000
                  }
                }
              })
            ],
            height: undefined
          });
          let voteBucketList = VoteBucketList.deserializeBinary(state.data);
          const voteBucketListObj = VoteBucketList.toObject(false, voteBucketList);
          console.log(voteBucketListObj)
    
     
  • yalamber 4:51 pm on July 1, 2021 Permalink | Reply
    Tags:   

    Delete all files except specific filenames in linux
    rm -v !(“filename1″|”filename2”)

     
  • yalamber 4:50 pm on July 1, 2021 Permalink | Reply
    Tags:   

    Delete all files except specific filenames in linux
    rm -v !(“filename1″|”filename2”)

     
  • yalamber 6:04 am on November 14, 2020 Permalink | Reply
    Tags: opensource, video   

    https://matrix.org/

     
  • yalamber 4:22 am on November 14, 2020 Permalink | Reply
    Tags: deploy, rails, ruby   

    https://gorails.com/deploy/ubuntu/20.04#next-steps

     
  • yalamber 9:31 am on May 2, 2020 Permalink | Reply
    Tags:   

    Stop and remove all docker container. 

    docker stop $(docker ps -a -q)
    docker rm $(docker ps -a -q)
    
     
  • yalamber 9:30 am on May 2, 2020 Permalink | Reply
    Tags:   

    Running a container in another container network mode 

    So I had a docker image which had database host hardcoded to localhost, So in network_mode in docker compose file we could use container’s name to run in same network so that it is accessible through localhost.

     network_mode: "container:thinger"
    
     
  • yalamber 9:41 am on January 6, 2020 Permalink | Reply
    Tags: mobile development, react   

    React Native still is better solution than flutter in a true cross platform sense 🙂

     
  • yalamber 3:51 pm on November 26, 2019 Permalink | Reply
    Tags:   

    Update all docker images at once

    docker images |grep -v REPOSITORY|awk '{print $1}'|xargs -L1 docker pull 
    
     
  • yalamber 10:12 am on April 23, 2019 Permalink | Reply
    Tags:   

    4 Working with Sublists in SuiteScript 2.0

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel