Skip to content

Instantly share code, notes, and snippets.

View joelpittet's full-sized avatar

Joel Pittet joelpittet

View GitHub Profile
{
"basics": {
"name": "Joël Pittet",
"label": "Web Developer",
"email": "[email protected]",
"phone": "(604) 369-3963",
"url": "https://pittet.ca",
"summary": "As a Web Applications Team Lead at The University of British Columbia since 2016, I have been deeply involved in open-source contributions to the Drupal community. My work includes co-maintaining the Drupal theme system, contributing to core and maintaining contrib projects, and supporting the adoption of modern theming practices. I am passionate about fostering collaboration, maintaining quality standards, and creating tools that empower developers within the community.",
"location": {
"city": "Nanaimo",
@joelpittet
joelpittet / vagrant-nfs-vpn-solution.md
Last active October 6, 2018 00:20 — forked from johnkary/vagrant-nfs-vpn-solution.md
Workaround for using an NFS mount with Vagrant and VirtualBox while connecting to a VPN network restricting local network connections

Fixing NFS disconnecting with Vagrant and VirtualBox on Mac OS

Symptoms and Known Conditions

  • Mac OS host machine (10.6+)
  • VirtualBox (4.1+)
  • Vagrant (1.0+)
  • Connecting via VPN to a remote network
  • Mounting a directory from your host machine to the guest machine using NFS with something like this:
@joelpittet
joelpittet / openconnect.md
Created October 6, 2018 00:11 — forked from moklett/openconnect.md
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@joelpittet
joelpittet / interdiff.patch
Created March 5, 2018 21:49
2925449-67-tweaks.patch
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index d53d3732be..3d7b4e97d5 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -3776,7 +3776,7 @@ function _drupal_shutdown_function() {
chdir(DRUPAL_ROOT);
try {
- foreach ($callbacks as &$callback) {
+ foreach ($callbacks as $callback) {
[alias]
# View the SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# Pull in remote changes for the current repository and all its submodules
@joelpittet
joelpittet / composer.json
Last active April 10, 2017 16:51
D8 Composer & Patches
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0+",
"authors": [
{
"name": "",
"role": ""
}
@joelpittet
joelpittet / phpcs.xml
Last active March 6, 2017 08:04
Drupal.org reroll patches with syntax change
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="drupal_core">
<description>Default PHP CodeSniffer configuration for Drupal core.</description>
<file>.</file>
<arg name="extensions" value="engine,inc,install,module,php,profile,test,theme"/>
<!--Exclude third party code.-->
<exclude-pattern>./assets/vendor/*</exclude-pattern>
<!--Exclude test files that are intentionally empty, or intentionally violate coding standards.-->
@joelpittet
joelpittet / interdiff.patch
Created January 29, 2017 00:06
Interdiff Patch for status report
diff --git a/core/themes/seven/css/components/system-status-report.css b/core/themes/seven/css/components/system-status-report.css
index 54edd60..9cf91d0 100644
--- a/core/themes/seven/css/components/system-status-report.css
+++ b/core/themes/seven/css/components/system-status-report.css
@@ -117,12 +117,19 @@ html:not(.details) .system-status-report__status-title {
.system-status-report__status-title {
width: 18rem;
float: left; /* LTR */
+ cursor: default;
+ }
accordion_blocks/accordion_blocks.libraries.yml
10: - core/jquery.ui.accordion
back_to_top/back_to_top.libraries.yml
23: - core/jquery.ui.core
24: - core/jquery.ui.effects.core
better_messages/better_messages.libraries.yml
10: - core/jquery.ui.draggable
11: - core/jquery.ui.resizable
@joelpittet
joelpittet / perf.php
Last active February 2, 2016 04:03
uasort vs uasort vs SortArray::suasort performance
<?php
// Run in your Drupal 8 root with `drush scr perf.php`
use Drupal\Component\Utility\SortArray;
$data[] = [
0 => [
'#type' => 'checkbox',
'#title' => 'A',
],
1 => [