Tuesday, 4 May 2021

How to solve composer's InvalidArgumentException Errror in Drupal 8?

Solving the composer require drupal/csv_serialization Error

The other day, I was following the Drupal documentation and tried to install the csv_serialization module with this command:

composer require drupal/csv_serialization

Instead of a smooth install, I got slapped with this error:

[InvalidArgumentException]  
Could not find a matching version of package drupal/csv_serialization.  
Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

At first, it felt like I had messed up the spelling or version, but that wasn’t the case. The issue was actually with Composer not knowing where to look for Drupal packages.


The Fix

All you need to do is tell Composer about Drupal’s official package repository. Run this command:

composer config repositories.drupal composer https://packages.drupal.org/8

Once that’s set up, try the install again:

composer require drupal/csv_serialization

This time it should work without any issues. 🎉


💡 Tip: If you run into similar errors with other Drupal modules, chances are you just need to make sure the Drupal repository is added to your Composer config.


Friday, 6 November 2020

How to update ntp server in CENTOS 7-8?

Managing System Time and NTP in Linux

Keeping your server’s time accurate is crucial — whether it’s for logging, cron jobs, or secure connections. Here’s a quick guide to checking and setting time on a Linux system, along with enabling NTP for automatic synchronization.


🔍 Check the Current Time

Check the hardware clock (BIOS/RTC):

hwclock

Check the system clock (software):

timedatectl

⏱ Enable NTP (Network Time Protocol)

To let your system automatically sync with time servers, enable NTP:

timedatectl set-ntp yes

🕒 Manually Set the Time

If you need to set the time manually (e.g., no NTP available):

timedatectl set-time HH:MM:SS

(Replace HH:MM:SS with your desired time.)


⚙️ Start and Enable NTP Daemon

For continuous synchronization with NTP servers, start and enable the ntpd service:

sudo systemctl start ntpd
sudo systemctl enable ntpd

🌍 Sync with a Specific NTP Server

You can manually sync your system clock to a specific NTP server and then update the hardware clock:

ntpdate -u clock.ncbs.res.in && hwclock -w

✅ That’s it! Now your Linux system should stay in sync with accurate time.


Tuesday, 30 June 2020

Update Drupal 8 using composer

How to Update Drupal 8 Using Composer

Keeping Drupal up to date is essential for security, performance, and compatibility. If you’re using Composer to manage your project (which is the recommended way), here’s a step-by-step guide to safely update Drupal 8.


📝 Step 1: Check Your Current Version

Before updating, it’s a good idea to see which version of Drupal core you’re running and if updates are available.

composer show drupal/core-recommended --check
composer outdated "drupal/*"

💾 Step 2: Take Backups

Always back up your site and database before making updates. You can use Drush for this:

drush sql:dump > /root/drush-backups/site-$(date +%F).sql
drush archive-dump > /root/drush-backups/site-archive-$(date +%F).tar.gz

🛠 Step 3: Enable Maintenance Mode

Put the site into maintenance mode so users don’t run into issues while the update is in progress.

drush state:set system.maintenance_mode 1
drush cache:rebuild

🔄 Step 4: Update Drupal Core

Run the Composer update command for core-recommended (which ensures the correct set of dependencies).

composer update drupal/core-recommended --with-dependencies

Then rebuild the cache:

drush cache:rebuild

✅ Step 5: Disable Maintenance Mode

Once the update is complete, bring your site back online:

drush state:set system.maintenance_mode 0
drush cache:rebuild

🔧 Optional Commands

Depending on your setup, you might also find these useful:

  • Update drupal/core directly (not always recommended):

    composer update drupal/core --with-dependencies
    
  • Update to a specific version:

    composer require 'drupal/core-recommended:^8.9' --update-with-all-dependencies
    
  • Use the development branch (not recommended for production):

    composer require drupal/core-recommended:8.9.x-dev --update-with-all-dependencies
    

That’s it! Your Drupal 8 site should now be running the latest version.


Monday, 15 June 2020

How to build an Android app for production using Native-script?

How to Build an Android App Using NativeScript

If you’re building Android apps with NativeScript, one of the important steps is preparing your app for production. This includes signing the app, generating a release build, and choosing the right file type for distribution.

Here’s a complete guide to help you through the process.


🔑 Step 1: Create a .jks Keystore File

Before you can publish your app, you’ll need a Java Keystore (.jks) file. This file is used to sign your app and is required every time you release an update.

👉 Important:

  • Store your .jks file in a safe location.

  • You must use the same .jks file for every update.

  • If you lose it, you’ll be forced to create a new .jks file and publish your app under a new package name.

📖 Official guide: Android App Signing


📦 Step 2: Build the Release Version

NativeScript gives you three options for building a production-ready Android app.


1) Generate an APK file

This is the traditional Android app package format.

tns build android --release \
--key-store-path [path-to-your.jks] \
--key-store-password [your-key-password] \
--key-store-alias [your-alias] \
--key-store-alias-password [your-alias-password]

The .apk file can then be uploaded directly to the Play Store or shared with users.


2) Generate an AAB file (Recommended)

Google now recommends the Android App Bundle (AAB) format because it reduces app size by delivering only the required resources for each device.

tns run android --release \
--key-store-path [path-to-your.jks] \
--key-store-password [your-key-password] \
--key-store-alias [your-alias] \
--key-store-alias-password [your-alias-password] \
--aab

3) Generate a Customized AAB file

You can optimize your app further with flags like --bundle, --env.uglify, --env.aot, and --env.snapshot. These options reduce size and improve performance.

tns run android --bundle --env.uglify --env.aot --env.snapshot \
--release \
--key-store-path [path-to-your.jks] \
--key-store-password [your-key-password] \
--key-store-alias [your-alias] \
--key-store-alias-password [your-alias-password] \
--aab --copy-to app1.aab

This will create an optimized .aab file named app1.aab.


⚠️ Note on App Size

A blank NativeScript project for Android is typically around 12MB. This is because it includes three versions of the NativeScript runtime to support different Android CPU architectures.

 Final Thoughts 

Always use the same .jks file for updates.

  • Prefer AAB over APK for smaller, more efficient app delivery.

  • Use build optimization flags for production-ready performance.

With these steps, you’re ready to publish your NativeScript Android app to the Play Store! 🎉


Tuesday, 5 May 2020

How to install Drush using CGR and Composer.

How to install Drush using CGR and Composer 

 

* Tested on Ubuntu 18.04


1. Install the composer Globally using the below commands 


php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 
'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24
ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } 
else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
 

2. Move the downloaded 


mv composer.phar /usr/local/bin/composer 
 
* If you like to install it only for your user and avoid requiring root permissions,
you can use ~/.local/bin instead which is available by default on some
Linux distributions.
 

3. Install CGR


Add the path in /etc/environment like 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$HOME/.config/composer:$HOME/.config/composer/vendor/bin"

Export the path in ~/.bashrc like 
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
export PATH="$(composer config -g home)/vendor/bin:$PATH"

cd ~
composer global require consolidation/cgr


4. Install Drush using CGR


cgr drush/drush [For the latest version]

cgr drush/drush:7.* [For drush 7]


5. Create symbolic link inside the /usr/bin to work on drush Globally

  

Saturday, 4 March 2017

Sample Typescript Programs

//save it as TalkingHands.ts
//compile it in command prompt as - tsc talkinghandsts

function TalkingHands(Deaf) {
    return "Hello, " + Deaf;
}

var user = "I am a Deaf User";

document.body.innerHTML = TalkingHands(user);



Using Interfaces 

interface Deaf
{

    name: string; // varibale declaration

}

//paramter deaf -- Interface Deaf
function TalkingHands(deaf:Deaf) {
    return "Hello, " + deaf.name;
}
// variable user refers to the name String
//name property of the string
var user = {name:"I am a Deaf User"};

document.body.innerHTML = TalkingHands(user);


using classes 

class DeafBoys
{
    question: string;
    constructor(public name)
    {
        this.question = name;

    }

}
interface Deaf
{

    name: string; // varibale declaration

}

//paramter deaf -- Interface Deaf
function TalkingHands(deaf:Deaf) {
    return "Hello, " + deaf.name;
}
// variable user refers to the name String
//name property of the string
var user = new DeafBoys("Yes I am Deaf user");
document.body.innerHTML = TalkingHands(user);

How to write sample Typescript Program?


How to display date in Typescript by using Button event?



// Display Date in Typescript on Button Click Event
let displaydate =  new Date().toLocaleDateString();
let button = document.createElement('button');
button.textContent = "Say Todays Date";
button.onclick = function ()
{
   alert(displaydate);
}
document.body.appendChild(button);

Thursday, 15 December 2016

What are the key benefits of RPWD BILL 2014? Whom will be benefited?

The Rights for person with Disabilities Act 2014, are making millions of disabled people eligible for their rights by the reason of their disabilities.

The last ACT was made on 1995, in the newer announced 2014 ACT has much more benefits for the PwD unfollowing the ACT will land you to jail for 2 years or upto Rs 5 lakh fine.

The major/key benefits are given below...











Wednesday, 14 December 2016

Jobs available for the Low vision Blind and Deaf in Pune.

Openings for disabled candidates 
Dusters Total Solutions Services Pvt. Ltd.(Partner of JLL) for the ITs Sector in pune .
They will recruit 10th and below  10th qualified candidates with Hearing impairment and Low Vision and few orthopedic candidates.
So its a golden opportunity.

1) Nature of work Floor cleaning, office cleaning,Furniture cleaning,cafeteria 

2) Salary will be  8000/- (In Hand) (PF, ESI facility available)

3) No other Tax deduction 

4) Accommodation & Food facility available at minimum charges from DTS.

If anybody is interested Plz visit to the center

Point of contact
Nilesh Ingole
9698883491
(Center incharge)
Asmita padole
+917304190094 ( sms)
(Trainer)
Amhi Amchya Arogyasathi- youth 4 job      
Address:- mure Memorial Hospital, Maharaj bag Road, sitabuldi, Nagpur

Tuesday, 18 October 2016

How to enable root access to ES file explorer rooted android device/ Marshmallow 6.0?

Hello if you have rooted android device but still you are facing the below problem while opening root feature from ES file explorer
Please follow the below steps
“sorry test failed this feature cannot run on your device”

Solution:
1  1) Download and Install below two app from PlayStore 
a) Busybox (Download, Install, Open and again install with root access)
https://play.google.com/store/apps/details?id=stericson.busybox&hl=en

b) Android Terminal Emulator
https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en

    2) Open an Android terminal emulator and type the below commands
Su   (enter)
mount -o remount  (enter)
rw /system (enter)
touch /sbin/su /system/bin/su /system/xbin/su  (enter)
mount -o remount (enter)
ro /system (enter)
exit (enter)

OR
(below method works on Samsung phones)

su   (enter)
mount -o rw,remount /system   (enter)
touch /sbin/su /system/bin/su /system/xbin/su  (enter)
mount -o ro,remount /system    (enter)
exit (enter)

Reboot the system and Enjoy the full access to ES file explorer


Cheers !!! Please comment if any doubts





Monday, 7 March 2016

Tactile time table of trains running from Mysore for visually impaired .


Hats off Mysore

Mysore might have been the India's cleanest city it is equally an accessible city 
for handicapped people in India. Below the tactile time table for visually  impaired people shows how accessible  Mysore is
.It has slew number of amenities for the PwD including the first college (jsspph.org) in India providing the education for all disabled people where they don't call them disabled they are known as differently abled.


The city also has more number hearing impaired people schooling, studying and working in Mysore.


Please  comment below to know more

Saturday, 20 February 2016

Job for deaf people in India available across various places hurry . Circulate please

1)REGISTRATION OPEN
Government Certified Skill training under PMKVY in retail sector.

Free career counselling
Free job  recruitment assistance
1 month training
Govt certification
Rs 7500 award money

Documents :
1)2 Photos
2)Adhar Card
3)Pan card
4)Ration card
5)Disability Certificate
6) SSC/HSC certificate


👉Date: 19/2/ 2016👈
Time: 2pm..
Age: 18 to 35
Qualification: SSC Pass.

Add:  rotary sanskardham college, unnat nagar, goregaon W, Mumbai

Contact :
Sudhir Nayak
9867793300 (CALL)
Priyanka
9930657595 (call)
Jayesh
9892544066 ( sms)

👉30 seats.👈
 please apply soon..
Pls You forward to all deaf

2)
Deaf Youth people walk to Job Training for 3 months CCD for Age - 17 to 25 years and Class- 10th pass, Sewing Machine Operator (SMO) for Age- 18 to 35 years and Class- 5th, Carpentry for Age- 18 to 35 years and Class- 5th on 22/02/2016 at 10 am. FREE FOOD & HOSTEL. Address:--Centurion University of  Technology and Management, GTET, CCD,
At- Ramachandrapur
Jatni, Khurda Road Railway Station, Odisha, Dilip (Deaf) SMS- 9937201971, Whatsapp-9439308138 & Tapan (Hearing) Call - 9861633500. Pl forward to Deaf people and your friends soon.

3) Jobs at USHA machines .
Place - Bhiwadi
Salary- 12000/-
Anyone 10pass & above can apply for d job .
Please go to sarthak educational trust Wednesday &Thursday by 10am

Address :- Building no.-1,team computers , bikhaji cama place, Mohammad put village ,near Hyatt regency. Nd-66

Form Balbir Singh 8130053240 (WhatsApp Or SMS)

Wednesday, 10 February 2016

How to use WhatsApp for getting information from wikipedia,news,Cricket etc..? (Explained in Indian sign language)



Many of us use Whatsapp for messaging each other, group chat, sharing information, videos, images etc... Whatsapp now became a part of our everyday lives and it is one of the best cheapest method of communication used by millions of people across the world.
Here I will explain some more tricks that can be done by using whats App that is now we can receive whatever the information we needed from Wikipedia Just by typing wiki Hinduism. You will receive message from third party bots in one second. And yes it is possible we don't need to look at the Web. We could not only read Wikipedia but we can also avail live cricket score, news, football etc… There are code for a particular category.
How to setup the whats-app bot in next two minutes?




1) Open Whats App, in the contacts Save the number 785993283 as name you like For. E.g.Wikipedia

 I am saving number as Wiki.




 





2) Create a new group name it as Knowledge





3) Add the WhatsApp bot (Wikipedia and news )number to your group.



IT IS ALL done.  Now u can enjoy the services.
Just Type
Wiki india- To receive information about India.

You will receive in next second.
 




 

 To know the meaning of the word alive please type +dict alive. you will avail the meaning in next second.

Few more codes are
  • +dict (word)

  • wiki india

  • cricket

  • football

  • news etc...


Kind attention WhatsApp bot is not part of WhatsApp. Be careful from frauds they many steal information by adding any number. This service is available in other messengers too like Hike, Telegram etc…
Enjoy!! Please comment below for discussion.