-
Install Homebrew:
- Follow the install instructions found on this page.
-
Tap the wonderful homebrew-php from https://github.com/Homebrew/homebrew-php
$ brew tap homebrew-php
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 | |
DISKINFO=`diskutil info /dev/disk1s2 | grep 'Mounted: No'` | |
if [ -n "$DISKINFO" ] ; then | |
diskutil mountDisk /dev/disk1 | |
else | |
diskutil unmountDisk /dev/disk1 | |
fi |
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
<Directory "/Users/shrop/Sites/default/"> | |
Allow From All | |
AllowOverride All | |
</Directory> | |
<VirtualHost *:80> | |
ServerName "default.site" | |
DocumentRoot "/Users/shrop/Sites/default" | |
</VirtualHost> |
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
# Redirect non-www urls to www | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com | |
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L] |
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 | |
/** | |
* @file | |
* EntityFieldQuery demo. | |
*/ | |
$query = new EntityFieldQuery(); | |
// Return all articles that are published. | |
$result = $query->entityCondition('entity_type', 'node') |
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
<!-- Begin MailChimp Signup Form --> | |
<link href="http://cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css"> | |
<style type="text/css"> | |
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } | |
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. | |
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ | |
</style> | |
<div id="mc_embed_signup"> | |
<form action="http://drupalcampcharlotte.us6.list-manage1.com/subscribe/post?u=1826216c8a982e629e5128287&id=e574b4e40f" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<label for="mce-EMAIL">Subscribe to our mailing list</label> |
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 | |
echo "Configuring local development environment for local.site..." | |
# Change directory to the webroot. | |
cd /var/www | |
# Sanitize the database. | |
drush sql-sanitize -y |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
# If memcached is running, flush it. | |
if [ `sudo /etc/init.d/memcached status` =~ 'memcached is running' ]; then | |
echo ”flush_all” | nc localhost 11211 | |
echo "memcached flushed!" | |
fi |
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
dirname=$1 | |
if [ -f $dirname ]; then | |
dirname=`dirname $dirname` | |
fi | |
cd $dirname | |
if [ ! -d .git ]; then | |
exit 1 | |
fi |