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
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
@robdecker
robdecker / 1.md
Last active Apr 18, 2020 — forked from bzerangue/_verify-repair-permissions-disk.md
[Mac OS X Utilities via Terminal] Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine #macos
View 1.md

List, mount, etc

List disks

diskutil list

Mount ISO

hdiutil mount ~/Downloads/name_of_file.iso

@robdecker
robdecker / vanilla-js-cheatsheet.md
Last active Apr 8, 2020 — forked from thegitfather/vanilla-js-cheatsheet.md
[Vanilla JavaScript Quick Reference / Cheatsheet] #js
View vanilla-js-cheatsheet.md
@robdecker
robdecker / export_vscode_extesions.md
Last active Jan 28, 2020 — forked from joseluisq/export_vscode_extesions.md
[How to export your VS Code extensions from terminal] #macos
View export_vscode_extesions.md

How to export your VS Code extensions from terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
@robdecker
robdecker / Breadcrumbs.php
Last active Oct 17, 2019 — forked from jonpugh/Breadcrumbs.php
[Add Taxonomy Term to a Node's Breadcrumb in Drupal 8] #d8
View Breadcrumbs.php
<?php
// src/Breadcrumbs.php
namespace Drupal\modulename;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Breadcrumb\Breadcrumb;
use Drupal\Core\Link;
@robdecker
robdecker / how-to-get-youtube-video-id.md
Created Oct 29, 2018 — forked from jakebellacera/how-to-get-youtube-video-id.md
Learn how to get the ID of any YouTube video.
View how-to-get-youtube-video-id.md

How to get the ID of any YouTube Video

This article walks you through how to get the ID of any YouTube video.

How to get a YouTube video ID from a youtube.com page URL

You may be watching the video or just happened to visit a link to a video. The video ID will be located in the URL of the video page, right after the v= URL parameter.

View brewStack.md

brewStack update for fresh install

Install steps:

  • Install Homebrew:

      $ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)  
      $ brew install git  
      $ brew update  
      $ brew install drush
    
@robdecker
robdecker / clear-drupal-cache.php
Last active Nov 2, 2019 — forked from samsargent/clear-drupal-cache.php
[Clear all caches from a php file] #d6
View clear-drupal-cache.php
<?php
include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_flush_all_caches();
?>
You can’t perform that action at this time.