Skip to content

Instantly share code, notes, and snippets.

View shrop's full-sized avatar
👋

Mark Shropshire shrop

👋
View GitHub Profile
@shrop
shrop / gist:cd214ee3ac2533ebb484cf6e1a0a5ca4
Created November 4, 2017 16:11
drupal4docker docker-compose up -d error
docker-compose up -d
Creating network "drupal8_default" with the default driver
Creating drupal8_traefik_1 ...
Creating drupal8_mailhog_1 ...
Creating drupal8_portainer_1 ...
Creating drupal8_mariadb_1 ...
Creating drupal8_php_1 ...
Creating drupal8_mariadb_1
Creating drupal8_traefik_1
Creating drupal8_php_1
@shrop
shrop / curl-loop.sh
Created March 31, 2017 14:12
Script to loop through a text file list of URLs and output the curl -I to a text file
#!/bin/bash
for i in $(cat urls.txt); do
content=$(curl -I -s "{$i}")
echo "URL: $i" >> output.txt
echo "$content" >> output.txt
done
@shrop
shrop / send_drupal_pw_reset.php
Created February 6, 2017 21:57
Send Drupal 7 Password Reset Email
<?php
// Array of user IDs to email.
$uids = array('1');
// Loop through array of uids and attempt to send password reset emails.
foreach ($uids as $uid) {
// Load a user.
$account = user_load($uid);
// Invoke the email. It will be queued along with other system mail to be sent during cron
@shrop
shrop / drupal-issue-comment-template.txt
Last active October 28, 2016 13:01
Drupal issue comment template
<h3>Description</h3>
Description goes here
<h3>Technical Notes</h3>
Technical notes go here
<h3>Testing Instructions</h3>
ordered list item 1
@shrop
shrop / gist:2c08bbb015bcbb199f25fded1afe1b1c
Created October 25, 2016 14:31 — forked from bfodeke/Add local .drush folder as a mount to vagrant
Adding local .drush folder as a mount to vagrant drush
// Add a sync folder to sync local drush folder to the vm.
vagrant_synced_folders:
- local_path: ~/.drush
destination: /home/vagrant/.drush
type: nfs
create: true
@shrop
shrop / clamav-mac.md
Created September 28, 2016 20:50 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@shrop
shrop / formapi-example.php
Created September 19, 2016 10:11
Drupal Form API fieldset example
$form['who_are_you'] = array(
'#type' => 'fieldset',
'#title' => t('Who are you?'),
'#weight' => 5,
);
$form['who_are_you']['first_name'] = array(
'#type' => 'textfield',
'#title' => 'First Name',
'#required' => TRUE,
'#maxlength' => 255,
@IBAction func submitButton(_ sender: AnyObject) {
// Set the greeting intro.
let greetingIntroText = "Hi, "
// Set the complete greeting for display.
textGreetingLabel.text = greetingIntroText + nameField.text!
nameField.text = ""
}
@shrop
shrop / setup.sh
Created August 25, 2016 12:18 — forked from melnikovdv/setup.sh
Mac OS X setup from scratch
#!/bin/sh
##### Preparations #####
#-----------------------
# Description is available at http://mlayer.org/tech/2014/11/25/setup-mac-os-x.html
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask # makes available to install apps as packages
brew tap caskroom/versions # for beta version available through cask