Skip to content

Instantly share code, notes, and snippets.

View gnuget's full-sized avatar

David Valdez gnuget

View GitHub Profile
@gnuget
gnuget / my-local-enviroment-wrapper.plugin.zsh
Last active October 17, 2022 03:45
my-local-enviroment-wrapper.plugin.zsh
# I just extended https://github.com/JoshuaBedford/lando-zsh/ to support ddev and docksal
# all the credit is for Joshua Bedford.
#
# To use it, add `my-local-enviroment-wrapper` to the plugins array in your zshrc file eg:
# plugins=(git my-local-enviroment-wrapper)
#
# Put this file at: ~/.oh-my-zsh/custom/plugins/my-local-enviroment-wrapper.plugin.zsh
# and set your projects folder path in your ~/.zshrc eg:
# export ZSH_SITES_DIRECTORY="$HOME/Projects"
#
@gnuget
gnuget / setup-drupal-dev.md
Last active May 27, 2021 04:27
How to set up dev enviroment for contributing to Drupal

First of all install DDEV: https://ddev.readthedocs.io/en/stable/#installation

Then execute the following commands:

mkdir drupal9
cd drupal9
ddev config --project-type=drupal9 --docroot=web --create-docroot
ddev start
# You might want to change the default branch depending on the version
@gnuget
gnuget / CommentFlatTest.php
Created July 11, 2017 05:41
Tests Flat Comments.
<?php
namespace Drupal\comment\Tests;
use Drupal\comment\CommentManagerInterface;
/**
* Tests to make sure the comment number increments properly.
*
* @group comment
# Title: Missing URL fragment for the comment's title link.
# Status: Needs review. It's a straightforward change.
https://www.drupal.org/node/2642260
# Title: file_unmanaged_copy not working properly when the destination directory does not exist.
# Status: Needs review. It was already reviewed by Alexpott once, so it is very near to be RTBC
https://www.drupal.org/node/2211657
# Title: image-widget.html.twig references a non-existing classy/image-widget library.
# Status: Needs review. It was already reviewed by davidhernandez and Wim Leers so it is also very near to be RTBC
@gnuget
gnuget / vimrc
Created October 4, 2014 00:44
David's vimrc
syntax on
" Usando features exclusivas de VIM que no tiene VI
set nocompatible
set showmatch " Matching brackets.
set ignorecase " Do case insensitive matching
set incsearch " Incremental search
set ruler " show the line number on the bar
set autoread " watch for file changes
set scrolloff=10
set guifont=Monaco:h12
@gnuget
gnuget / ackrc
Created April 5, 2012 03:17
mi ackrc
--pager=less -R
--type-add=php=.module
--type-add=php=.inc
@gnuget
gnuget / gist:1532008
Created December 29, 2011 05:00
Cambiar el tema en Drupal 6
<?php
function yourcustommodule_init(&$vars) {
global $custom_theme;
$custom_theme = 'new-theme'; //El nombre del tema a desplegarse
init_theme();
}
}
?>
"set guifont=Inconsolata:h13
set guifont=Monaco:h12
set guioptions-=T
set background=dark
macm Window.Select\ Previous\ Tab key=<D-M-Left>
macm Window.Select\ Next\ Tab key=<D-M-Right>
"Sin sonido
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
@gnuget
gnuget / gist:1196653
Created September 6, 2011 05:16
Nginx Configuration for zanphp (https://github.com/MilkZoft/ZanPHP )
server {
listen 80;
server_name zanphp.dev;
roto /path/to/project/zanphp; #change this for the location of your project
index index.php;
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?/$1 last;
break;
}
@gnuget
gnuget / gist:1191968
Created September 3, 2011 23:55
Ejemplo de como cambiar la aplicación para cargar una vista
<?php
/**
* Access from index.php:
*/
if(!defined("_access")) {
die("Error: You don't have permission to access here...");
}
class Hello_Controller extends ZP_Controller {