-
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
// | |
// All lines starting with "//" will not show up in the style.css | |
// However, the following lines inside "/* ... */" WILL show up. | |
// | |
// The visible comment below is there to warn any developer who | |
// opens a .css file that they need to edit the .scss versions ONLY. | |
// But you already know that because you're reading this :) | |
// | |
/* |
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 | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function modulename_form_alter(&$form, &$form_state, $form_id) { | |
// You might want to filter by content type. | |
if ($form_id == 'ctype_node_form') { | |
// Add a cancel button. | |
$form['actions']['cancel'] = array( |
After upgrading to OSX Lion, I discovered that both PEAR and PECL had gone missing. It turns out that you have to re-install them, but luckily it's quite simple. I found this quick guide from Ruggero De Pellegrini on Google+, and thought I would share the info to save you the confusion:
- Download the installer curl http://pear.php.net/go-pear.phar > go-pear.php
- Start the installation procedure with sudo sudo php -q go-pear.php
- Select a new installation base ($prefix) e.g. /usr/local
- Proceed with the install.
- If there is no /etc/php.ini file yet, copy the default sudo cp /etc/php.ini.default /etc/php.ini
- Edit /etc/php.ini and change the line ;include_path = ".:/php/includes" to include_path = ".:/usr/local/share/pear"
- Add /usr/local/bin/ to your path if you haven't already, e.g. in .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
# Route extension-less URLs to the equivalent *.html file. | |
# For instance: example.com/about = example.com/about.html | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^\.]+)$ $1.html [NC,L] | |
</IfModule> |
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
javascript:(function(){x%20=%20open().document;$(".views-field-title a").each(%20function()%20{%20x.write('[' + $(this).attr('href').replace(/\/node\//, '#') + '] : ' + $(this).text()+'<br%20/>')%20})})() |
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
core = 6.x | |
projects[pressflow][type] = "core" | |
projects[pressflow][download][type] = "get" | |
projects[pressflow][download][url] = "http://lb.cm/pressflow6" | |
; INSTALL PROFILES | |
projects[profiler] = 2.0beta1 | |
; DEVELOPMENT |
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 | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |