November 26, 2021

BitBucket to GitHub Repo Migration including history

Hi all,

In this blog, we are going to achieve how we can move/copy the bitbucket repo to GitHub.

Checkout BitBucket Repo

git clone https://USER@bitbucket.org/USER/PROJECT.git

Add GitHub repo as upstream

cd project-folder git remote add upstream https://github.com:USER/PROJECT.git

Push the branch(es)

git push upstream master git push --tags upstream

On push unsuccessful, try the below to have same history

git checkout upstreambranch git branch main upstreambranch -f git checkout main git push origin main -f

Add redirect URL

git remote set-url origin git@github.com:USER/PROJECT.git

Clean up the BitBucket (old) repo [Optional]

Verify the content carefully on the GitHub repo

  1. Go to BitBucket account
  2. Navigate to the respective repository
  3. Click Settings -> Delete repository

Hope this helps you to organize the repositories as per your choice to serve the best way for dev and ops.

Please send your feedback and comments to psrdotcom@gmail.com

Flutter Local (Inbuilt) Authentication usage

Hi folks,

Today I will explain the process of using local (in-built) authentication usage in Flutter.

Pre-requisites

1. pubspeck.yaml update
dependencies:
      local_auth: ^0.6.2+3
2. Install the packages from command line
    $ flutter pub get
    Note: In Visual Studio Code or Android Studio automatically by saving the pubspec.yaml file packages will get updated

Usage

1. Import the package in the respective dart file (say main.dart)
    import 'package:local_auth/local_auth.dart';
2. 

Troubleshooting

1. I/flutter : PlatformException(no_fragment_activity, local_auth plugin requires activity to be a FragmentActivity., null)

  • Open /android/app/src/main/kotlin/../MainActivity.kt
  • Update the file with following content
package com.[your.package]

import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterFragmentActivity() {
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);
    }
}

Please send your feedback and comments to psrdotcom@gmail.com


November 17, 2021

Extend Ubuntu VM hard disk space/size

 Hi all,


Today I will explain about the process to extend and existing disk space in Ubuntu VM.

Environment

  1. VMWare
  2. Ubuntu

Context

Increase hard disk space more than initially configured for the Ubuntu VM.

Reason

VM hard disk might running out of space.

Procedure

  • Make sure we have shutdown the Ubuntu VM
  • Increase the hard disk size
    • Make sure it's in the allowed range
  • Start the VM
  • Open the Disks application in Ubuntu
  • In below example we are extending it by additional 3GB
  • Select the Extended Partition block
  • Click Settings (Gear) icon
  • Choose Resize option
  • Use the increment (+) icon or scroll bar to increase the partition size
  • Click on Resize button
  • Enter credentials when prompted
  • By now, the extended partition will be increased
  • Time to select the file system, where exactly our data is getting stored
  • We will repeat the process of resizing like earlier
  • Using scrollbar increase the disk size
  • Click on the Resize button
  • The harddisk size is been reflected.
Hurray !! You have increased your hard disk size to store more data on the Ubuntu VM.

The same process can be used for normal Ubuntu OS also.

Please send your comments and feedback to psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com