Skip to content

Instantly share code, notes, and snippets.

View mmenavas's full-sized avatar

Maximo Mena mmenavas

  • Lullabot
  • San Tan Valley, Arizona, USA
View GitHub Profile
@mmenavas
mmenavas / .travis.yml
Created August 13, 2018 04:36
Travis CI file for custom Drupal 8 module
language: php
php:
- '7.2'
env:
global:
- MODULE_NAME='example'
- SIMPLETEST_BASE_URL='http://127.0.0.1:8080'
# Ignore Symfony's deprecation notices.
@mmenavas
mmenavas / config
Last active August 24, 2018 07:20
This file allows your system to recognize multiple ssh key files
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/pantheon
IdentityFile ~/.ssh/platform
@mmenavas
mmenavas / xdebug.ini
Last active April 5, 2019 20:59
xDebug in Docker for Mac
[xdebug]
zend_extension=xdebug.so
xdebug.idekey = PHPSTORM
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host=host.docker.internal
@mmenavas
mmenavas / field_group_form_validation
Created July 16, 2020 19:46
This snippet expands the details tags whenever a child form field fails browser validation
(function ($, Drupal) {
Drupal.behaviors.openRequiredWrappers = {
attach: function (context, settings) {
// Prevent unnecessary multiple reloads.
if (context instanceof HTMLDocument) {
console.log("Test WDDSE-1913");
var required_items = $('input,textarea,select').filter('[required]');
@mmenavas
mmenavas / non_iso_dates.csv
Created April 26, 2021 17:56
Sample CSV with non ISO dates
NPI Specialty Optout End Date Eligible to Order and Refer
1003865486 Nurse Practitioner March 17 2021 Y
1003924556 Oral Surgery February 16 2022 Y
1003933953 Dermatology June 19 2020 Y
1003943325 Dermatology September 09 2021 Y
1003960378 Psychiatry July 26 2021 Y
1003963455 Psychiatry October 27 2021 Y
1003965963 Oral Surgery December 02 2021 Y
1013001593 Psychiatry April 11 2021 Y
1013327246 Psychiatry August 20 2020 Y
@mmenavas
mmenavas / m4a2mp3.sh
Last active August 26, 2024 00:13
Convert m4a files to mp3
#!/bin/bash
# Create "input" and "output" directories. Place m4a files in "input" directory. Run `bash m4a2mp3` and the new mp3 files will be stored in "output".
cd ./input
for filename in ./*; do
tmp="${filename/.m4a/}";
echo Converting: "$tmp";
ffmpeg -v 5 -y -i "$filename" -acodec libmp3lame -ac 2 -ab 128k ../output/"$tmp".mp3;
done