Skip to content

Instantly share code, notes, and snippets.

View devgk's full-sized avatar
🌐
Creating Opesource Future

Dev GK devgk

🌐
Creating Opesource Future
View GitHub Profile
@devgk
devgk / php-installtion.md
Last active May 14, 2021 19:31
PHP Installtion

sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y

sudo add-apt-repository ppa:ondrej/php

sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

apt install php8.0-amqp php8.0-common php8.0-gd php8.0-ldap php8.0-odbc php8.0-readline php8.0-sqlite3 php8.0-xsl php8.0-curl php8.0-gmp php8.0-mailparse php8.0-opcache php8.0-redis php8.0-sybase php8.0-ast php8.0-dba php8.0-igbinary php8.0-mbstring php8.0-pgsql php8.0-rrd php8.0-tidy php8.0-yaml php8.0-bcmath php8.0-dev php8.0-imagick php8.0-memcached php8.0-phpdbg php8.0-smbclient php8.0-uuid php8.0-zip php8.0-bz2 php8.0-ds php8.0-imap php8.0-msgpack php8.0-pspell php8.0-snmp php8.0-xdebug php8.0-zmq php8.0-cgi php8.0-enchant php8.0-interbase php8.0-mysql php8.0-psr php8.0-soap php8.0-xhprof php8.0-cli php8.0-fpm php8.0-intl php8.0-oauth php8.0-raphf php8.0-solr php8.0-xml -y

@devgk
devgk / datatable-laravel.md
Last active December 17, 2021 11:32
Data Table Laravel Setup
  1. Install Laravel
  2. Install Yajra Data Table
    composer require yajra/laravel-datatables-oracle:"~9.0"
    
  3. Register provider and facade on Laravel config/app.php file.
    'providers' => [
        ...,
    

Yajra\DataTables\DataTablesServiceProvider::class,

@devgk
devgk / Ubuntu Terminal Commands.md
Last active March 22, 2022 05:24
Ubuntu Terminal Commands

Delete File

$ unlink filename

@devgk
devgk / Git Resolve Conflict
Created April 8, 2022 07:05
Git Resolve Conflict
Switch to BetaDevelopment (Master)
Git pull
Git swtich to conflict branch
get merge BetaDevelopment
Resolve conflits manually
git add - push
@devgk
devgk / Laravel Cache Clear
Created April 8, 2022 08:39
Laravel Cache Clear
php artisan config:clear
php artisan cache:clear
composer dump-autoload
php artisan view:clear
php artisan route:clear
@devgk
devgk / settings.json
Last active April 20, 2022 09:19
VS Code Settings
{
"editor.minimap.enabled": true,
"workbench.colorTheme": "One Dark Pro",
"editor.wordWrap": "on",
"cSpell.userWords": [],
"workbench.activityBar.visible": true,
"workbench.statusBar.visible": true,
"window.menuBarVisibility": "default",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
@devgk
devgk / mysql-fix.md
Created July 20, 2022 11:09
MYSQL Not Starting XAMPP on windows - Unexpected Shutdown - Fix
  1. Rename folder mysql/data to mysql/data_old
  2. Make a copy of mysql/backup folder and name it as mysql/data
  3. Copy all your database folders from mysql/data_old into mysql/data (except mysql, performance_schema, and phpmyadmin folders)
  4. Copy mysql/data_old/ibdata1 file into mysql/data folder
  5. Start MySQL from XAMPP control panel

What are the different types of PHP variables?

What are the rules for naming a PHP variable?

Name some of the constants in PHP and their purpose

What are the two most common ways to start and finish a PHP block of code?

What are include() and require() functions?

explain the syntax for ‘foreach’ loop with example.

What are the different types of Array in PHP?

What is the main difference between asp net and PHP?

What is overloading and overriding in PHP?

What is GET and POST method in PHP?

@devgk
devgk / jquery-to-javascript.md
Last active July 10, 2023 11:36
What are many features and functionalities provided by jQuery are now available in the core JavaScript

With the evolution of JavaScript and the introduction of new browser APIs, many features and functionalities provided by jQuery have become available in the core JavaScript language itself. Here are some examples:

  1. Selecting elements: jQuery's selector syntax (similar to CSS selectors) allowed developers to easily select elements from the DOM. With the introduction of the querySelector and querySelectorAll methods in JavaScript, you can now use CSS selectors directly in JavaScript code without the need for jQuery.

Example:

// jQuery
var elements = $('.my-class');

// JavaScript
@devgk
devgk / jquery-ajax-to-js-fetch.md
Created July 10, 2023 11:37
jquery post request to javascript fetch

To convert a jQuery POST request to JavaScript's Fetch API, you can make the following changes:

jQuery POST request using $.ajax:

$.ajax({
  url: 'https://api.example.com/post',
  method: 'POST',
  data: {
 name: 'John',