apache_conf 清迈制造商俱乐部

清迈制造商俱乐部

config.ini
# generated by Slic3r 1.0.0RC2 on Sat Mar 22 17:33:10 2014
avoid_crossing_perimeters = 1
bed_size = 200,110
bed_temperature = 0
bottom_solid_layers = 3
bridge_acceleration = 0
bridge_fan_speed = 100
bridge_flow_ratio = 1
bridge_speed = 60
brim_width = 0
complete_objects = 0
cooling = 1
default_acceleration = 0
disable_fan_first_layers = 1
duplicate = 1
duplicate_distance = 6
duplicate_grid = 1,1
end_gcode = M104 S0 ; turn off temperature\nG28 X0  ; home X axis\nM84     ; disable motors
external_perimeter_speed = 70%
external_perimeters_first = 0
extra_perimeters = 1
extruder_clearance_height = 20
extruder_clearance_radius = 20
extruder_offset = 0x0
extrusion_axis = E
extrusion_multiplier = 0.125
extrusion_width = 0
fan_always_on = 0
fan_below_layer_time = 60
filament_diameter = 1.75
fill_angle = 45
fill_density = 0.4
fill_pattern = line
first_layer_acceleration = 0
first_layer_bed_temperature = 0
first_layer_extrusion_width = 200%
first_layer_height = 0.4
first_layer_speed = 30%
first_layer_temperature = 200
g0 = 0
gap_fill_speed = 20
gcode_arcs = 0
gcode_comments = 0
gcode_flavor = reprap
infill_acceleration = 0
infill_every_layers = 10
infill_extruder = 1
infill_extrusion_width = 0
infill_first = 0
infill_only_where_needed = 0
infill_speed = 60
layer_gcode = 
layer_height = 0.4
max_fan_speed = 100
min_fan_speed = 35
min_print_speed = 10
min_skirt_length = 0
notes = 
nozzle_diameter = 0.4
only_retract_when_crossing_perimeters = 1
ooze_prevention = 0
output_filename_format = [input_filename_base].gcode
overhangs = 1
perimeter_acceleration = 0
perimeter_extruder = 1
perimeter_extrusion_width = 0
perimeter_speed = 30
perimeters = 3
post_process = 
print_center = 100,100
raft_layers = 0
randomize_start = 0
resolution = 0
retract_before_travel = 2
retract_layer_change = 1
retract_length = 1
retract_length_toolchange = 10
retract_lift = 0
retract_restart_extra = 0
retract_restart_extra_toolchange = 0
retract_speed = 30
rotate = 0
scale = 1
skirt_distance = 6
skirt_height = 1
skirts = 1
slowdown_below_layer_time = 30
small_perimeter_speed = 30
solid_fill_pattern = rectilinear
solid_infill_below_area = 70
solid_infill_every_layers = 0
solid_infill_extrusion_width = 0
solid_infill_speed = 60
spiral_vase = 0
standby_temperature_delta = -5
start_gcode = G28 ; home all axes\nG1 Z5 F5000 ; lift nozzle
start_perimeters_at_concave_points = 0
start_perimeters_at_non_overhang = 0
support_material = 1
support_material_angle = 0
support_material_enforce_layers = 0
support_material_extruder = 1
support_material_extrusion_width = 0
support_material_interface_extruder = 1
support_material_interface_layers = 3
support_material_interface_spacing = 0
support_material_pattern = honeycomb
support_material_spacing = 1
support_material_speed = 60
support_material_threshold = 0
temperature = 200
thin_walls = 1
threads = 2
toolchange_gcode = 
top_infill_extrusion_width = 0
top_solid_infill_speed = 50
top_solid_layers = 3
travel_speed = 130
use_firmware_retraction = 0
use_relative_e_distances = 0
vibration_limit = 0
wipe = 0
z_offset = 0

apache_conf 将非www重定向到www

.htaccess
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

apache_conf 强制落后斜线

.htaccess
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

apache_conf 随机确认码生成器

随机确认码生成器

confirm_code.php
<?
 
class confirm_code
{
    protected static function generate_random_bytes($length=16){
        if(function_exists('openssl_random_pseudo_bytes')) {
            $rnd = openssl_random_pseudo_bytes($length, $strong);
            if ($strong === TRUE)
                return $rnd;
        }
        $rand = '';
        // Unix/Linux platform?
        $fp = @fopen('/dev/urandom','rb');
        if ($fp === FALSE)
          throw new Exception("No method for generating random bytes");
        $rand .= @fread($fp,$length);
        @fclose($fp);
        return $rand;
    }
 
    
    public static function create($length=6)
    {
        $keyspace = '0123456789';
        $entropy  = self::generate_random_bytes($length);
        $entropy   = str_split($entropy);
        $callback = function($str) {
                return ord($str);
            };
        $entropy_list = array_map($callback, $entropy);
        $confirm_code = "";
        foreach ($entropy_list as $value)
            $confirm_code .= $keyspace[($value % 10)];
        return $confirm_code;
    }
}

// test
/*
for ($i=0; $i < 10; $i++)
{
    printf("\n%s", confirm_code::create());
}
*/

apache_conf 的.htaccess

.htaccess
#301 Redirects for .htaccess

#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html

#Redirect an entire site:
Redirect 301 / http://www.domain.com/

#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/

#Redirect a sub folder to another site
Redirect 301 /subfolder http://www.domain.com/

#This will redirect any file with the .html extension to use the same filename but use the .php extension instead.
RedirectMatch 301 (.*)\.html$ http://www.domain.com$1.php

##
#You can also perform 301 redirects using rewriting via .htaccess.
##

#Redirect from old domain to new domain
RewriteEngine on
RewriteBase /
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

#Redirect to www location
RewriteEngine on
RewriteBase /
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

#Redirect to www location with subdirectory
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/directory/index.html [R=301,NC]

#Redirect from old domain to new domain with full path and query string:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*) http://www.newdomain.com%{REQUEST_URI} [R=302,NC]

#Redirect from old domain with subdirectory to new domain w/o subdirectory including full path and query string:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/subdirname/(.*)$
RewriteRule ^(.*) http://www.katcode.com/%1 [R=302,NC]

Rewrite and redirect URLs with query parameters (files placed in root directory)

Original URL:

http://www.example.com/index.php?id=1
Desired destination URL:

http://www.example.com/path-to-new-location/
.htaccess syntax:

RewriteEngine on
RewriteCond %{QUERY_STRING} id=1
RewriteRule ^index\.php$ /path-to-new-location/? [L,R=301]
Redirect URLs with query parameters (files placed in subdirectory)

Original URL:

http://www.example.com/sub-dir/index.php?id=1
Desired destination URL:

http://www.example.com/path-to-new-location/
.htaccess syntax:

RewriteEngine on
RewriteCond %{QUERY_STRING} id=1
RewriteRule ^sub-dir/index\.php$ /path-to-new-location/? [L,R=301]
Redirect one clean URL to a new clean URL

Original URL:

http://www.example.com/old-page/
Desired destination URL:
http://www.example.com/new-page/
.htaccess syntax:

RewriteEngine On
RewriteRule ^old-page/?$ $1/new-page$2 [R=301,L]
Rewrite and redirect URLs with query parameter to directory based structure, retaining query string in URL root level

Original URL:

http://www.example.com/index.php?id=100
Desired destination URL:

http://www.example.com/100/
.htaccess syntax:

RewriteEngine On
RewriteRule ^([^/d]+)/?$ index.php?id=$1 [QSA]
Rewrite URLs with query parameter to directory based structure, retaining query string parameter in URL subdirectory

Original URL:
http://www.example.com/index.php?category=fish
Desired destination URL:
http://www.example.com/category/fish/
.htaccess syntax:

RewriteEngine On
RewriteRule ^/?category/([^/d]+)/?$ index.php?category=$1 [L,QSA]
Domain change – redirect all incoming request from old to new domain (retain path)

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example-old\.com$ [NC]
RewriteRule ^(.*)$ http://www.example-new.com/$1 [R=301,L]
If you do not want to pass the path in the request to the new domain, change the last row to:

RewriteRule ^(.*)$ http://www.example-new.com/ [R=301,L]

#From blog.oldsite.com -> www.somewhere.com/blog/
retains path and query, and eliminates xtra blog path if domain is blog.oldsite.com/blog/
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI}/ blog
RewriteRule ^(.*) http://www.somewhere.com/%{REQUEST_URI} [R=302,NC]
RewriteRule ^(.*) http://www.somewhere.com/blog/%{REQUEST_URI} [R=302,NC]

apache_conf config.md

config.md
Для запуска middleman через pow я использовал config.ru @collin'a

    require 'rubygems'
    require 'bundler'
    Bundler.setup
    require 'middleman'
    require 'middleman-core/preview_server'
    
    module Middleman::PreviewServer
      def self.preview_in_rack
        @options = {}
        @app = new_app
        start_file_watcher
      end
    end
    
    Middleman::PreviewServer.preview_in_rack
    
    run Middleman::PreviewServer.app

Но начиная c версии middleman 3.1.5 он больше не работает

Стандартный config.ru, который предлагается на оффициальном сайте работает

    require 'rubygems'
    require 'middleman/rack'
    
    run Middleman.server

Но если я вношу какие-либо измененния в код, мне необходимо перезапускать сервер, чтобы они вступили в силу.

apache_conf 从root重定向到subdir

从root重定向到subdir

.htaccess
RewriteEngine On
RewriteRule ^$ /subdir [L]

apache_conf 在IE上禁用兼容模式

在IE上禁用兼容模式

.htaccess
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    BrowserMatch MSIE ie
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
  </IfModule>
</IfModule>
 
<IfModule mod_headers.c>
# Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
# We need to inform proxies that content changes based on UA
 Header append Vary User-Agent
# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
</IfModule>

apache_conf SQL Server:SharePoint SQL Server 2008 R2最佳实践<br/> #SQLServer <br/> #SharePoint

SQL Server:SharePoint SQL Server 2008 R2最佳实践<br/> #SQLServer <br/> #SharePoint

SQLconfig.sql
-- Set Memory

EXEC sys.sp_configure N'show advanced options', N'1'  RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'max server memory (MB)', N'10240'
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'show advanced options', N'0'  RECONFIGURE WITH OVERRIDE
GO

-- Set-Permission

USE [master]
GO
CREATE LOGIN [VBL\sp1_admin] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
EXEC master..sp_addsrvrolemember @loginame = N'domain\sp1_admin', @rolename = N'dbcreator'
GO
EXEC master..sp_addsrvrolemember @loginame = N'domain\sp1_admin', @rolename = N'securityadmin'
GO

-- Backup Compression

EXEC sys.sp_configure N'backup compression default', N'1'
GO
RECONFIGURE WITH OVERRIDE
GO

-- Max Parallelism

sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'max degree of parallelism', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
Configuration.ini
;SQLSERVER2008 Configuration File
[SQLSERVER2008]

; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will reflect the instance ID of the SQL Server instance. 

INSTANCEID="MSSQLSERVER"

; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. 

ACTION="Install"

; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components. 

FEATURES=SQLENGINE,FULLTEXT,IS,BC,SSMS,ADV_SSMS

; Displays the command line parameters usage 

HELP="False"

; Specifies that the detailed Setup log should be piped to the console. 

INDICATEPROGRESS="False"

; Setup will not display any user interface. 

QUIET="False"

; Setup will display progress only without any user interaction. 

QUIETSIMPLE="False"

; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. 

X86="False"

; Detailed help for command line argument ENU has not been defined yet. 

ENU="True"

; Parameter that controls the user interface behavior. Valid values are Normal for the full UI, and AutoAdvance for a simplied UI. 

UIMODE="Normal"

; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature. 

ERRORREPORTING="False"

; Specify the root installation directory for native shared components. 

INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"

; Specify the root installation directory for the WOW64 shared components. 

INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"

; Specify the installation directory. 

INSTANCEDIR="C:\Program Files\Microsoft SQL Server"

; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature. 

SQMREPORTING="False"

; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS). 

INSTANCENAME="MSSQLSERVER"

; Agent account name 

AGTSVCACCOUNT="VBL\SP1SQL_Agent"

; Auto-start service after installation.  

AGTSVCSTARTUPTYPE="Automatic"

; Startup type for Integration Services. 

ISSVCSTARTUPTYPE="Automatic"

; Account for Integration Services: Domain\User or system account. 

ISSVCACCOUNT="NT AUTHORITY\NetworkService"

; Controls the service startup type setting after the service has been created. 

ASSVCSTARTUPTYPE="Automatic"

; The collation to be used by Analysis Services. 

ASCOLLATION="Latin1_General_CI_AS"

; The location for the Analysis Services data files. 

ASDATADIR="Data"

; The location for the Analysis Services log files. 

ASLOGDIR="Log"

; The location for the Analysis Services backup files. 

ASBACKUPDIR="Backup"

; The location for the Analysis Services temporary files. 

ASTEMPDIR="Temp"

; The location for the Analysis Services configuration files. 

ASCONFIGDIR="Config"

; Specifies whether or not the MSOLAP provider is allowed to run in process. 

ASPROVIDERMSOLAP="1"

; A port number used to connect to the SharePoint Central Administration web application. 

FARMADMINPORT="0"

; Startup type for the SQL Server service. 

SQLSVCSTARTUPTYPE="Automatic"

; Level to enable FILESTREAM feature at (0, 1, 2 or 3). 

FILESTREAMLEVEL="0"

; Set to "1" to enable RANU for SQL Server Express. 

ENABLERANU="False"

; Specifies a Windows collation or an SQL collation to use for the Database Engine. 

SQLCOLLATION="Latin1_General_CI_AS_KS_WS"

; Account for SQL Server service: Domain\User or system account. 

SQLSVCACCOUNT="VBL\SP1SQL_Engine"

; Windows account(s) to provision as SQL Server system administrators. 

SQLSYSADMINACCOUNTS="VORDEFINIERT\Administratoren" "VBL\SP1SQL_Admin"

; Default directory for the Database Engine backup files. 

SQLBACKUPDIR="E:\Microsoft SQL Server\Backup"

; Default directory for the Database Engine user databases. 

SQLUSERDBDIR="E:\Microsoft SQL Server\Data"

; Provision current user as a Database Engine system administrator for SQL Server 2008 R2 Express. 

ADDCURRENTUSERASSQLADMIN="False"

; Specify 0 to disable or 1 to enable the TCP/IP protocol. 

TCPENABLED="1"

; Specify 0 to disable or 1 to enable the Named Pipes protocol. 

NPENABLED="0"

; Startup type for Browser Service. 

BROWSERSVCSTARTUPTYPE="Disabled"

; Specifies how the startup mode of the report server NT service.  When 
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled 

RSSVCSTARTUPTYPE="Automatic"

; Specifies which mode report server is installed in.  
; Default value: “FilesOnly”  

RSINSTALLMODE="FilesOnlyMode"

; Add description of input argument FTSVCACCOUNT 

FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"

apache_conf 用于通过git POST钩子从Bitbucket到Dreamhost测试站点自动部署网站代码。

用于通过git POST钩子从Bitbucket到Dreamhost测试站点自动部署网站代码。

git-hook.php
<?php

$host   = 'your.test.domain';
$user     = 'git';
$pass     = 'pass';
$branch   = $_GET['branch'] ? $_GET['branch'] : 'master';
$log_path = "deployments.log";



if ((!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) &&
	isset($_SERVER['HTTP_AUTHORIZATION'])) {
	list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
		explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
}

if ($_SERVER['PHP_AUTH_USER'] == $user &&
	$_SERVER['PHP_AUTH_PW'] == $pass) {
	// log post data;
	$data = json_decode($_POST['payload'], true);
	if ($data && $data['commits'] && count($data['commits'])) {
		$commits = $data['commits'];
		$last = array_pop($commits);
		if ($last['branch'] == $branch) {
			$fp = fsockopen($host, 80, $errno, $errstr, 30);
			if ($fp) {
				$out = "GET /deploy.php?branch=$branch  / HTTP/1.1\r\n";
				$out .= "Host: $host\r\n";
				$out .= "Authorization: ".$_SERVER['HTTP_AUTHORIZATION']."\r\n";
				$out .= "Connection: Close\r\n\r\n";
			
				fwrite($fp, $out);
				fclose($fp);
			}
		}
	} else {
		// $deploy->log('No commits updated on branch: '.$branch);
	}
} else {
	// $deploy->log('HTTP Basic Authorization failed.', 'ERROR');
	header('WWW-Authenticate: Basic realm="'.$_SERVER['HTTP_HOST'].'"');
	header('HTTP/1.1 401 Unauthorized');
	exit;
}

?>
git-hook-deploy.php
<?php

$user     = 'git';
$pass     = 'pass';
$branch   = $_GET['branch'] ? $_GET['branch'] : 'master';
$log_path = "deployments.log";



class Deploy {

	/**
	* A callback function to call after the deploy has finished.
	* 
	* @var callback
	*/
	public $post_deploy;
	
	/**
	* The name of the file that will be used for logging deployments. Set to 
	* FALSE to disable logging.
	* 
	* @var string
	*/
	private $_log = 'deployments.log';

	/**
	* The timestamp format used for logging.
	* 
	* @link    http://www.php.net/manual/en/function.date.php
	* @var     string
	*/
	private $_date_format = 'Y-m-d H:i:sP';

	/**
	* The name of the branch to pull from.
	* 
	* @var string
	*/
	private $_branch = 'master';

	/**
	* The name of the remote to pull from.
	* 
	* @var string
	*/
	private $_remote = 'origin';

	/**
	* The directory where your website and git repository are located, can be 
	* a relative or absolute path
	* 
	* @var string
	*/
	private $_directory;

	/**
	* Sets up defaults.
	* 
	* @param  string  $directory  Directory where your website is located
	* @param  array   $data       Information about the deployment
	*/
	public function __construct($directory, $options = array())
	{
		// Determine the directory path
		$this->_directory = realpath($directory).DIRECTORY_SEPARATOR;

		$available_options = array('log', 'date_format', 'branch', 'remote');

		foreach ($options as $option => $value)
		{
			if (in_array($option, $available_options))
			{
				$this->{'_'.$option} = $value;
			}
		}

		$this->log('Attempting deployment...');
	}

	/**
	* Writes a message to the log file.
	* 
	* @param  string  $message  The message to write
	* @param  string  $type     The type of log message (e.g. INFO, DEBUG, ERROR, etc.)
	*/
	public function log($message, $type = 'INFO')
	{
		if ($this->_log)
		{
			// Set the name of the log file
			$filename = $this->_log;

			if ( ! file_exists($filename))
			{
				// Create the log file
				file_put_contents($filename, '');

				// Allow anyone to write to log files
				chmod($filename, 0666);
			}

			// Write the message into the log file
			// Format: time --- type: message
			file_put_contents($filename, date($this->_date_format).' --- '.$type.': '.$message.PHP_EOL, FILE_APPEND);
		}
	}

	/**
	* Executes the necessary commands to deploy the website.
	*/
	public function execute()
	{
		try
		{
			// Make sure we're in the right directory
			exec('cd '.$this->_directory, $output);
			$this->log('Changing working directory... '.implode(' ', $output));

			// Discard any changes to tracked files since our last deploy
			exec('git reset --hard HEAD', $output);
			$this->log('Reseting repository... '.implode(' ', $output));

			// Update the local repository
			exec('git pull '.$this->_remote.' '.$this->_branch, $output);
			$this->log('Pulling in changes... '.implode(' ', $output));

			exec('git submodule update --init --recursive 2>&1', $output);
			$this->log('Updating submodule changes... '.implode("\n", $output));

			// Secure the .git directory
			exec('chmod -R og-rx .git');
			$this->log('Securing .git directory... ');

			if (is_callable($this->post_deploy))
			{
				call_user_func($this->post_deploy, $this->_data);
			}

			$this->log('Deployment successful.');
		}
		catch (Exception $e)
		{
			$this->log($e, 'ERROR');
		}
	}

}



list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
	explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));

if ($_SERVER['PHP_AUTH_USER'] == $user &&
	$_SERVER['PHP_AUTH_PW'] == $pass) {

	if (!file_exists('.deploying')) {
		touch('.deploying');

		// This is just an example
		$deploy = new Deploy('.', array(
			'branch' => $branch,
			'log'    => $log_path
		));

		$deploy->post_deploy = function() use ($deploy) {
				$output = array();
				exec('sh build/pack.sh', $output);
				$deploy->log(implode("\n", $output));
		};
		$deploy->execute();
		unlink('.deploying');
	}
} else {
	// $deploy->log('HTTP Basic Authorization failed.', 'ERROR');
	header('WWW-Authenticate: Basic realm="'.$_SERVER['HTTP_HOST'].'"');
	header('HTTP/1.1 401 Unauthorized');
	exit;
}

?>
README.md
PHP git hook deploy
==========

Used for automated deploy web site code from Bitbucket to Dreamhost test site.

When push branch 'master' to bitbucket, the post hook will invoke this url:

	http://git:pass@yourdomain.com/git-hook.php

then this script will pull the origin/master down.

## Usage ##

1. Copy the both files to your Dreamhost site web root.
2. Add post hook URL into your bitbucket repo admin panel.
3. Initialize your git repo on Dreamhost, including add remote as a ssh protocol.
4. Add the ssh public key to Bitbucket deploy keys.
5. Checkout the branch you want to deploy So that the pulled code will be present on your site.

## Thanks ##

The Deploy class is from Brandon's post:

[Using Bitbucket for Automated Deployments](http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/)
.htaccess
# This config is used for Dreamhost which HTTP basic authoriztion is forbidden.
# The PHP Server variable 'PHP_AUTH_USER' & 'PHP_AUTH_PW' could be implement by
# this config via a CGI environment variable.
# From [HTTP Authentication on PHP as CGI (like Dreamhost)](http://planetozh.com/blog/2009/04/http-authentication-on-php-as-cgi-like-dreamhost/)

RewriteEngine on
RewriteRule ^git-hook.*\.php - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]