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
#Git configuration one time only | |
git config --global user.name "My Name" | |
git config --global user.email me@mydomain.com | |
git config --global color.ui true | |
cd my/project/folder | |
git init | |
git add . | |
git commit -a -m "initial setup of repository" |
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
How to install Drush on Mac OS X Mountain Lion. | |
1. Download the latest version of Drush to your local folder (e.g. Desktop) | |
2. Launch Terminal and change directory (where drush is downloaded) | |
cd ~/Desktop | |
3. Extract it. | |
4. Create /usr/local/lib if it does not exist (otherwise, skip this step) | |
sudo mkdir /usr/local/lib/ | |
5. Move it to /usr/local/lib | |
sudo mv drush /usr/local/lib/ |
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
$ drush sql-drop && drush sql-cli < backup_file_name.sql |
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
# Sensitive information # | |
######################### | |
# Ignore configuration files that may contain sensitive information. | |
sites/*/settings*.php | |
# User Generated Content # | |
########################## | |
sites/*/files | |
sites/*/private |
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 | |
if [ $(id -u) != 0 ]; then | |
printf "This script must be run as root.\n" | |
exit 1 | |
fi | |
drupal_path=${1%/} | |
drupal_user=${2} | |
httpd_group="${3:-www-data}" |
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
/** | |
* Implements hook_preprocess_html(). | |
**/ | |
function YOURTHEMENAME_preprocess_html(&$vars) { | |
$vars['doctype'] = '<!DOCTYPE html>' . "\n"; | |
$vars['rdf'] = new stdClass; | |
$vars['rdf']->version = ''; | |
$vars['rdf']->namespaces = ''; | |
$vars['rdf']->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
<?php | |
/** | |
* Remove Drupal's core system stylesheets. | |
*/ | |
function THEMENAME_css_alter(&$css) | |
{ | |
$path_system = drupal_get_path('module', 'system'); | |
$remove = array( | |
$path_system . '/system.base.css', |
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
// We we need to add PHP's binaries to our path. The path is an environment variable that denotes which directories to look for commands in. The path can be modified by editing the ".profile" file under your home directory. I've used version 5.3.20 of PHP, but you can choose from whichever versions are available to you. | |
$ echo "export PATH=/Applications/MAMP/bin/php/php5.3.20/bin:$PATH" >> ~/.profile | |
//Now you can either restart your terminal session or run the following from your home directory to read in the new path variable. | |
$ . ./.profile | |
//You should now have the correct binaries on your path and can check this by running the "which" command again. |
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
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch | |
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
git fetch origin | |
git reset --hard origin/master | |
git pull | |
git status |
OlderNewer