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
$(function() { ... }); | |
is just jQuery short-hand for | |
$(document).ready(function() { ... }); |
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
$.ajax() jquery function | |
Jquery ajax method takes following arguments: | |
a url to make a call | |
a method name | |
a response type | |
form data to send | |
Following is full syntax used for ajax method: |
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
gitignore file | |
git update-index --assume-unchanged .htaccess | |
To revert back: | |
git update-index --no-assume-unchanged .htaccess |
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
$account = User::load(\Drupal::currentUser()->id()); | |
$timestamp = REQUEST_TIME; | |
$langcode = $options['langcode'] ?? $account->getPreferredLangcode(); | |
$reset_url = Url::fromRoute('user.reset', | |
[ | |
'uid' => $account->id(), | |
'timestamp' => $timestamp, | |
'hash' => user_pass_rehash($account, $timestamp), | |
], |
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
<iframe | |
width="300" | |
height="170" | |
frameborder="0" | |
scrolling="no" | |
marginheight="0" | |
marginwidth="0" | |
src="https://maps.google.com/maps?q=-33.8569,151.2152&hl=es&z=14&output=embed" | |
> | |
</iframe> |
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
#Download Docker | |
Document = https://docs.docker.com/engine/install/debian/ | |
#Lando Download | |
Document = https://docs.lando.dev/basics/installation.html#macos | |
Debian | |
wget https://files.lando.dev/installer/lando-x64-stable.deb | |
sudo dpkg -i lando-x64-stable.deb |
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
With Map API KEY | |
json code | |
https://maps.googleapis.com/maps/api/geocode/json?latlng=26.8828672,75.7956608&sensor=true&key=<--API KEY --> | |
Refrance Google url | |
https://developers.google.com/maps/documentation/geocoding/overview?csw=1#ReverseGeocoding | |
embed | |
<iframe src="https://www.google.com/maps/embed/v1/view?key=<--API KEY -->¢er=-33.8569,151.2152&zoom=18"></iframe> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> | |
<title>How to send an email from JavaScript ?</title> | |
</head> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> |
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
\Drupal::messenger()->addStatus('Cache rebuild complete.'); | |
\Drupal::messenger()->addWarning(t('The reference view %view_name cannot be found.', ['%view_name' => $view_name])); | |
\Drupal::messenger()->addError(t('The user account %id does not exist.', ['%id' => $uid])); | |
\Drupal::messenger()->addMessage($message, 'status'); | |
\Drupal::messenger()->addMessage($message, 'warning'); | |
\Drupal::messenger()->addMessage($message, 'error'); |