Skip to content

Instantly share code, notes, and snippets.

View jack2jm's full-sized avatar

Jatin Mandanka jack2jm

View GitHub Profile
How to set-up your Google reCAPTCHA account?
Before you can use reCAPTCHA, you need to set-up an account.
Once you have your account, you need to add your website domain and obtain a site key and a secret key.
Step 1. Go to the "Admin" page (click the admin button on the top right of the page).
Step 2. Click on the + (plus) symbol on the top bar to create a new site
Step 3. Add a label, for example, add your domain name.
Step 4. Pick the reCAPTCHA type. Pick 'reCAPTCHA v3'.
Step 5. Enter your website domain name
Here are basic steps to integrate Bitbucket pipeline - where project is already setuped to server.
*********Here is test to yml validtor - https://bitbucket-pipelines.atlassian.io/validator
Create varibles into bitbucket repo settings
*************************************************
REPO_ORIGIN_URL -> url to git pull with username and password
https://username:token@bitbucket.org/workspace/projectreponame.git
DEPLOY_USER_J -> server username
1. create repo to bitbucket.
2. Enable pipeline from repo settings.
3. create 2 files to current repo. (bitbucket-pipelines.yml and execute.sh)
4. Now commit any push to local pc and you can navigate to pipeline page to repo.
Create repo pipeline environment variables to repository settings.
******************************************************************
1. DEPLOY_USER_J -> write server username for login
root
Error:
dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.
Errors we re encountered while processing: mysql-server-8.0 mysql-server E: Sub-process /usr/bin/dpkg returned an error code
Step to encount the error:
1. sudo apt-get clean
2. sudo apt-get purge mysql*
3. sudo apt-get updateYou10:58
4. sudo apt-get purge mysql*
1. **************************************** Import CSV *************************************
public static function importCsv()
{
$file = public_path('file/test.csv');
$customerArr = $this->csvToArray($file);
echo "<pre>";
for ($i = 0; $i < count($customerArr); $i ++){
print_r($customerArr[$i]);
0. Import this to controller
use Intervention\Image\ImageManagerStatic as Image;
use Storage;
use File;
1. Use this function to convert to specific ratio
// path like /var/www/html/testproject/storage/app/public/item_images/64c100497075c4c6c1075b89
// filename - jatin.png
// $width, $height - pass to required size
// $maintain_ratio - same image size is require or not - other wise it will give $height * $image
@jack2jm
jack2jm / setup_mongodb.txt
Created August 9, 2023 05:27 — forked from Bhavya8181/setup_mongodb.txt
Setup Mongodb in Ubantu/Windows & intigrate with Laravel
Reference Link
==============
1. Server connect - https://adevait.com/laravel/using-laravel-with-mongodb
2. Crud - https://www.javatpoint.com/mongodb-crud-in-laravel
3. Basic in local - https://www.geeksforgeeks.org/how-to-install-mongodb-on-laravel-project/
4. Setup mongodb in ubantu - https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
Install mongodb extention - Windows
===================================
To draw multiple arrows using the mouse cursor and give names to pointers on a canvas, you can use HTML, CSS, and JavaScript. Here's a step-by-step guide on how to achieve this:
1. Set up the HTML structure:
```html
<!DOCTYPE html>
<html>
<head>
<title>Multiple Arrow Drawing</title>
<style>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<div class="row">
<div class="d-flex justify-content-between" id="pageTitle">
Install mongodb extention - Windows
---
1. Download php_mongodb.dll from pecl mongodb php - latest stable dll
2. Put that DLL to localhost Xampp/php/ext
3. add line to php.ini - extension=php_mongodb.dll
4. restart Xampp server.
Download Mongodb Compass for local software to check Data
-------