⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
## activation ZEND optimizer | |
SetEnv ZEND_OPTIMIZER 1 | |
## suppression de SESSID dans les url | |
SetEnv SESSION_USE_TRANS_SID 0 | |
## serveur en PHP5 | |
SetEnv PHP_VER 5_3 | |
## Commenter la ligne ci-dessous si plantage | |
# php_flag zlib.output_compression on | |
## Activer le filtre | |
SetOutputFilter DEFLATE |
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
<IfModule mod_headers.c> | |
# Images | |
<FilesMatch "\\.(ico|jpe?g|png|gif|swf)$"> | |
Header set Cache-Control "max-age=2592000, public" | |
</FilesMatch> | |
# Fonts | |
<FilesMatch "\\.(ttf|eot|woff|otf|svg)$"> | |
Header set Cache-Control "max-age=2592000, public" | |
</FilesMatch> | |
# Style |
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
# MOD_DEFLATE COMPRESSION | |
SetOutputFilter DEFLATE | |
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php | |
#Pour les navigateurs incompatibles | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html | |
#ne pas mettre en cache si ces fichiers le sont déjà | |
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip |
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
/*--------------------------*\ | |
Flat UI Colors | |
\*--------------------------*/ | |
$turquoise : #1ABC9C; | |
$greensea : #16A085; | |
$emerald : #2ECC71; | |
$nephritis : #27AE60; |
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
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "css" | |
sass_dir = "scss" | |
images_dir = "img" | |
javascripts_dir = "js" | |
# You can select your preferred output style here (can be overridden via the command line): | |
# output_style = :expanded or :nested or :compact or :compressed | |
environment = :development #development production |
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 | |
function create_slug($string, $replace=array(), $delimiter='-') { | |
if( !empty($replace) ) { | |
$string = string_replace((array)$replace, ' ', $string); | |
} | |
$slug = iconv('UTF-8', 'ASCII//TRANSLIT', $string); | |
$slug = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $slug); | |
$slug = stringtolower(trim($slug, '-')); | |
$slug = preg_replace("/[\/_|+ -]+/", $delimiter, $slug); |
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 | |
// Function to get the client ip address | |
function get_client_ip() { | |
$ipaddress = ''; | |
if ($_SERVER['HTTP_CLIENT_IP']) | |
$ipaddress = $_SERVER['HTTP_CLIENT_IP']; | |
else if($_SERVER['HTTP_X_FORWARDED_FOR']) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
else if($_SERVER['HTTP_X_FORWARDED']) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED']; |
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 | |
if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])) send_404(); | |
$dbHost = "localhost"; //Location Of Database usually its localhost | |
$dbUser = "xxxx"; //Database User Name | |
$dbPass = "xxxx"; //Database Password | |
$dbDatabase = "xxxx"; //Database Name | |
$db = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die ("Error connecting to database."); | |
mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database."); | |
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 | |
$to = "[email protected]"; | |
$subject = "VIRALPATEL.net"; | |
$body = "Body of your message here you can use HTML too. e.g. <br> <b> Bold </b>"; | |
$headers = "From: Peter\r\n"; | |
$headers .= "Reply-To: [email protected]\r\n"; | |
$headers .= "Return-Path: [email protected]\r\n"; | |
$headers .= "X-Mailer: PHP5\n"; | |
$headers .= 'MIME-Version: 1.0' . "\n"; | |
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; |
OlderNewer