Sunday, March 10, 2024

Rebuild BCD in Windows using CMD


  1. Boot your computer into Advanced Recovery Mode
  2. Launch Command Prompt available under Advanced Options.
  3. To rebuild the BCD or Boot Configuration Data file use the command – bootrec /rebuildbcd
  4. It will scan for other operating systems and let you select the OS’s you want to add to BCD

To set boot record manually:

bcdboot c:\windows /s c:

Friday, February 16, 2024

Increment the cell in Vlookup when dragging horizontally in Excel

Excel VLOOKUP with Dynamic Column Reference:

=VLOOKUP($B16,$B$4:$D$13,COLUMNS($B4:B4)+1,0)

=VLOOKUP($B16,$B$4:$D$13,COLUMNS($B4:C4)+1,0)

=VLOOKUP(A53,'Tab(4Y-R)'!A24:AU157,COLUMNS('Tab(4Y-R)'!A24:A24)+1,FALSE())
=VLOOKUP(A53,'Tab(4Y-R)'!A24:AU157,ROWS('Tab(4Y-R)'!A24:A24)+1,FALSE())
=ROWS(B$4:B4)

Monday, January 22, 2024

How to Install and Use PHP Composer on CentOS 7

 sudo yum install php-cli php-zip wget unzip

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

HASH="$(wget -q -O - https://composer.github.io/installer.sig)"

php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer


composer



Wednesday, November 22, 2023

The file GeoLite2-Country.mmdb does not exist or is not readable laravel

 Composer

From the command line run:

$ composer require torann/geoip

Laravel

Once installed you need to register the service provider with the application. Open up config/app.php and find the providers key.

'providers' => [

    \Torann\GeoIP\GeoIPServiceProvider::class,

]

This package also comes with an optional facade, which provides an easy way to call the the class. Open up config/app.php and find the aliases key.

'aliases' => [

    'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class,

];

Publish the configurations

Run this on the command line from the root of your project:

php artisan vendor:publish --provider="Torann\GeoIP\GeoIPServiceProvider" --tag=config

A configuration file will be publish to config/geoip.php.

Configuration

Quick breakdown of the two main options in the configuration file. To find out more simple open the config/geoip.php file.

Service Configuration

To simplify and keep things clean, all third party composer packages, that are needed for a service, are installed separately.

For further configuration options checkout the services page.

Caching Configuration

GeoIP uses Laravel's default caching to store queried IP locations. This is done to reduce the number of calls made to the selected service, as some of them are rate limited.

Options:

  • all all location are cached
  • some cache only the requesting user
  • none caching is completely disable

Saturday, October 14, 2023

Common linux commands

  1. whoami
  2. man 
  3. clear 
  4. pwd
  5. ls
  6. cd 
  7. mkdir 
  8. touch 
  9. rmdir 
  10. rm 
  11. open 
  12. mv 
  13. cp 
  14. head
  15. tail 
  16. date
  17. cat
  18. less 
  19. echo 
  20. wc 
  21. piping 
  22. sort
  23. uniq 
  24. expansions 
  25. diff 
  26. find 
  27. grep
  28. du
  29. df 
  30. history
  31. ps
  32. top 
  33. kill
  34. killall
  35. gzip
  36. gunzip
  37. tar
  38. nano
  39. alias 
  40. xargs
  41. ln
  42. who
  43. su 
  44. sudo 
  45. passwd
  46. chown
  47. chmod

Sunday, October 8, 2023

Office 2021 Activation using command

  @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - office.com&cls&echo =====================================...