Skip to content

Instantly share code, notes, and snippets.

View sidharrell's full-sized avatar

Sidney Harrell sidharrell

  • Vivian-Harrell Web Development Studios, LLC
  • Harpers Ferry, WV, United States
View GitHub Profile
@sidharrell
sidharrell / setupd8
Last active March 20, 2016 19:14 — forked from timplunkett/setupd8
Reinstall D8
#!/bin/bash
# edits if using:
# current hostname: dev01.vhwebdev.com
# this only affects the message output with the link to the new site, not any functionality
# current local git clone of Drupal 8: /home/$user/Development/drupal
# you will need to locally clone drupal 8. It's a lot more efficient on whatever hosts drupal's git repo.
# current OS: Centos6
# you would need to modify it to work on straight apache2 on Ubuntu, or make a symlink of /etc/httpd to /etc/apache2
# and modify the apache2 main conf file to pick up .conf files in /etc/httpd/conf.d/
# You will need to put https://gist.github.com/sidharrell/47767f2bb468ec65a84d , the template file,
<?php
use Drupal\Core\Config\Schema\SchemaCheckTrait;
/**
* Implements hook_drush_command().
*/
function ef_drush_command() {
$items['schema-validate'] = [
'description' => dt('Validates all config schemaj'),
];
@sidharrell
sidharrell / 0_reuse_code.js
Created June 12, 2014 01:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1);
function espresso_create_wp_user($attendee_data) {
if( username_exists( $attendee_data['email'] ) == NULL ) {
global $org_options;
// Generate the password and create the user
$password = wp_generate_password( 12, false );
$user_id = wp_create_user( $attendee_data['email'], $password, $attendee_data['email'] );
// Set the users details
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1);
function espresso_create_wp_user($attendee_data) {
if( username_exists( $attendee_data['email'] ) == NULL ) {
global $org_options, $wpdb;
// Generate the password and create the user
$password = wp_generate_password( 12, false );
$user_id = wp_create_user( $attendee_data['email'], $password, $attendee_data['email'] );
// Set the users details