Skip to content

Instantly share code, notes, and snippets.

Avatar

Rob Decker robdecker

View GitHub Profile
@robdecker
robdecker / 1.md
Created Jun 10, 2020
[Forms] #d8
View 1.md

Modules

  • Formdazzle! Provides theme suggestions for forms that are much more useful than those provided by Drupal core
@robdecker
robdecker / 1.md
Created May 18, 2020
[Paste.app: non subscription] #macos
@robdecker
robdecker / 1.twig
Created May 18, 2020
[Tiles with bottom borders of varying number of columns] #d8 #twig
View 1.twig
{% set quantity = tiles|length %}
{% set attributes = {
class: [
'tiles'
],
'data-quantity': quantity,
'data-layout': num_cols,
'data-modulo-2': quantity % 2,
'data-modulo-3': quantity % 3,
'data-modulo-4': quantity % 4,
@robdecker
robdecker / 1.md
Created May 14, 2020
[VS Code tips] #macos
View 1.md

Explorer keyboard navigation

Command: list.toggleKeyboardNavigation

@robdecker
robdecker / youtube_id_regex.php
Created May 7, 2020 — forked from ghalusa/youtube_id_regex.php
[Extract the YouTube Video ID from a URL in PHP] #php
View youtube_id_regex.php
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@robdecker
robdecker / php-get-vimeo-video-id-from-url.php
Last active May 7, 2020 — forked from anjan011/php-get-vimeo-video-id-from-url.php
[Get Vimeo Video ID from URL in PHP] #php
View php-get-vimeo-video-id-from-url.php
<?php
/**
* Get Vimeo video id from url
*
* Supported url formats -
*
* https://vimeo.com/11111111
* http://vimeo.com/11111111
You can’t perform that action at this time.