Skip to content

Instantly share code, notes, and snippets.

View juampynr's full-sized avatar

Juampy NR juampynr

View GitHub Profile
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@juampynr
juampynr / update-path.sh
Last active December 16, 2017 11:13
Drupal 8: Common steps to run after deploying code. See https://www.lullabot.com/articles/a-successful-drupal-8-deployment for further details.
#!/usr/bin/env bash
# If this is a production deployment script, append: --no-dev --optimize-autoloader --prefer-dist
composer install -vvv
drush updatedb -y -v
drush config-import -y -v
@juampynr
juampynr / script.pipeline
Created July 7, 2017 10:01
Jenkins job to sync Production into Develoment
String pro_domain = '2017.drupalcamp.es'
String dev_domain = 'dev.drupalcamp.es'
String drush_pro = "drush -l ${pro_domain} -r /var/www/${pro_domain}/current/web"
String drush_dev = "drush -l ${dev_domain} -r /var/www/${dev_domain}/current/web"
String files_pro = "/var/www/${pro_domain}/shared/web/sites/default/files/"
String files_dev = "/var/www/${dev_domain}/shared/web/sites/default/files/"
String rsyncOpts = '-azv --delete --exclude .php --exclude php --exclude styles'
String deploySshKeyId = 'some-key-id'
lock(resource: "dev.drupalcamp.es") {
@juampynr
juampynr / deployment.log
Created July 7, 2017 09:46
Jenkins dev deployment success
Started by GitHub push by juampynr
Ejecutando.en el espacio de trabajo /var/lib/jenkins/jobs/DrupalCampSpain-dev-deploy/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.com:AsociacionDrupalES/DrupalCampSpain.git # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
@juampynr
juampynr / deployment.log
Last active July 7, 2017 09:38
DrupalCamp Spain - Dev deployment failure Jenkins log.
Started by GitHub push by juampynr
Started by GitHub push by juampynr
Ejecutando.en el espacio de trabajo /var/lib/jenkins/jobs/DrupalCampSpain-dev-deploy/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.com:AsociacionDrupalES/DrupalCampSpain.git # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
@juampynr
juampynr / log.txt
Created July 6, 2017 11:43
DrupalCamp Spain 2.2.2 deployment Jenkins log
Lanzada por el usuario Juampy NR
Ejecutando.en el espacio de trabajo /var/lib/jenkins/jobs/DrupalCampSpain-prod-deploy/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.com:AsociacionDrupalES/DrupalCampSpain.git # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
@juampynr
juampynr / db-download.sh
Last active September 24, 2018 21:27
Downloads a Drupal database dump from a Docker container
#!/usr/bin/env bash
# Downloads a database dump from a docker container
#
# Usage:
# sh db-download.sh [hostname] [user] [container]
set -x
HOST=$1
@juampynr
juampynr / setup.sh
Created September 7, 2016 14:18
Drupal & Docker
# Based on https://blog.wodby.com/6-reasons-to-deploy-drupal-8-with-docker-how-to-guide-b2f073e61672#.ie28tqlgw
docker pull mariadb
docker pull drupal:8.1
docker run -e MYSQL_ROOT_PASSWORD=admin -e MYSQL_DATABASE=drupal8 -e MYSQL_USER=drupal8 -e MYSQL_PASSWORD=drupal8 -v mariadb:/var/lib/mysql -d --name mariadb mariadb
docker run --name drupal8 --link mariadb:mysql -p 81:80 -d drupal:8.1
" Vdebug bundle and settings.
Bundle 'joonty/vdebug.git'
if !exists('g:vdebug_options')
let g:vdebug_options = {}
endif
let g:vdebug_options['continuous_mode'] = 1
let g:vdebug_options['break_on_open'] = 0
@juampynr
juampynr / guzzle_post.php
Last active May 1, 2023 19:52
Sample POST request with Guzzle
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'http://example.com',
]);