Skip to content

Instantly share code, notes, and snippets.

View lnunesbr's full-sized avatar
🏠
Working from home

Leandro Nunes lnunesbr

🏠
Working from home
View GitHub Profile
<?php
//readme:
//run `composer require typhonius/acquia-php-sdk-v2:^2.0`
//adjust vars $key, $secret, $app_uuid, $env_name
//run in terminal `php acquia_environments.php`
require "vendor/autoload.php";
// @file get acquia application environment per field name
@lnunesbr
lnunesbr / php-modules.php
Last active May 2, 2019 00:32
This files checks for duplicate modules in your drupal installation, by checking duplicated occurrences of `.info` files. It will print an array with all occurrences of the info files. This is intented to be executed via command line, send the paths to be scanned as params in the php call. Be sure to place the files inside your site's `docroot` …
<?php
/*
This files checks for duplicate modules in your drupal installation, by checking duplicated occurrences of `.info` files.
It will print an array with all occurrences of the info files.
This is intented to be executed via command line, send the paths to be scanned as params in the php call.
Be sure to place the files inside your site's `docroot` location, and do not commit to your production repository.
For example:
```
php php-modules.php /sites/all /profiles/gardens /profiles/profile2
<?php
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
@lnunesbr
lnunesbr / easymysqldump.sh
Created May 17, 2013 22:55
Shell script to backup MySql database (Performed for Drupal databases). It ignores drupal cache and temporary information common tables content, although it fits any mysql database dump. To backup a Mysql database file to a chosen directory you must provide the database name, and mysql access information through parameters in the script executio…
#!/bin/bash
# Shell script to backup MySql database (Performed for Drupal databases)
# It ignores drupal cache and temporary information common tables content,
# although it fits any mysql database dump.
# To backup a Mysql database file to a chosen directory you must provide the
# database name, and mysql access information through parameters in the script
# execution.
# Based on the original script on
# http://www.cyberciti.biz/nixcraft/vivek/blogger/2005/01/mysql-backup-script.html
# Last updated: May - 2013