This file contains hidden or 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 | |
# Interactive drupal installation | |
### Allow only root users to use the script | |
if [ "$EUID" -ne 0 ]; then | |
echo "Script must be run as a root." | |
exit 1 | |
fi |
This file contains hidden or 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 | |
accountName=$1 | |
accountPass=$2 | |
dbUserName=$3 | |
dbPass=$4 | |
dbName=$5 | |
siteName="$6" | |
contextRoot=$7 | |
drupalVer=$8 |
This file contains hidden or 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 | |
domain=$1 | |
serverRoot=$2 | |
createRootFolder=$3 | |
vhostPath=/etc/apache2/sites-available/ | |
vhostFile=${domain}.conf | |
function print_usage { |
This file contains hidden or 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
# Ignore configuration files that may contain sensitive information. | |
sites/*/*settings*.php | |
# Ignore paths that contain generated content. | |
files/ | |
sites/*/files | |
sites/*/private | |
# Ignore default text files | |
robots.txt |
This file contains hidden or 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
$calendar = array( | |
9 => array( | |
0 => array(), | |
1 => array(), | |
2 => array(), | |
3 => array( | |
"start_date" => 9, | |
"end_date" => 12, | |
"event_name" => "Cool Event0" | |
), |
This file contains hidden or 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 | |
$has_event_class = 'has-event-false'; | |
$events = array( | |
0 => array( | |
'city' => 'Tbilisi', | |
'start_date' => '2014-11-18 09:00', | |
'end_date' => '2014-11-18 12:00', | |
'name' => 'Meeting with Jesus' | |
), |
This file contains hidden or 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 | |
drupal_version=$1 | |
site_name=$2 | |
db_user=$3 | |
db_pass=$4 | |
db_name=$5 | |
function print_usage() { | |
echo -e "Usage: $0 drupal_version site_name db_user db_pass db_name" |
This file contains hidden or 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 | |
program_name=`basename $0` | |
function print_usage() { | |
echo -e "Usage: ${program_name} [-i module1 module2 ... ] [-e database_name] [-m \"git commit message\"]" | |
exit "$1" | |
} | |
function install_modules() { |
This file contains hidden or 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 one displays both service and port number colored in red (most likely): | |
egrep --color -o -m 1 '^'$1' *[0-9]+' /etc/services | |
# This one displays only the port number: | |
egrep -o -m 1 '^'$1'\s+[0-9]+' /etc/services | grep -P -o '\d+$' |
This file contains hidden or 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 | |
if [[ $1 =~ \.zip$ ]]; then | |
wget $1 && sudo unzip *.zip && sudo rm *.zip | |
elif [[ $1 =~ \.gz$ ]]; then | |
wget $1 && sudo tar -zxvf *.gz && sudo rm *.gz | |
fi | |
NewerOlder