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 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 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 ~ $ { | |
##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 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 | |
//Get the directory to zip | |
$filename_no_ext= $_GET['directtozip']; | |
// we deliver a zip file | |
header("Content-Type: archive/zip"); | |
// filename for the browser to save the zip file | |
header("Content-Disposition: attachment; filename=$filename_no_ext".".zip"); |
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
require 'net/http' | |
require 'uri' | |
require 'json' | |
def get_gist(fileName,content) | |
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/json/new'), | |
{ 'files[#{fileName}]' => content, | |
'login' => 'USER NAME HERE', | |
'token' => 'API TOKEN HERE', | |
'description' => 'This is a test description' |
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
module GravatarHelper | |
def gravatar_url_for(email, options = {}) | |
options = { :size => '200', :default => 'retro', :rating => 'pg'}.merge(options) | |
size = options[:size] | |
rating = options[:rating] | |
default = options[:default] | |
# create the md5 hash | |
hash = Digest::MD5.hexdigest(email) |
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
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="240" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"> | |
<PARAM name="SRC" VALUE="poster.mov"> | |
<PARAM name="QTSRC" VALUE="rtsp://your_streaming_subdomain.com:554/your_streaming_subdomain.com/movie.mov"> | |
<PARAM name="AUTOPLAY" VALUE="true"> | |
<PARAM name="CONTROLLER" VALUE="false"> | |
<embed src="poster.mov" qtsrc="rtsp://your_streaming_subdomain.com:554/your_streaming_subdomain.com/movie.mov" width="320" height="240" target="myself" controller="false" autoplay="true"></embed> | |
</OBJECT> |
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
mkdir gittest | |
cd gittest | |
git --bare init |
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
.menu_body{ display:none; } |
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
Header unset ETag | |
FileETag None | |
<FilesMatch "\.(css|js)$"> | |
SetOutputFilter DEFLATE | |
</FilesMatch> | |
<FilesMatch "\.(mov|otf|eot|ttf|ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> | |
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" |
OlderNewer