Skip to content

Instantly share code, notes, and snippets.

View jackbravo's full-sized avatar

Joaquin Bravo Contreras jackbravo

View GitHub Profile
<?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.

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:

@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']);

Datos SITEL de Jalisco para OpenStreetMap

Datos de Carretera Preparados para Contribución con JOSM

Estamos animados por liberar un conjunto de datos de todas las carreteras en el estado de Jalisco, México, listos para contribuirlos con el popular editor JOSM. Mira el repositorio de osm-jalisco para bajar los datos y aprender como empezar.

roads tilemill

Una presentación estilizada en TileMIll

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 / .vimrc
Last active December 26, 2015 14:09
My .vimrc
syntax on
set background=dark
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
set hidden
@jackbravo
jackbravo / .tmux.conf
Last active December 26, 2015 14:09
My tmux conf
set-option -g prefix C-a
bind-key C-a last-window
bind-key a send-prefix
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# TODO: Update internal subnet ACL and security.
# Define the internal network subnet.
# These are used below to allow internal access to certain files while not
# allowing access from the public internet.
# acl internal {
@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}],
---
- 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'