Skip to content

Instantly share code, notes, and snippets.

Rob Decker robdecker

Block or report user

Report or block robdecker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
robdecker /
Created Apr 23, 2020
[Find command] #sh

Find all folders (starting in the current folder) based on a partial folder name

find . -type d -name "*searchname*"
robdecker /
Last active May 6, 2020
[Drupal, PhpStorm/VSCode, Lando, xDebug] #d8
robdecker /
Last active Apr 18, 2020 — forked from bzerangue/
[Mac OS X Utilities via Terminal] Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine #macos

List, mount, etc

List disks

diskutil list

Mount ISO

hdiutil mount ~/Downloads/name_of_file.iso

robdecker /
Last active Apr 8, 2020 — forked from thegitfather/
[Vanilla JavaScript Quick Reference / Cheatsheet] #js
robdecker /
Last active Mar 20, 2020
[Optional chaining in nested javascript objects] #js
var street = user.address && user.address.street;
var street = user.address?.street;
var street = user.address?.street ?? 'None';
robdecker / 1.js
Created Mar 18, 2020
[Javascript map] #js
View 1.js
const items = [
title: 'Item 1'
title: 'Item 2'
title: 'Item 3'
robdecker / 1.css
Created Feb 25, 2020
[Vertical align image in overflow:hidden div] #css
View 1.css
div {
position: relative;
overflow: hidden;
img {
position: absolute;
top: 50%;
transform: translate(0, -50%);
robdecker / 1.php
Created Feb 20, 2020
[Add inline JavaScript to a page] #d8 #js
View 1.php
* Implements hook_page_attachments().
function MODULE_NAME_page_attachments(array &$attachments) {
// You can optionally perform a check to make sure you target a specific page.
if (\Drupal::routeMatch()->getRouteName() == 'some.route') {
// Add our JS.
$attachments['#attached']['html_head'][] = [
'#tag' => 'script',
You can’t perform that action at this time.