Skip to content

Instantly share code, notes, and snippets.

View alex-moreno's full-sized avatar

Alejandro Moreno alex-moreno

View GitHub Profile
location / {
# try_files $uri @rewrite; # For Drupal <= 6
try_files $uri /index.php?$query_string; # For Drupal >= 7
}
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active May 14, 2025 21:35
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
<?php // {custom_module}/src/Plugin/migrate/process/CustomFile.php Replace {custom_nodule} with your module's machine name
namespace Drupal\{custom_module}\Plugin\migrate\process; // Replace {custom_nodule} with your module's machine name
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\file\Plugin\migrate\process\d6\CckFile;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* @MigrateProcessPlugin(
@melissamcewen
melissamcewen / migration.inc
Created May 16, 2016 00:30
Sample Migration from Body Field to Paragraph Entitys
<?php
abstract class TestMigration extends Migration {
public function __construct($arguments) {
parent::__construct($arguments);
$this->issuePattern = 'https://www.drupal.org/node/2539244:';
$this->team = array(
id: d6_node
label: Nodes
migration_tags:
- Drupal 6
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
source:
plugin: d6_node
process:
nid: nid
vid: vid
@alex-moreno
alex-moreno / latest-backup.sh
Created January 28, 2016 15:17
Get the newest file of those in the current folder
DB_BACKUP_PATH="$(pwd)/$(ls -t | grep \.sql\.gz$ | head -n1)"
echo $DB_BACKUP_PATH
@nkt
nkt / Results.md
Last active December 22, 2024 11:44
ReactPHP vs Node.js

wrk -t4 -c400 -d10s http://127.0.0.1:1337/

PHP

Running 10s test @ http://127.0.0.1:1337/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
 Latency 7.02ms 6.94ms 82.86ms 85.27%
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active January 7, 2025 16:25
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@mcharytoniuk
mcharytoniuk / Vagrantfile
Last active April 30, 2021 05:00
Vagrant + docker-compose
Vagrant.configure(2) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.network "forwarded_port", guest: 3306, host: 3306
# If errors occur, try running "vagrant provision" manually
# after "vagrant up"
config.vm.provision :docker
# To use docker_compose as a provisioning tool, install
# vagrant-docker-compose plugin first. It should also solve the
@3rd-Eden
3rd-Eden / README.md
Created March 16, 2015 13:04
BigPipe & React sitting a tree.
  • BigPipe and React
  • React components
  • Share state
  • Server Side rendering
  • Modularization of components
  • Re-initialization
    • checksum
    • event adding
    • html bloat
  • JSX