Skip to content

Instantly share code, notes, and snippets.

View abdullahbutt's full-sized avatar

Abdullah Butt abdullahbutt

  • Fulda, Deutschland
View GitHub Profile
@abdullahbutt
abdullahbutt / 2022_10_26_100308_setup_countries_table.php
Last active October 26, 2022 14:49
Countries Migration, Model, Seed and Table - Laravel
<?php
use Illuminate\Database\Migrations\Migration;
class SetupCountriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
@abdullahbutt
abdullahbutt / jquery_check_device_for_responsive.js
Created January 8, 2021 05:23
jquery check device for responsive
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 18:04 — forked from fleishmanhillard/css-style-guide.md
CSS style guide with coding standards and best practices.

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 18:03 — forked from ryansechrest/html-style-guide.md
HTML style guide with coding standards and best practices.

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 18:03 — forked from heiswayi/javascript-style-guide.md
JavaScript style guide with coding standards and best practices.

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 18:02 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

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 December 3, 2019 13:44
Countries and nationalities in English and Arabic
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,
@abdullahbutt
abdullahbutt / countries_nationalities_arabic_english.sql
Created November 28, 2019 10:04 — forked from FlavaSava7/countries_nationalities_arabic_english.sql
SQL Countries & Nationalities List : English and Arabic
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 November 12, 2019 10:50
access Laravel app with ip address
php artisan serve --host 192.168.1.125 --port 8000
@abdullahbutt
abdullahbutt / magento composer commands
Created July 29, 2019 08:49
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 ******************