Pushakar Gaikwad https://pushakar.com/ Software Developer, Blogger, Tech enthusiast Sat, 16 Nov 2024 02:25:08 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 208136840 Wireless debugging on Android – Use ADB using Wi-Fi https://pushakar.com/2024/11/13/wireless-debugging-on-android-use-adb-using-wi-fi/ https://pushakar.com/2024/11/13/wireless-debugging-on-android-use-adb-using-wi-fi/#respond Wed, 13 Nov 2024 05:42:42 +0000 https://pushakar.com/?p=4032 Tutorial/Commands on How to enable wireless debugging on android. This will let you use adb using Wi-Fi on your android

The post Wireless debugging on Android – Use ADB using Wi-Fi appeared first on Pushakar Gaikwad.

]]>
Tutorial/Commands on How to enable wireless debugging on android. This will let you use adb using Wi-Fi on your android
An image showing android device connected wirelessly using Wi-Fi to computer using adb for debugging and development

Most of the times android developers connect their android devices using usb cable for debugging and developing their applications. It might not be ideal to keep the device connected. In this short tutorial you will get to see how to enable wireless debugging on your android and then connect to the android device using adb using Wi-Fi from your computer

Connecting to your Android Device

Prerequisites

  • Make sure developer mode is on
  • Both mobile device and computer are connected to the same network
  • adb is installed and in system path of the computer

Steps

  • In Settings search for “Wireless debugging”
    • Turn on the toggle
  • It will display ip address and port
    • Here for example it shows 192.168.1.11:40369
  • On your computer, in the terminal run the following command using the ip address and port from previous step
    • adb connect 192.168.1.11:40369
  • You will get a confirmation output `connected to 192.168.1.11:40369`
    • You can also manually get a list of connected devices just to verify
      • adb devices

Disconnecting your Android

Type the following command using the ip address and port from previous steps.

adb disconnect 192.168.1.11:40369


Additionally if you dont know the ip address and port you can check it using the command adb devices

The post Wireless debugging on Android – Use ADB using Wi-Fi appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/11/13/wireless-debugging-on-android-use-adb-using-wi-fi/feed/ 0 4032
Boost Your Python Workflow: Pip and Anaconda Tips https://pushakar.com/2024/11/13/python-cheatsheet/ https://pushakar.com/2024/11/13/python-cheatsheet/#respond Wed, 13 Nov 2024 04:10:27 +0000 https://pushakar.com/?p=4022 Python Cheatsheet PIP (Python Package Installer) Update a pip package Clean pip cache Anaconda / miniconda Command-Line Tips Managing Environments Create new conda environment You can replace the 3.11 with any the python version as required Remove conda environment Make sure to deactivate the environment if you are trying to remove the active environment using … Continue reading Boost Your Python Workflow: Pip and Anaconda Tips

The post Boost Your Python Workflow: Pip and Anaconda Tips appeared first on Pushakar Gaikwad.

]]>
Python Cheatsheet

PIP (Python Package Installer)

Update a pip package

pip install --upgrade package-name

Clean pip cache

pip cache purge

Anaconda / miniconda Command-Line Tips

Managing Environments

Create new conda environment
conda create --name environment_name python=3.11 

You can replace the 3.11 with any the python version as required

Remove conda environment
conda env remove --name environment_name

Make sure to deactivate the environment if you are trying to remove the active environment using conda deactivate

Reclaim Storage

Clean cache, reclaim storage, and remove unused or temporary packages:
conda clean --all

That’s it for now, adding more soon

Boost your Python development efficiency with these quick commands! Whether you use pip or Anaconda, keeping your environment clean and up-to-date is essential for smooth workflows. Save this cheatsheet for your next Python project.

Looking for more Python tips? Stay tuned for regular updates on mastering Python!

The post Boost Your Python Workflow: Pip and Anaconda Tips appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/11/13/python-cheatsheet/feed/ 0 4022
VS Code Shortcuts Cheatsheet https://pushakar.com/2024/10/14/vs-code-shortcuts-cheatsheet/ https://pushakar.com/2024/10/14/vs-code-shortcuts-cheatsheet/#respond Mon, 14 Oct 2024 05:14:34 +0000 https://pushakar.com/?p=4001 Here is a list of Shortcuts that I use regularly in VS Code. Some maybe obvious and basic and some can be hidden gems In no particular order: Alt+Shift+F => Format current document (requires Prettier installed Ctrl+Shift+P => Command Pallet

The post VS Code Shortcuts Cheatsheet appeared first on Pushakar Gaikwad.

]]>
Here is a list of Shortcuts that I use regularly in VS Code. Some maybe obvious and basic and some can be hidden gems

In no particular order:

Alt+Shift+F => Format current document (requires Prettier installed

Ctrl+Shift+P => Command Pallet

The post VS Code Shortcuts Cheatsheet appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/10/14/vs-code-shortcuts-cheatsheet/feed/ 0 4001
Fixing Plugin Compatibility in React Native Web with Expo: How to Disable Google AdMob and Other Native Modules https://pushakar.com/2024/10/11/fixing-plugin-compatibility-in-react-native-web-with-expo-how-to-disable-google-admob-and-other-native-modules/ https://pushakar.com/2024/10/11/fixing-plugin-compatibility-in-react-native-web-with-expo-how-to-disable-google-admob-and-other-native-modules/#respond Fri, 11 Oct 2024 11:42:42 +0000 https://pushakar.com/?p=3997 React Native has made it incredibly easy to develop cross-platform apps that work on both mobile and web using frameworks like Expo. However, there are times when a native plugin (designed for iOS or Android) isn’t compatible with the web platform. One common example is Google AdMob (react-native-google-mobile-ads), which can cause crashes when trying to … Continue reading Fixing Plugin Compatibility in React Native Web with Expo: How to Disable Google AdMob and Other Native Modules

The post Fixing Plugin Compatibility in React Native Web with Expo: How to Disable Google AdMob and Other Native Modules appeared first on Pushakar Gaikwad.

]]>
React Native has made it incredibly easy to develop cross-platform apps that work on both mobile and web using frameworks like Expo. However, there are times when a native plugin (designed for iOS or Android) isn’t compatible with the web platform. One common example is Google AdMob (react-native-google-mobile-ads), which can cause crashes when trying to build for the web with errors like:

Error: Module not found: Can’t resolve ‘../Utilities/Platform’

This type of error can be frustrating, especially when you’re trying to maintain a shared codebase for both mobile and web. In this guide, I’ll show you how to “mock” or disable incompatible modules for specific platforms using a simple configuration tweak in your metro.config.js file.

The Problem: Incompatible Plugins on Web

When working with React Native apps, you might want to include certain modules, like Google AdMob, to monetize your app. However, plugins like react-native-google-mobile-ads rely on native iOS and Android APIs and will throw errors when included in a web build because the required native code doesn’t exist in the web environment. For example, you might encounter this error during a web build:

Error: Module not found: Can’t resolve ‘../Utilities/Platform’

In this case, the app crashes because it’s trying to resolve native utilities that are unavailable on the web platform.

The goal is to disable the incompatible plugin from the web build so the rest of the app can function properly without issues.

The Solution: Customizing Metro Bundler to Skip Web-Incompatible Modules

Luckily, Metro bundler (the JavaScript bundler used by React Native) provides a way to conditionally exclude or mock modules based on the platform. We can use a clever hack by modifying the metro.config.js file to instruct Metro to skip loading certain modules when building for the web.

Let’s walk through the solution step by step.

Modify metro.config.js :

In your React Native project, locate the metro.config.js file. If it doesn’t exist, create one in the root of your project.

Add the following code to your metro.config.js:


Explanation of the Code:

  1. Get the Default Metro Config:
    We’re first getting the default Metro configuration using getDefaultConfig from expo/metro-config.
  2. Resolver Override:
    The resolver.resolveRequest function allows us to customize how modules are resolved for different platforms. This is the key to our solution.
  3. Platform-Specific Module Exclusion:
    We’re adding a condition to check if the current platform is 'web' and the module name is 'react-native-google-mobile-ads'. If these conditions are true, we return an object with type: 'empty'. This effectively mocks the module, making it appear as an empty module for the web platform, preventing the app from crashing due to missing dependencies.
  4. Fallback to Default Resolver:
    After our custom condition, we ensure the default resolver is called to handle other modules that are not problematic.

Why This Approach Works

React Native modules like react-native-google-mobile-ads are built to interact with native APIs on Android and iOS, but web platforms don’t have access to these APIs. By instructing Metro to return an empty module for web builds, we can safely bypass the need for these plugins without affecting the mobile versions of the app.

This method is:

  • Simple: You only need to modify one file, metro.config.js, to skip incompatible modules.
  • Safe: This approach doesn’t impact mobile builds, so you can continue using native plugins on iOS and Android without issues.
  • Flexible: You can extend this method to handle multiple incompatible plugins or modules across different platforms (e.g., web, desktop).

Additional Use Cases

This technique is not limited to react-native-google-mobile-ads. You can use it for any plugin or module that is incompatible with a specific platform. Here’s an example of how you could apply it to other modules:

config.resolver.resolveRequest = (context, moduleName, platform) => {
  if (platform === 'web' && moduleName === 'react-native-some-other-module') {
    return {
      type: 'empty',
    };
  }

  return context.resolveRequest(context, moduleName, platform);
};

Simply replace 'react-native-some-other-module' with the name of the plugin you want to mock.

Conclusion

If you’re building a cross-platform React Native app that targets both mobile and web, dealing with incompatible plugins can be frustrating. Thankfully, Metro’s resolveRequest functionality allows you to mock incompatible modules like react-native-google-mobile-ads, enabling you to create web builds that work seamlessly alongside mobile ones.

This approach saves time, prevents crashes, and makes your development process smoother. Happy coding! 🎉

Key Takeaways:

  • You can mock or skip incompatible plugins on specific platforms using metro.config.js.
  • This solution works by checking the platform and conditionally returning an empty module.
  • The approach doesn’t affect mobile builds, so your native modules will still work as intended on iOS and Android.

You can now implement this solution and even share it with your developer peers if they face similar issues. It’s a simple yet effective way to ensure your app remains stable across multiple platforms.

The post Fixing Plugin Compatibility in React Native Web with Expo: How to Disable Google AdMob and Other Native Modules appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/10/11/fixing-plugin-compatibility-in-react-native-web-with-expo-how-to-disable-google-admob-and-other-native-modules/feed/ 0 3997
Essential Resources for Social Media Content Creation and Management https://pushakar.com/2024/08/27/social-media-content-creation-management-resources/ https://pushakar.com/2024/08/27/social-media-content-creation-management-resources/#respond Tue, 27 Aug 2024 14:50:31 +0000 https://pushakar.com/?p=3952 Explore top resources for social media content creation and management, including tools for video downloads, hashtag generation, stock images, and WordPress optimization.

The post Essential Resources for Social Media Content Creation and Management appeared first on Pushakar Gaikwad.

]]>
Creating and managing social media content can be a daunting task, but with the right tools, it becomes much easier. Here’s a curated list of resources that can help streamline your social media workflow.

  1. AnyVideo Downloader Flow Plugin
    Download videos from any website, including YouTube and Instagram. Requires Flow Launcher.
  2. Playphrase.me
    Search and download clips from movies based on dialogue text. Perfect for finding that exact phrase to enhance your content.
  3. Veed Hashtag Generator
    Generate relevant hashtags for your posts to boost visibility and engagement.
  4. WordPress
    A battle-tested open-source platform for self-hosting websites and blogs. Highly customizable with a vast array of plugins.
  5. Unsplash, Pixabay, Pexels
    Access thousands of high-quality, free-to-use stock photos, videos, music and audio effects to enhance your social media content. Whether you need them for posts, blogs, or ads, these platforms provide an excellent selection without the worry of copyright issues.

The post Essential Resources for Social Media Content Creation and Management appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/08/27/social-media-content-creation-management-resources/feed/ 0 3952
My Journey into Self-Hosting Frappe-Based Custom Apps with Docker on DigitalOcean https://pushakar.com/2024/08/27/self-hosting-frappe-docker-digitalocean/ https://pushakar.com/2024/08/27/self-hosting-frappe-docker-digitalocean/#respond Tue, 27 Aug 2024 10:15:08 +0000 https://pushakar.com/?p=3950 Join me as I explore the process of self-hosting Frappe-based custom apps using Docker on DigitalOcean. Learn about building custom Docker images, setting up on DigitalOcean, and more!

The post My Journey into Self-Hosting Frappe-Based Custom Apps with Docker on DigitalOcean appeared first on Pushakar Gaikwad.

]]>
Introduction:

As I dive deeper into the world of Frappe-based custom apps, I find myself constantly learning and adapting. Recently, I’ve been exploring how to self-host these apps using Docker, and I’ve been considering DigitalOcean as my go-to platform for hosting. While I’m still learning the ropes, I wanted to share my experience so far and the steps I’ve planned to get things up and running.

The Inspiration:

While searching for guidance, I stumbled upon this incredibly insightful video. It really helped clarify a lot of the concepts that were previously a bit murky for me. The video features a guest, Revant, who guided through the process and shared a Gist with the commands used. If you’re in the same boat as I am, I highly recommend giving it a watch.

Key Takeaways So Far:

One of the key takeaways from my research is that when working with Docker for custom Frappe apps, you can’t just mount the repository directory and install the app. Instead, you need to build custom Docker images tailored to your app. This was a bit of a surprise to me, but it makes sense now that I think about it.

To help others follow along with what I’ve learned, Revant shared a Gist with the commands used in the video. Feel free to check it out if you’re interested.

Planning the Setup on DigitalOcean:

Once I’ve built the custom Docker image, the next step is to deploy it on a cloud instance. I’m planning to use a new Ubuntu instance on DigitalOcean for this purpose. The cool thing is, you can use the Frappe easy install script, which handles the installation and configuration of Frappe Docker for you. This script is versatile and can be used in both development and production environments. Here’s a link to the script in case you want to explore it.

Looking Ahead:

As of now, I’m still in the process of setting everything up, but it’s been a rewarding journey so far. I’ll continue to share my experiences as I execute the steps and get the system running. If you’re also exploring Frappe with Docker, let’s connect and share tips—there’s always more to learn together!

To Be Continued…

Stay tuned for more updates as I progress through this setup. I’ll be sharing the challenges, solutions, and everything in between as I go along.

The post My Journey into Self-Hosting Frappe-Based Custom Apps with Docker on DigitalOcean appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/08/27/self-hosting-frappe-docker-digitalocean/feed/ 0 3950
Essential Resources for Enhancing Your Writing Skills https://pushakar.com/2024/08/20/essential-resources-for-enhancing-your-writing-skills/ https://pushakar.com/2024/08/20/essential-resources-for-enhancing-your-writing-skills/#respond Tue, 20 Aug 2024 07:39:51 +0000 https://pushakar.com/?p=3941 A Collection of Tools, References, and Techniques to Help with Writing Writing Techniques for Storytelling Must-Read Books for Writers

The post Essential Resources for Enhancing Your Writing Skills appeared first on Pushakar Gaikwad.

]]>
A Collection of Tools, References, and Techniques to Help with Writing

Writing Techniques for Storytelling

Must-Read Books for Writers

... This post is developing as I am resuming my creator activities and a part of it is publishing to my blog and other social media accounts. A part of which will involve writing lists of resources like this one that will be updated with time.

The post Essential Resources for Enhancing Your Writing Skills appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/08/20/essential-resources-for-enhancing-your-writing-skills/feed/ 0 3941
My Favourite Open Source Projects https://pushakar.com/2024/01/23/my-favourite-open-source-projects/ https://pushakar.com/2024/01/23/my-favourite-open-source-projects/#respond Tue, 23 Jan 2024 14:18:19 +0000 https://pushakar.com/?p=3706 In no particular order Jellyfin Media Server – Movies, TV, music management logseq outliner based notetaking, Personal Knowledge Management anytype notion alternative, but local and p2p odoo Enterpise Software – ERP, CRM, MRP, Project Management, Accounting KDEConnect Open source alternative to Apple’s ecosystem, like airdrop, clipboard sync syncthing p2p file syncing

The post My Favourite Open Source Projects appeared first on Pushakar Gaikwad.

]]>
In no particular order

JellyfinMedia Server – Movies, TV, music management
logseqoutliner based notetaking, Personal Knowledge Management
anytypenotion alternative, but local and p2p
odooEnterpise Software – ERP, CRM, MRP, Project Management, Accounting
KDEConnectOpen source alternative to Apple’s ecosystem, like airdrop, clipboard sync
syncthingp2p file syncing

The post My Favourite Open Source Projects appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/01/23/my-favourite-open-source-projects/feed/ 0 3706
ComfyUI Resources https://pushakar.com/2024/01/22/comfyui-resources/ https://pushakar.com/2024/01/22/comfyui-resources/#respond Mon, 22 Jan 2024 17:38:25 +0000 https://pushakar.com/?p=3697 A collection of resources for ComyfUI : a advanced UI for Stable Diffusion Extensions InstantID : a tuning-free method to achieve ID-Preserving generation with only single image Tutorials

The post ComfyUI Resources appeared first on Pushakar Gaikwad.

]]>
A collection of resources for ComyfUI : a advanced UI for Stable Diffusion

Extensions

InstantID : a tuning-free method to achieve ID-Preserving generation with only single image

Tutorials

The post ComfyUI Resources appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/01/22/comfyui-resources/feed/ 0 3697
Automatic1111 Resources https://pushakar.com/2024/01/22/automatic1111-resources/ https://pushakar.com/2024/01/22/automatic1111-resources/#respond Mon, 22 Jan 2024 17:37:20 +0000 https://pushakar.com/?p=3695 A collection of resources for Automatic1111 the most popular UI for Stable Diffusion Extensions Models Loras Articles, tutorials, forums

The post Automatic1111 Resources appeared first on Pushakar Gaikwad.

]]>
A collection of resources for Automatic1111 the most popular UI for Stable Diffusion

Extensions

Models

Loras

Articles, tutorials, forums

The post Automatic1111 Resources appeared first on Pushakar Gaikwad.

]]>
https://pushakar.com/2024/01/22/automatic1111-resources/feed/ 0 3695