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
# setting for staging environment | |
task :staging do | |
# If you aren't deploying to /u/apps/#{application} on the target | |
# servers (which is the default), you can specify the actual location | |
# via the :deploy_to variable: | |
set :deploy_to, "/var/www/staging" | |
after("deploy:default", :copy_config_files) | |
end | |
#Deployment tasks |
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 | |
sed -i 's/Configure::write('debug', 2);/Configure::write('debug', 0);/g' /opt/lampp/htdocs/wp/app/config/bootstrap.local.php | |
# idea is bootstrap.local.php is the file | |
# original string is Configure::write('debug', 2); | |
# replace it with Configure::write('debug', 0); |
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 | |
cp myapp/Config/core.php myapp/Config/core.php.backup | |
echo "Configure::write('Acl.database', 'test');" >> myapp/Config/core.php | |
lib/Cake/Console/cake testsuite -app myapp app | |
mv myapp/Config/core.php.backup myapp/Config/core.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 | |
### | |
# | |
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com) | |
# | |
# Ubuntu 11.04 based web server installation script | |
# Run this by executing the following from a fresh install of Ubuntu 11.04 server: | |
# |
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 | |
### | |
# | |
# Copyright (c) 2012 https://github.com/simkimsia | |
# | |
# Ubuntu 11.04, 11.10 based installation script for Python, Pip and Fabric | |
# Run this by executing the following from a fresh install of Ubuntu 11.04, 11.10 server: | |
# | |
# bash -c "$(curl -fsSL https://raw.github.com/gist/2631668)" |
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 | |
### | |
# | |
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com) | |
# | |
# Ubuntu 11.xx server installation script for Jenkins | |
# Run this by executing the following from a fresh install of Ubuntu 11.xx server: | |
# |
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 | |
//Define an array of character information | |
$characters = array( | |
'yakko' => array ( | |
'id' => 'yakkowarner', | |
'url' => 'characterview.php?id=yakkowarner', | |
'name' => 'Yakko Warner' | |
), |
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 | |
header('Content-Type: text/html; charset=utf-8'); | |
mb_internal_encoding('utf-8'); | |
function wordWrapAnnotation(&$image, &$draw, $text, $maxWidth) | |
{ | |
// separate the text by chinese characters or words or spaces | |
preg_match_all('/([\w]+)|(.)/u', $text, $matches); | |
// $words is array of Chinese characters, English Words or spaces |
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
Today, Apple added a beautiful new package to their official developer tools suite: Command Line Tools for Xcode. It's a 171 MB download that includes all of the tools a Homebrew should ever need. Best of all, it contains the proprietary headers that I couldn't ship myself. | |
You can download and try it out today. All you need is a free Apple ID. | |
You'll want to uninstall Xcode first: | |
$ sudo /Developer/Library/uninstall-devtools --mode=all | |
Major props to Apple for making this happen. | |
follow rest of instructions here http://www.rabblemedia.net/installing-nginx-php-fpm-and-mysql-drupal-osx-lion-homebrew |
OlderNewer