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
#!/usr/bin/bash | |
git clone https://github.com/paulirish/html5-boilerplate.git | |
cd html5-boilerplate | |
git checkout v2.0stripped |
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
resources.locale.default = "en_US" | |
resources.translate.content = APPLICATION_PATH "/../data/locales" | |
resources.translate.scan = "directory" | |
resources.translate.adapter = "csv" | |
resources.translate.delimiter = "," | |
resources.translate.default = "en" | |
;File localization structure example: | |
; | |
; project_root/data/locales/en/lang_en.csv |
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 | |
class IndexController extends Zend_Controller_Action | |
{ | |
private $lang; | |
public function init() { | |
$this->lang = Zend_Registry::get('Zend_Translate'); |
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
<!DOCTYPE html> | |
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en" mlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]--> | |
<!--[if IE 7 ]> <html class="no-js ie7" lang="en" mlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]--> | |
<!--[if IE 8 ]> <html class="no-js ie8" lang="en" mlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
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 | |
$deploy_json = @file_get_contents('php://input'); | |
if (!empty($deploy_json)) | |
{ | |
$deploy_data = json_decode($deploy_json); | |
//Log output to file (overwrites on each deploy). Make sure file is 0777 | |
file_put_contents('results.txt', print_r($deploy_data, true)); |
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
# src: http://www.craig-russell.co.uk/bulk-minify-shell-script/ | |
CSS='css' | |
JS='js' | |
FILELIST="minify.$$.tmp" | |
COMPORESSOR="yuicompressor-2.4.2.jar" | |
MINCSS="css/styles.min.css" | |
# Minify CSS to single file | |
echo -n '' > $MINCSS |
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
Instead of the "traditional": | |
(function() { | |
})(); | |
You can do: | |
!function(){ |
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 | |
# Find location of this script. | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
#Standard permissions | |
find "$DIR"/ -type d -print0 | xargs -0 chmod 775 | |
find "$DIR"/ -type f -print0 | xargs -0 chmod 664 | |
#Alternatively 0777 these |
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
mysqldump -u USER -pPASS DB_NAME | mysql -u USER -pPASS NEW_DB_NAME |
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
#Turn on Rewrite | |
RewriteEngine On | |
#Check if requested file ends in .md or .markdown | |
RewriteCond $1 \.(md|markdown)$ [NC] | |
#Check if file exists | |
RewriteCond %{REQUEST_FILENAME} -f | |
#Rewrite so $_GET['file'] is available to PHP code |