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 get_web_page( $url,$curl_data ) | |
{ | |
$options = array( | |
CURLOPT_RETURNTRANSFER => true, // return web page | |
CURLOPT_HEADER => false, // don't return headers | |
CURLOPT_FOLLOWLOCATION => true, // follow redirects | |
CURLOPT_ENCODING => "", // handle all encodings | |
CURLOPT_USERAGENT => "spider", // who am i |
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
### Have to admit at this point, as "fast" as development with cake is... I hate the bastard. | |
server { | |
listen 80; | |
server_name www.domain.com; | |
rewrite ^/(.*) http://domain.com/$1 permanent; | |
} | |
server { |
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 siteURL() | |
{ | |
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; | |
$domainName = $_SERVER['HTTP_HOST'].'/'; | |
return $protocol.$domainName; | |
} | |
define( 'SITE_URL', siteURL() ); |
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
sc stop IISADMIN | |
sc stop W3SVC | |
iisreset /stop | |
sc stop MsDepSvc |
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 | |
header('Cache-Control: no-cache, must-revalidate'); | |
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); | |
header('Content-type: application/json'); | |
$url = "http://news.bbc.co.uk/sport1/mobile/default.stm"; | |
$options = array( | |
CURLOPT_RETURNTRANSFER => true, // return web page | |
CURLOPT_HEADER => true, // return headers | |
CURLOPT_FOLLOWLOCATION => true, // follow redirects |
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
package com.phonegap.plugins; /*or just use your own namespace*/ | |
import org.json.JSONArray; | |
import android.app.ProgressDialog; | |
import android.util.Log; | |
import com.phonegap.DroidGap; | |
import com.phonegap.api.Plugin; | |
import com.phonegap.api.PluginResult; |
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 | |
# /etc/init.d/selenium | |
# debian-compatible selenium-grid startup script. | |
# Based on jenkins startups | |
# Praneeth Bodduluri <lifeeth[at]gmail.com> | |
# update-rc.d -n -f selenium start 90 2 3 4 5 . stop 10 0 1 6 . | |
### BEGIN INIT INFO | |
# Provides: selenium-grid | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network |
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
Applied on svn properties (recursively) using svn:ignore . | |
build.txt | |
*.resharper | |
**.ReSharper** | |
*.suo | |
*.user | |
*.pdb |
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
<!-- Replace IISCompressionScheme and Schemes XML With This --> | |
<!-- Command line IISRESET after this --> | |
<!-- Its also worth adding a header to the page for ETAG --> | |
<!-- C:\WINDOWS\SYSTEM32\INETSRV --> | |
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate" | |
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" | |
HcCreateFlags="0" | |
HcDoDynamicCompression="TRUE" | |
HcDoOnDemandCompression="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
function sendError(message, url, lineNum) { | |
var i; | |
// First check the URL and line number of the error | |
url = url || window.location.href; | |
lineNum = lineNum || 'None'; | |
// If the error is from these 3rd party script URLs, we ignore | |
// We could also just ignore errors from all scripts that aren't our own | |
var scriptURLs = [ |