This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\form_api_example\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Implements the SimpleForm form controller. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Its been a while since I used this so please use at your own risk */ | |
function deleteDir($dirPath) { | |
if (! is_dir($dirPath)) { | |
throw new InvalidArgumentException("$dirPath must be a directory"); | |
} | |
if (substr($dirPath, strlen($dirPath) - 1, 1) != '/') { | |
$dirPath .= '/'; | |
} | |
$files = glob($dirPath . '*', GLOB_MARK); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# credits: https://jee-appy.blogspot.dk/2016/02/set-locale-on-ubuntu-permanent-solution.html | |
# Set locales in /etc/default/locale file | |
echo "Setting locale..." | |
echo "# Locale settings | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8">>~/.bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warning: use this script at your own risk - work in progress. Tested on Ubuntu 14.04 server. | |
# Note: Now that the letsencrypt feature is in place in Virtualmin, this script is obsolete. | |
# Before running the script, be sure to have Letsencrypt installed in /opt/ as descripted in the guide below: | |
# https://www.virtualmin.com/node/38853 | |
# Running Drupal on the site? Remember to adjust .htaccess as described in the link below: | |
# https://community.letsencrypt.org/t/drupals-defualt-htaccess-file-breaks-webroot-authentication/3014 | |
# Other resources: | |
# https://joealdeguer.com/how-to-install-and-setup-letsencrypt-for-virtualmin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Searches the current working directory recursively and replaces old symlink-setting with the new | |
read -p "This script should be run from the Drupal root folder to work properly. Is this our current location?" -n 1 -r | |
echo # (optional) move to a new line | |
if [[ ! $REPLY =~ ^[Yy]$ ]] | |
then | |
exit 1 | |
fi | |
curdir=$(pwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* MySQL Table Prefix Changer DXC Version | |
* By deuxcode.com | |
* Version 10.6.3 | |
* | |
* This is a modified version of R.Dunham's script. Original details below. | |
* | |
* New in this version: | |
* Possibility to specify current prefix which gives us the power to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# By http://www.rosehosting.com/blog/script-install-wordpress-on-a-debianubuntu-vps/ | |
# Install WordPress on a Debian/Ubuntu VPS | |
# | |
# Create MySQL database | |
read -p "Enter your MySQL root password: " rootpass | |
read -p "Database name: " dbname | |
read -p "Database username: " dbuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=changeme # <-- wordpress owner | |
WP_GROUP=changeme # <-- wordpress group | |
WP_ROOT=/home/changeme # <-- wordpress root directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# ======================= | |
# Siteup Script 0.1 | |
# Written by Command Line Idiot | |
# http://commandlineidiot.com | |
# You may use, modify, and redistribute this script freely | |
# Released: August 2007 | |
# ======================= |
NewerOlder