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
2013-09-27T14:33:22.580805+00:00 app[web.1]: hello | |
2013-09-27T14:33:23.013649+00:00 app[web.1]: Angular App Server - listening on p | |
ort: 14321 | |
2013-09-27T14:34:23.045521+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web | |
process failed to bind to $PORT within 60 seconds of launch | |
2013-09-27T14:34:23.045966+00:00 heroku[web.1]: Stopping process with SIGKILL | |
2013-09-27T14:34:24.288334+00:00 heroku[web.1]: Process exited with status 137 | |
2013-09-27T14:34:24.306647+00:00 heroku[web.1]: State changed from starting to c | |
rashed | |
2013-09-27T14:30:26.852676+00:00 heroku[api]: Deploy f37f973 by shyam.salim.kuma |
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
/* | |
html5doctor.com Reset Stylesheet | |
v1.6.1 | |
Last Updated: 2010-09-17 | |
Author: Richard Clark - http://richclarkdesign.com | |
Twitter: @rich_clark | |
*/ | |
html, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(function(position) { | |
var lat = position.coords.latitude, | |
lon = position.coords.longitude; | |
console.log('Geolocation - Latitude: '+ lat +', Longitude: '+ lon); | |
}); | |
} | |
else { | |
console.log('Geolocation is not supported for this Browser/OS version yet.'); | |
} |
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
document.addEventListener('visibilitychange', function(e) { | |
console.log('hidden:' + document.hidden, | |
'state:' + document.visibilityState) | |
}, false); |
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
$pattern = "/([a-z0-9][_a-z0-9.-]+@([0-9a-z][_0-9a-z-]+\.)+[a-z]{2,6})/i"; | |
$replace = "\\1"; | |
$text = preg_replace($pattern, $replace, $stringa); | |
echo htmlspecialchars($text); |
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 watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) { | |
list($width, $height) = getimagesize($SourceFile); | |
$image_p = imagecreatetruecolor($width, $height); | |
$image = imagecreatefromjpeg($SourceFile); | |
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height); | |
$black = imagecolorallocate($image_p, 0, 0, 0); | |
$font = 'arial.ttf'; | |
$font_size = 10; | |
imagettftext($image_p, $font_size, 0, 10, 20, $black, $font, $WaterMarkText); | |
if ($DestinationFile<>'') { |
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 generateCsv($data, $delimiter = ',', $enclosure = '"') { | |
$handle = fopen('php://temp', 'r+'); | |
foreach ($data as $line) { | |
fputcsv($handle, $line, $delimiter, $enclosure); | |
} | |
rewind($handle); | |
while (!feof($handle)) { | |
$contents .= fread($handle, 8192); | |
} | |
fclose($handle); |
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
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" language="javascript"> | |
$(function() { | |
$(this).bind("contextmenu", function(e) { | |
e.preventDefault(); | |
}); | |
}); | |
</script> |
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 getFileExtension($str) | |
{ | |
$arrSegments = explode('.', $str); // may contain multiple dots | |
$strExtension = $arrSegments[count($arrSegments) - 1]; | |
$strExtension = strtolower($strExtension); | |
return $strExtension; | |
} |