Introduction:
Hey developers! Ready for some awesome tricks to make your coding life easier?
Today, I’ve got some cool stuff to share that might speed up your development.
1. Flutter Screenshots
If you’re into Flutter, we’ve got a neat trick for you. Use this command
to grab a screenshot of your running device which can be your physical device, emulator, simulator
2. SCRCPY -Vysor Alternative
Scrcpy is an open-source application that allows you to display and control Android devices connected to your computer via USB or over a TCP/IP connection. The name “scrcpy” is derived from “screen copy.” It provides a way to mirror your Android device’s screen on your computer and control it using the mouse and keyboard.
Both scrcpy and Vysor are tools designed for screen mirroring and controlling Android devices from a computer. While they share some similarities, they also have differences in terms of features, usage, and licensing. Here are some key features and considerations for both scrcpy and Vysor:
SCRCPY:
- Open Source: Scrcpy is an open-source project, which means it is freely available, and users can access and modify its source code.
- Low Latency: Scrcpy is known for its low-latency screen mirroring, providing a responsive and smooth experience.
- High Quality: It mirrors the Android device’s screen in high quality, allowing for clear visibility and effective control.
- Cross-Platform: Scrcpy is compatible with Windows, macOS, and Linux, making it a versatile solution for users on different operating systems.
- No Root Required: Scrcpy does not require the Android device to be rooted; it uses Android Debug Bridge (ADB) for connection.
VYSOR:
- User Interface: Vysor typically comes with a graphical user interface (GUI) that makes it user-friendly and easy to operate for those who prefer a point-and-click approach.
- USB and Wireless Connection: Vysor supports both USB and wireless connections for screen mirroring and control.
- Free and Paid Versions: Vysor offers both free and paid versions. The free version may have limitations, while the paid version may include additional features.
- Root Access for Full Control: Some advanced features in Vysor, such as controlling certain aspects of the device, may require root access.
- Compatibility: Vysor is also compatible with Windows, macOS, and Linux, providing a wide range of options for users.
Comparison:
- Licensing: Scrcpy is open-source and free to use, while Vysor has both free and paid versions.
- Control Method: Scrcpy is often used via the command line interface, while Vysor typically provides a graphical user interface for control.
- Latency: Both scrcpy and Vysor aim for low-latency performance, but individual experiences may vary.
Ultimately, the choice between scrcpy and Vysor may depend on user preferences, the desired feature set, and whether open-source software is a priority. Users are encouraged to try both tools and decide which one better suits their needs.
3. Postman – Postbot – Your AI Testing Buddy
Testing APIs just got easier with Postbot. It’s like having a robot friend who checks big responses for you. Postbot automatically creates test cases for your APIs which just take input as natural language
4. Homebrew
No more headaches installing apps on your computer. Homebrew is a command line tool for your Mac or Linux, you can install/uninstall many tools or SDK with just only one command like below
brew install flutter
brew install node
To install Homebrew on your macOS or Linux system, use the below command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
5. Remove duplicate keys from your object in javascript
Did you get duplicate keys? No problem! Just stringify and parse, and voila – duplicates are gone.
const originalObject = {
name: 'John Doe',
age: 30,
address: '123 Main St',
age: 30, // Duplicate key
};
const cleanedObject = JSON.parse(JSON.stringify(originalObject));
console.log(cleanedObject);
6. Remove Duplicate Items from your List
Do you want to remove duplicate items from a list? Here is the shortcut, Just convert your list into a set – this will automatically eliminate all duplicate entries. Then, convert the set back into a list. Now you will get your list without duplicate items
const originalList = [1, 2, 3, 3, 4, 5, 5];
const cleanList = [...new Set(originalList)];
console.log(cleanList);
7. ADB CLI – Controlling Android Device without Touching It
- Install ADB CLI using Homebrew
To control your Android device from your computer, you can use the Android Debug Bridge (ADB) command-line tool. If you haven’t installed ADB, you can do so with Homebrew by running the following command:
brew install --cask android-platform-tools
This command will install the Android Platform Tools package, which includes ADB.
- Access Phone’s Shell
After installing ADB, you can access your Android device’s shell directly from the command line. This can be useful for various tasks and commands. To enter the shell, use the following command:
adb shell
This opens a shell prompt where you can interact with your device’s file system and execute commands.
- Install Apps
ADB allows you to install Android apps (APK files) onto your device from your computer. Use the following command structure to install an app:
adb install /path/to/app.apk
Replace “/path/to/app.apk” with the actual path to the APK file you want to install.
- Uninstall Apps
If you want to remove an installed app from your Android device, you can use ADB to uninstall it. Replace “package_name” with the actual package name of the app you want to uninstall. You can find the package name in the app’s details or by using other ADB commands.
adb uninstall package_name
8. Whitecodel Auto Link
This is a package for Flutter developers, This script automates the process of building and uploading Flutter APK and IPA files to Diawi.
Now you don’t need to upload the APK or IPA files to Diwai manually it automaticaly upload and gives you links for APK and IPA files in your terminal
whitecodel_auto_link <token> <buildType> <releaseType>
Package link:
https://pub.dev/packages/whitecodel_auto_link: Tips & Tricks PART – 1Tell Us Your Tip and Share the Benefits:
How much did you already know? Drop a comment below and let’s see who’s already a coding wizard!
And hey, for those who tried these tips, share your benefits below! Let’s celebrate the victories and make coding even more awesome together.
Conclusion:
Hope these tricks make your coding journey a bit more fun and a lot more efficient. Happy coding, and may your projects be full of awesome surprises!
Great information sir
Thank you, Vaishnavi Singh! I’m glad you enjoyed my post and took the time to leave a comment. Your positive feedback means a lot to me!