Skip to content

Instantly share code, notes, and snippets.

View rodrigoaguilera's full-sized avatar
🚴‍♂️
Always learning

Rodrigo rodrigoaguilera

🚴‍♂️
Always learning
View GitHub Profile
<?php
// Load a drushrc.php file from the 'drush' folder at the root
// of the current git repository.
exec('git rev-parse --git-dir 2> /dev/null', $output);
if (!empty($output)) {
$repo = $output[0];
$options['config'] = $repo . '/../drush/drushrc.php';
$options['include'] = $repo . '/../drush/commands';
$options['alias-path'] = $repo . '/../drush/aliases';
}
# Local development services.
#
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
parameters:
twig.config:
debug : true
"extra": {
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/contrib/{$name}": ["type:drupal-drush"]
},
"patches": {
"repositories": [
{
"type": "vcs",
"url": "https://github.com/axe312ger/block_attributes"
},
{
"type": "composer",
"url": "https://packagist.drupal-composer.org"
},
{
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
#sql_mode=NO_ENGINE_SUBSTITUTION
sql_mode= ''
# The directory where error messages are located. The value is used
# together with the value of lc_messages to produce the location for the
# error message file.
# lc-messages-dir = /usr/share/mysql
<?php
// Load a drushrc.php file from the 'drush' folder at the root
// of the current git repository.
exec('git rev-parse --git-dir 2> /dev/null', $output);
if (!empty($output)) {
$repo = $output[0];
$options['config'] = $repo . '/../drush/drushrc.php';
$options['include'] = $repo . '/../drush/commands';
$options['alias-path'] = $repo . '/../drush/aliases';
}
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
#sql_mode=NO_ENGINE_SUBSTITUTION
sql_mode= ''
# The directory where error messages are located. The value is used
# together with the value of lc_messages to produce the location for the
# error message file.
# lc-messages-dir = /usr/share/mysql
#!/bin/sh
# Install Command line tools (requires Xcode from app store)
xcode-select --install
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
mkdir ~/bin
mkdir ~/.composer
mkdir -p ~/.vim/swaps
# Make Tab autocomplete regardless of filename case
set completion-ignore-case on
# List all matches in case multiple possible completions are possible
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting symlinks to directories
set mark-symlinked-directories on
# Use the text that has already been typed as the prefix for searching through
/**
* Helper function to set permissions for node types.
*/
function pineda_set_permissions($role, $permissions, $module = 'node') {
$rid = array_search($role, user_roles());
foreach ($permissions as $name) {
db_merge('role_permission')
->key(array(
'rid' => $rid,