<!-- Place this data between the <head> tags of your website -->
<title>Page Title. Maximum length 60-70 characters</title>
<meta name="description" content="Page description. No longer than 155 characters." />
<!-- Twitter Card data -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@publisher_handle"> <!-- Non-Essential, But Required for Analytics -->
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Page description less than 200 characters">
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I have used google finance calculator for this purpose | |
function convertCurrency($amount, $from, $to){ | |
$url = "https://www.google.com/finance/converter?a=$amount&from=$from&to=$to"; | |
$data = file_get_contents($url); | |
preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted); | |
$converted = preg_replace("/[^0-9.]/", "", $converted[1]); | |
return round($converted, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
#lst is list | |
def most_common(lst): | |
return max(set(lst), key=lst.count) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*If you have two different sites, one for mobile and another for desktop. When any user try to visit your desktop site | |
from mobile, then use below code on your desktop website in index.html or import this below code as external JS.*/ | |
// Add below code in your head tag | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script> | |
var isMobile = { | |
Android: function() { | |
return navigator.userAgent.match(/Android/i); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get API KEY from https://tinypng.com/developers | |
try | |
{ | |
\Tinify\setKey("W2zSUtK-Up2aS8Q6kQ-ndeHOL06SGHVz"); | |
//TinyPNG Compress Image | |
$filepath = public_path('images/' . "knowledge-tribe.png"); | |
$source = \Tinify\fromFile($filepath); | |
$source->toFile($filepath); | |
} catch( \Tinify\AccountException $e ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i used regex which support varitey of global phone numbers | |
/^\s*(?:\+?(\d{1,3}))?([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$/gm | |
Positive - | |
+42 555.123.4567 | |
+1-(800)-123-4567 | |
+7 555 1234567 | |
+7(926)1234567 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date | |
Webform | |
Entity API | |
Libraries API | |
Views | |
Google Analytics | |
Backup and Migrate | |
Views Slideshow | |
Context | |
Media |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"AN":["Bombuflat","Garacharma","Port Blair","Rangat"],"AP":["Addanki","Adivivaram","Adoni","Aganampudi","Ajjaram","Akividu","Akkarampalle","Akkayapalle","Akkireddipalem","Alampur","Amalapuram","Amudalavalasa","Amur","Anakapalle","Anantapur","Andole","Atmakur","Attili","Avanigadda","Badepalli","Badvel","Balapur","Bandarulanka","Banganapalle","Bapatla","Bapulapadu","Belampalli","Bestavaripeta","Betamcherla","Bhattiprolu","Bhimavaram","Bhimunipatnam","Bobbili","Bombuflat","Bommuru","Bugganipalle","Challapalle","Chandur","Chatakonda","Chemmumiahpet","Chidiga","Chilakaluripet","Chimakurthy","Chinagadila","Chinagantyada","Chinnachawk","Chintalavalasa","Chipurupalle","Chirala","Chittoor","Chodavaram","Choutuppal","Chunchupalle","Cuddapah","Cumbum","Darnakal","Dasnapur","Dauleshwaram","Dharmavaram","Dhone","Dommara Nandyal","Dowlaiswaram","East Godavari Dist.","Eddumailaram","Edulapuram","Ekambara kuppam","Eluru","Enikapadu","Fakirtakya","Farrukhnagar","Gaddiannaram","Gajapathinagaram","Gajularega","Gajuvaka","Ganna |
- Before cloning project on server run below command. ref
$ umask 0022
- Then clone your project
- Run composer update ```$ composer update`
- Give required permissions
$ chmod 0777 -R storage/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var english = { | |
errorTitle: 'Form submission failed!', | |
requiredFields: 'You have not answered all required fields', | |
requiredField: 'This field is required', | |
// badTime: 'You have not given a correct time', | |
badEmail: 'You have not given a correct e-mail address', | |
badTelephone: 'You have not given a correct phone number', | |
// badSecurityAnswer: 'You have not given a correct answer to the security question', | |
// badDate: 'You have not given a correct date', | |
lengthBadStart: 'The input value must be between ', |
OlderNewer