This file contains hidden or 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> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="main"> | |
<canvas id="c"></canvas><!-- the canvas --> | |
</div> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
</body> |
This file contains hidden or 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 $query = $this->data['Project']['search']; ?> |
This file contains hidden or 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 createIndextankClient(){ | |
App::import('Vendor', 'indextank_client'); | |
$API_URL = 'YOUR API URL HERE'; | |
$client = new ApiClient($API_URL); | |
return $client; | |
} | |
function addIndextank($indexType,$id,$data){ | |
//send project to indextank |
This file contains hidden or 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
ob_end_flush(); |
This file contains hidden or 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
var $view = 'Haml'; |
This file contains hidden or 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
## Parse all .php file in the /var/www directory | |
location ~ \.php$ | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; |
This file contains hidden or 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
sudo /etc/init.d/php5-fpm restart |
This file contains hidden or 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
sudo apt-get install nginx |
This file contains hidden or 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 comment_author_link_mine( $comment_ID = 0 ) { | |
echo get_comment_author_link_mine( $comment_ID ); | |
} | |
function get_comment_author_link_mine( $comment_ID = 0 ) { | |
/** @todo Only call these functions when they are needed. Include in if... else blocks */ | |
$url = get_comment_author_url( $comment_ID ); | |
$author = get_comment_author( $comment_ID ); |
This file contains hidden or 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 | |
$baseurl = 'http://www.example.com'; //set the base url of the site | |
$pageYouWant = $baseurl."/the-rest-of-the-url"; //add the rest of the url you want to check against | |
$currentPage = $baseurl.$_SERVER['REQUEST_URI'];// this gets the current page url | |
if($pageYouWant==$currentPage) { | |
//do something | |
} | |
?> |