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 / html color names
Last active December 20, 2023 05:34
html color names
Color Names Supported by All Browsers
140 color names are defined in the HTML and CSS color specification (17 standard colors plus 123 more). The table below lists them all, along with their hexadecimal values.
Note Tip: The 17 standard colors are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow.
Color Name HEX
AliceBlue #F0F8FF
AntiqueWhite #FAEBD7
@abdullahbutt
abdullahbutt / 1_form_validation_complete.php
Last active June 19, 2023 08:03
form validation in php
<!DOCTYPE HTML>
<html>
<head>
<style>
.error {color: #FF0000;}
</style>
<title>Complete Form Validation</title>
</head>
<body>
<p>Form Validation in PHP</p>
@abdullahbutt
abdullahbutt / failed loading cafile stream
Created June 11, 2019 11:09
failed loading cafile stream: curl-ca-bundle.crt
Error / Notice / Issue:
failed loading cafile stream: `C:\xampp\apache\bin\curl-ca-bundle.crt'
Issue
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo=
@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 / gist:10253010
Created April 9, 2014 10:37
get last word from url after a slash in php
get last word from url after a slash in php
preg_match("/[^\/]+$/", "http://www.mydomainname.com/m/groups/view/test", $matches);
$last_word = $matches[0]; // test
OR
Use basename with parse_url:
echo basename(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
@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 / wamp timeout settings
Last active October 8, 2020 08:24
wamp timeout settings
In php.ini, make below changes:
max_execution_time = 1800
To ensure phpMyAdmin does NOT timeout:
Once you're log into phpmyadmin look on the top navigation for "Settings" and click that then "Features" and you'll find "Login cookie validity" which is typically set to 1440.
@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