Skip to content

Instantly share code, notes, and snippets.

keithpotter21 keithpotter21

Block or report user

Report or block keithpotter21

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View drupal7_delete_expired_content_v1.php
<?php
error_reporting(0);
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
//Bootstrap Drupal
chdir(getcwd() . '/../');
define('DRUPAL_ROOT', getcwd());
require_once(DRUPAL_ROOT . '/includes/bootstrap.inc');
drupal_override_server_variables();
@keithpotter21
keithpotter21 / test.js
Created May 18, 2018
Setup selenium-webdriver with chrome options to change download directory.
View test.js
var webdriver = require('selenium-webdriver'),
chromeDriver = require('selenium-webdriver/chrome'),
By = require('selenium-webdriver').By,
until = require('selenium-webdriver').until;
var options = new chromeDriver.Options();
options.addArguments('start-maximized');
options.addArguments('incognito');
options.setUserPreferences({'download.default_directory' : '/path/to/your/download/directory'});
@keithpotter21
keithpotter21 / mysql_migration.sh
Last active Mar 10, 2017
Bash script to migrate a mysql database from a production server to a local database.
View mysql_migration.sh
#/bin/sh
#
# Script to migrate databases from prod
#
REMOTE_HOST=<your-remote-hostname>
REMOTE_USER=<your-remote-username>
# get remote password
You can’t perform that action at this time.