...
"require": {
"vendor/package": "1.3.2", // exactly 1.3.2 (exact)
// >, <, >=, <= | specify upper / lower bounds
"vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
"vendor/package": "<1.3.2", // anything below 1.3.2
// * | wildcard
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
| ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' $2 | \ | |
| jq -Mr --arg name "$1" '.services | keys[] as $k | .[$k] | select(.tags[]?.name == $name) | $k' | |
| # ag -l -G '.services.yml$' access_check| while read filename ;do services-grep access_check "$filename" ;done |
$ composer require phpstan/phpstan
Drupal dynamically adds to the class autoloader at runtime, so it is necessary to bootstrap Drupal in order that it is fully populated. Note that this may require that the database be accessible (i.e. may be problematic when working with Docker). This is why we use a custom autoload file below.
$ ./bin/phpstan analyse --level=7 -c phpstan.neon docroot/modules/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
| #!/bin/bash -ex | |
| # | |
| # configures wordpress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # script is aware of .git directories by default. edit if you need to consider | |
| # other folders as well. | |
| # | |
| # you will find a log file in /tmp/ in case you fucked up. |
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
| // 1. Open the browser developper console on the network tab | |
| // 2. Start the video | |
| // 3. In the dev tab, locate the load of the "master.json" file, copy its full URL | |
| // 4. Run: node vimeo-downloader.js "<URL>" | |
| // 5. Combine the m4v and m4a files with mkvmerge | |
| const fs = require('fs'); | |
| const url = require('url'); | |
| const https = require('https'); |
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 | |
| namespace Drupal\sd8_migration\Plugin\migrate\source; | |
| use Drupal\migrate\Plugin\migrate\source\SqlBase; | |
| /** | |
| * Table source from database. | |
| * |
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
| Age 6, 7: | |
| - Print their name or any string of their choice. | |
| - Flashing Heart - https://makecode.microbit.org/projects/flashing-heart | |
| - Snowflake - https://makecode.microbit.org/lessons/snowflake-fall | |
| - Smiley - https://makecode.microbit.org/lessons/smiley | |
| - Rock paper scissor basic - https://makecode.microbit.org/projects/rock-paper-scissors | |
| - Banana Orange Keyboard - https://makecode.microbit.org/projects | |
| - Magic 8 ball - https://makecode.microbit.org/lessons/magic-8 | |
| - Song: Happy Birthday - https://makecode.microbit.org/lessons/happy-birthday | |
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 | |
| use Drupal\Core\Utility\UpdateException; | |
| use Drupal\paragraphs\Entity\Paragraph; | |
| /** | |
| * Convert news,blog,event body field to paragraphs. | |
| */ | |
| function custom_util_post_update_convert_newsblogevent_body(&$sandbox) { |
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 | |
| /** | |
| * Controller. Implements ContainerInjectionInterface | |
| */ | |
| namespace Drupal\gurei\Controller; | |
| use Drupal\Core\Controller\ControllerBase; | |
| use Drupal\Core\DependencyInjection\ContainerInjectionInterface; | |
| use Drupal\gurei\Service\CompanyService; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; |