A super simple bash script to check the status of a GitLab CI pipeline.
$ git push
...
$ git pipeline-status
Status of last pipeline for user/project on gitlab/master:
"pending"
...
$ git pipeline-statusA super simple bash script to check the status of a GitLab CI pipeline.
$ git push
...
$ git pipeline-status
Status of last pipeline for user/project on gitlab/master:
"pending"
...
$ git pipeline-status| <?php | |
| define('DRUPAL_ROOT', __DIR__); | |
| include_once(DRUPAL_ROOT . '/includes/bootstrap.inc'); | |
| drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
| $nids = db_query('SELECT DISTINCT(nid) FROM {node}') | |
| ->fetchCol(); | |
| $nodes = node_load_multiple($nids); |
| /** | |
| * @file | |
| * Example code from http://agaric.com/blogs/conditional-fields-paragraphs-using-javascript-states-api-drupal-8. | |
| */ | |
| /** | |
| * Implements hook_field_widget_WIDGET_TYPE_form_alter(). | |
| * | |
| * Example of conditional fields in paragraphs for Drupal 8. | |
| */ |
| mysql> SELECT n.nid, n.title, c.count AS followers | |
| -> FROM node n | |
| -> INNER JOIN flag_counts c ON c.entity_id = n.nid | |
| -> INNER JOIN field_data_field_project p ON p.entity_id = n.nid | |
| -> INNER JOIN field_data_field_issue_status s ON s.entity_id = n.nid | |
| -> WHERE p.field_project_target_id = 2573607 /* contrib_tracker */ | |
| -> AND s.field_issue_status_value NOT IN (2, 7, 3) /* fixed, closed (fixed), closed (duplicate) */ | |
| -> ORDER BY c.count DESC | |
| -> LIMIT 50; | |
| +---------+-----------------------------------------------------------+-----------+ |
| <IfModule mod_expires.c> | |
| ExpiresActive On | |
| ExpiresByType image/jpg "access 1 year" | |
| ExpiresByType image/jpeg "access 1 year" | |
| ExpiresByType image/gif "access 1 year" | |
| ExpiresByType image/png "access 1 year" | |
| ExpiresByType text/css "access 1 month" | |
| ExpiresByType text/html "access 1 month" | |
| ExpiresByType application/pdf "access 1 month" | |
| ExpiresByType text/x-javascript "access 1 month" |
| I have come across a lot of discussions about how to add a reset button to a form in Drupal 7. | |
| If you search for 'add a reset button to a drupal form' you will find loads of examples using the #markup method of adding html for a reset button. This is because using the render array to add a button #type=> 'button' gives the button a class of 'form-submit'. | |
| But you can use the render array and simply give the button a '#button_type' which translates into a class. Buttons on a form default to submit and that is why they get a class of form-submit. But make the type 'reset' and it will get a class of form-reset. |
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
| <!DOCTYPE html> | |
| <html<?php print $html_attributes; ?>> | |
| <head> | |
| <?php print $head; ?> | |
| <title><?php print $head_title; ?></title> | |
| <?php print $styles; ?> | |
| <?php print $head_scripts; ?> | |
| </head> | |
| <body<?php print $body_attributes;?>> |