Skip to content

Instantly share code, notes, and snippets.

Avatar

Abdullah Butt abdullahbutt

  • Lahore, pakistan
View GitHub Profile
View jquery_check_device_for_responsive.js
window.carecartSpinnerJquery = jQuery.noConflict(true);
(function (a) {
(carecartSpinnerJquery.browser = carecartSpinnerJquery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|h
@abdullahbutt
abdullahbutt / css-style-guide.md
Created May 7, 2020 — forked from fleishmanhillard/css-style-guide.md
CSS style guide with coding standards and best practices.
View css-style-guide.md

CSS Style Guide

All rules and guidelines in this document apply to css/scss files unless otherwise noted.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@abdullahbutt
abdullahbutt / html-style-guide.md
Created May 7, 2020 — forked from ryansechrest/html-style-guide.md
HTML style guide with coding standards and best practices.
View html-style-guide.md

HTML Style Guide

All rules and guidelines in this document apply to HTML files.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Icon Legend:

· Space, Tab, Enter/Return

@abdullahbutt
abdullahbutt / javascript-style-guide.md
Created May 7, 2020 — forked from heiswayi/javascript-style-guide.md
JavaScript style guide with coding standards and best practices.
View javascript-style-guide.md

JavaScript (jQuery) Style Guide

All rules and guidelines in this document apply to jQuery files unless otherwise noted.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@abdullahbutt
abdullahbutt / php-style-guide.md
Created May 7, 2020 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.
View php-style-guide.md

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@abdullahbutt
abdullahbutt / countries.sql
Last active Dec 3, 2019
Countries and nationalities in English and Arabic
View countries.sql
DROP TABLE IF EXISTS `countries`;
CREATE TABLE IF NOT EXISTS `countries` (
`id` int(10) UNSIGNED NOT NULL,
`capital` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`citizenship` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`citizenship_ar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`country_code` char(3) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`currency` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`currency_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`currency_sub_unit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
View countries_nationalities_arabic_english.sql
CREATE TABLE `countries` (
`country_code` varchar(2) NOT NULL default '',
`country_enName` varchar(100) NOT NULL default '',
`country_arName` varchar(100) NOT NULL default '',
`country_enNationality` varchar(100) NOT NULL default '',
`country_arNationality` varchar(100) NOT NULL default '',
PRIMARY KEY (`country_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `countries`
@abdullahbutt
abdullahbutt / access Laravel app with ip address
Created Nov 12, 2019
access Laravel app with ip address
View access Laravel app with ip address
php artisan serve --host 192.168.1.125 --port 8000
View magento composer commands
*************** Standard Commands Start******************
1) php bin/magento cache:flush
2) php bin/magento setup:upgrade
3) php bin/magento setup:di:compile
4) php bin/magento setup:static-content:deploy -f
5) php bin/magento indexer:reindex
6) php bin/magento cache:clean
*************** Standard Commands End ******************
@abdullahbutt
abdullahbutt / megento 2.3.x blank page issue solution
Last active Jul 29, 2019
megento 2.3.x blank page issue solution
View megento 2.3.x blank page issue solution
This is Magento bug. Wrong paths to Windows are generated. The fixed fix is:
Magento 2.3.0
#/vendor/magento/framework/View/Element/Template/File/Validator.php:138
the string
$realPath = $this->fileDriver->getRealPath($path);