Skip to content

Instantly share code, notes, and snippets.

View AronNovak's full-sized avatar

Aron Novak AronNovak

View GitHub Profile
diff --git a/includes/environment.inc b/includes/environment.inc
index a4717048..a2416424 100644
--- a/includes/environment.inc
+++ b/includes/environment.inc
@@ -18,7 +18,7 @@ use Webmozart\PathUtil\Path;
* Log PHP errors to the Drush log. This is in effect until Drupal's error
* handler takes over.
*/
-function drush_error_handler($errno, $message, $filename, $line, $context) {
+function drush_error_handler($errno, $message, $filename = NULL, $line = NULL, $context = NULL) {
@AronNovak
AronNovak / capitals-array.php
Created April 8, 2019 12:10
World capitals list - PHP array
<?php
$capital_names = [
'Kabul',
'Tirana',
'Algiers',
'Andorra la Vella',
'Luanda',
'Saint John\'s',
'Buenos Aires',
'Yerevan',
drush sql-dump --tables-list=`drush sqlq "show tables like '_raw_%'" | xargs | sed -e 's/ /,/g'` > /tmp/only_users.sql
@AronNovak
AronNovak / ip.php
Created October 4, 2018 12:04
cloudflare + pantheon
<?php
// https://pantheon.io/docs/client-ip/
$remote_ip = isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"];