This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pdf = new \Imagick(); | |
$files[] = "img1.jpg"; | |
$files[] = "img2.jpg"; | |
$outputFile = "output.pdf"; | |
foreach ($files as $file) { | |
try { | |
$pdf->setResolution(500, 500); | |
$pdf->readImage($file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove (A and B),(B & C) togather from a string | |
const test = (sample) => { | |
let output = ''; | |
let tmp = sample; | |
for (let i = 0; i < sample.length; i++) { | |
if ((sample[i] === 'A' && sample[i + 1] === 'B') || | |
(sample[i] === 'B' && sample[i + 1] === 'A') || | |
(sample[i] === 'B' && sample[i + 1] === 'C') || | |
(sample[i] === 'C' && sample[i + 1] === 'B')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in JavaScript | |
// find nth number of value which is not divided by 3 and not end with '3' | |
function getNthValue(input) { | |
var start = 1; | |
var n = 1; | |
var output = 0; | |
while (start <= input) { | |
if ((n % 3 != 0) && (n % 10 != 3)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To install Node Package Manager | |
$ npm install | |
To run bindu frontend project | |
$ npm run serve | |
To build bindu frontend project | |
$ npm run build | |
# OR | |
$ yarn serve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mysql Import command | |
$ cd xampp/mysql/bin | |
$ mysql -u root -p | |
$ use 'DB_name' | |
$ source D:\conchitavinas.sql | |
or | |
$ mysql -u root -p db_name < 'D:\database.sql' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host file location | |
C:\Windows\System32\Drivers\etc\hosts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command to see error log | |
tail -fn100 <log_file_directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for migration | |
php artisan migrate | |
// for installing laravel passport package | |
php artisan passport:install | |
// for passport key | |
php artisan passport:keys | |
// Create data seeder seeder_name like TourTableDataSeeder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -S localhost:8000 -t public/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout origin/dev app/Controller/AppController.php |
NewerOlder