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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
The following is a table to indicate how users of the current amazeeio-namespaced Lagoon images can upgrade seamlessly to the new uselagoon-namespaced ones.
This brings with it a number of improvements:
- Versioning is now available for a number of images that previously were susceptible to major version increments (mariadb, postgres, redis, varnish), ensuring more predictability
- ARM (Apple Silicon) compatibility is only available in uselagoon-namespaced & versioned images
- Automated updates via GitHub/Dependabot, RenovateBot etc are much easier under the new versioning system
For more information see the blog series at https://dev.to/uselagoon/moving-lagoon-to-semantic-versioned-docker-images-57d0
To use the table below - find the image you currently use in the "Old Image" column, and replace it with the "New Image" in your Dockerfile/docker-compose.yml
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
javascript:(function(){ | |
const ticketNumber = | |
/* If we are on a Jira board. */ | |
location.search.match('[?&]selectedIssue=(.*?)([&]|$)')?.[1] || | |
/* If we are on the ticket page. */ | |
location.pathname.split('/').pop(); | |
const ticketSummary = document.querySelector('h1[data-testid*="summary.heading"]').textContent.trim(); | |
const ticketUrl = `${location.origin}/browse/${ticketNumber}`; | |
const html = `<a href="${ticketUrl}">${ticketNumber} [${ticketSummary}]</a>`; | |
const text = `[${ticketNumber} ${ticketSummary}](${ticketUrl})`; |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
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; | |
use Drupal\Core\Entity\ContentEntityInterface; | |
use Drupal\Core\Field\EntityReferenceFieldItemListInterface; | |
/** | |
* Convert an entity to an array and back. | |
*/ |
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 | |
$query = <<<'GRAPHQL' | |
query GetUser($user: String!) { | |
user (login: $user) { | |
name | |
repositoriesContributedTo { | |
totalCount | |
} |
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\migrate_custom\Plugin\migrate\source; | |
use Drupal\Core\Database\Query\Condition; | |
use Drupal\migrate\Row; | |
use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity; | |
/** | |
* Drupal 7 file 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
mysql> SELECT n.nid, n.title, c.count AS stars | |
-> FROM node n | |
-> INNER JOIN flag_counts c ON c.entity_id = n.nid | |
-> WHERE c.fid = 14 | |
-> ORDER BY c.count DESC | |
-> LIMIT 50; | |
+---------+---------------------------------------------+-------+ | |
| nid | title | stars | | |
+---------+---------------------------------------------+-------+ | |
| 605898 | Drupal Commerce | 148 | |
NewerOlder