Skip to content

Instantly share code, notes, and snippets.

View jackbravo's full-sized avatar

Joaquin Bravo Contreras jackbravo

View GitHub Profile
---
- name: Install Drupal and Drush with Nginx, and PHP-FPM
hosts: 127.0.0.1
remote_user: vagrant
become: yes
vars:
opcache_memory_consumption: 256
#fastcgi_buffers: 64
---
- name: Install Drupal and Drush with MariaDB, Nginx, and PHP-FPM
hosts: 127.0.0.1
connection: local
remote_user: vagrant
become: yes
vars:
memcached_listen_ip: 127.0.0.1
memcached_memory_limit: 1024
---
- name: Install Drupal and Drush with MariaDB, Nginx, and PHP-FPM
hosts: 127.0.0.1
connection: local
remote_user: vagrant
become: yes
vars:
mysql_root_password: 'my_secure_pass'
@jackbravo
jackbravo / drupal-user-register-rest.js
Created September 1, 2016 15:42
Registrar un usuario en drupal usando jQuery y REST, cortesía de @jmruvalcabav
var user = {
_links: {
type: {
href: 'http://192.168.100.106:81/rest/type/user/user'
}
},
name:[{'value':'user'}],
pass:[{'value':'pass'}],
status:[{'value':true}],

Download DrupalConsole

$ curl https://drupalconsole.com/installer -L -o drupal.phar
$ chmod +x drupal.phar

Make DrupalConsole globaly accesible

$ sudo mv drupal.phar /usr/local/bin/drupal
@jackbravo
jackbravo / gitlab_autopull.php
Last active September 8, 2015 18:18
Auto-pull from a gitlab server everytime there is a push to your branch
<?php
define('REMOTE', '199.198.197.196'); # gitlab server
define('BRANCH', 'development');
define('USER', 'remote_user'); # remote user with SSH keys to gitlab
openlog('gitlab', LOG_PID | LOG_ODELAY, LOG_LOCAL1);
if ($_SERVER['REMOTE_ADDR'] != REMOTE) {
syslog(LOG_NOTICE, 'Calling wrong git server ' . $_SERVER['REMOTE_ADDR']);
@jackbravo
jackbravo / .vimrc
Last active June 23, 2017 18:07
Vimrc with Plug
call plug#begin('~/.config/nvim/plugged')
" Polyglot loads language support on demand!
Plug 'sheerun/vim-polyglot'
Plug 'tomasr/molokai'
Plug 'Shougo/neocomplete.vim'
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1

Keybase proof

I hereby claim:

  • I am jackbravo on github.
  • I am jackbravo (https://keybase.io/jackbravo) on keybase.
  • I have a public key whose fingerprint is 47E6 18CB 8348 92FD D649 6B95 B0CA 8C4E EBB0 A3B6

To claim this, I am signing this object:

<?php
/**
* Alter Pathauto-generated aliases before saving.
*
* @param string $alias
* The automatic alias after token replacement and strings cleaned.
* @param array $context
* An associative array of additional options, with the following elements:
* - 'module': The module or entity type being aliased.
CursoCorb
=========
Created Saturday 12 July 2014
jackbravo@gmail.com
https://network.acquia.com/downloads
views