This file contains hidden or 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
| <?php | |
| // Introduce the class into your scope. | |
| use KamranAhmed\Geocode\Geocode; | |
| // Optionally you can pass the API key for Geocoding. | |
| $geocode = new Geocode(); | |
| // Get the details for the passed address. |
This file contains hidden or 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
| <?php | |
| /** | |
| * Update field data table and configuration storage | |
| */ | |
| function _update_field_data( | |
| $entityType, | |
| $field, | |
| $valueMapping, |
This file contains hidden or 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
| input.form-submit.button-small { | |
| padding: 4px 8px; | |
| font-weight: bold; | |
| } | |
| .container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber { | |
| position: absolute; | |
| left: 19px; | |
| margin-top: 7px; | |
| } |
This file contains hidden or 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
| input.form-submit.button-small { | |
| padding: 4px 8px; | |
| font-weight: bold; | |
| } | |
| .container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber { | |
| position: absolute; | |
| left: 19px; | |
| margin-top: 7px; | |
| } |
This file contains hidden or 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/bash | |
| while true | |
| do | |
| cd ~/projects/XXX/ && git pull origin master | |
| sleep 60 | |
| done |
This file contains hidden or 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
| name: 'sandwich' | |
| type: module | |
| description: 'Example plugin type' | |
| core: 8.x | |
| package: 'Custom' |
This file contains hidden or 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
| <?php | |
| $data = [ | |
| 'type' => 'article', | |
| 'title' => 'THis is an article test programmatically created', | |
| 'field_email' => [ | |
| 'value' => '[email protected]' | |
| ] | |
| ]; | |
| $node = \Drupal::entityTypeManager()->getStorage('node')->create($data); | |
| $violations = $node->validate(); |
This file contains hidden or 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
| <?php | |
| // mkdir webscrapping folder | |
| // cd webscrapping | |
| // Then run composer require fabpot/goutte | |
| // then create index.php with below content | |
| require __DIR__ . '/vendor/autoload.php'; | |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { | |
| Widget titleSection = new Container( |
This file contains hidden or 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 _nobleGases = [0, 1]; | |
| /* Short way for functions in a single line of code, for instance: | |
| * bool isNoble(int atomicNumber) { | |
| * return _nobleGases[atomicNumber] != null; | |
| * } | |
| * // Becomes: | |
| * bool isNoble(int atomicNumber) => _nobleGases[atomicNumber] != null; | |
| */ | |
| bool isNoble(int atomicNumber) => _nobleGases[atomicNumber] != null; |