Friday, February 16, 2024
Increment the cell in Vlookup when dragging horizontally in Excel
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 cachedsome
cache only the requesting usernone
caching is completely disable
Tuesday, October 31, 2023
Changing the ownership of all sub-directories in Linux
$ sudo chown -R utest ./samplefolder/
$ ls -l ./samplefolder/
Saturday, October 14, 2023
Common linux commands
- whoami
- man
- clear
- pwd
- ls
- cd
- mkdir
- touch
- rmdir
- rm
- open
- mv
- cp
- head
- tail
- date
- cat
- less
- echo
- wc
- piping
- sort
- uniq
- expansions
- diff
- find
- grep
- du
- df
- history
- ps
- top
- kill
- killall
- gzip
- gunzip
- tar
- nano
- alias
- xargs
- ln
- who
- su
- sudo
- passwd
- chown
- chmod
Sunday, October 8, 2023
Thursday, October 5, 2023
Export multiple records one by one from Excel
Sub Print1()
For a = 1 To 10
Sheet3.Range("L2").Value = a
ActiveWindow.SelectedSheets.PrintOut copies:=1, collate:=True,
IgnorePrintAreas:=False
Next
End Sub
How to get Ranking of the Students in Excel using RANK Function
=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...
-
Put the following code in a TXT file and save as "file.cmd" then run the cmd file as administrator. @echo off title Activate Micr...
-
We can install PowerMTA on the server. rpm -ivh /home/PowerMTA-4.0r6.x86_64.rpm You will see the output like this Preparing... #############...
-
# $Id: config 2015-03-24 16:00:00 Jack $ # Sample PowerMTA configuration file # PowerMTA Multiple Virtual PMTA config file sample # # E-mai...