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 GET = function () { | |
var vars = {}, | |
parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function ( m, key, value ) { | |
vars[key] = value; | |
}); | |
return vars; | |
}; |
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 app_id = location.href.match(/(?:app(?:s\/|_))([0-9]+)/).pop(); | |
var url = 'https://facebook.com/dialog/pagetab?app_id={app_id}&redirect_uri=http://facebook.com'; | |
window.prompt("Copy URL [ctrl + c]", url.replace('{app_id}', app_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 | |
define('VERIFY_TOKEN', 'yourappssecret'); | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'GET' && $_GET['hub_mode'] == 'subscribe' && $_GET['hub_verify_token'] == VERIFY_TOKEN) { | |
echo $_GET['hub_challenge']; | |
} else if ($method == 'POST') { | |
$updates = json_decode(file_get_contents("php://input"), true); |
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 | |
/* | |
* Add this methos on the system/database/DB_active_rec.php file | |
*/ | |
/** | |
* | |
* Method to stablish the limit and offset | |
*/ | |
public function set_paging($page = 1, $results_per_page = 20) |
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
google.maps.event.addListener(myPolyline, 'capturing_changed', function(e) { | |
var path = this.getPath(); | |
}); |
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
(function(){ | |
var polyline = new google.maps.Polyline(); | |
google.maps.Polyline.prototype.closestDistanceToSegment = function(center, segment) | |
{ | |
var firstPoint, lastPoint, A, B, C, D, E, distanceAB, t, projection = this.getMap().getProjection(); | |
// The other extreme of the path | |
lastPoint = segment[0]; | |
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
less = { | |
functions: { | |
test: function(value, context){ | |
// return new(tree.Dimension)(valor, unidad) | |
// return new(tree.Anonymous) | |
// return new(tree.Quoted) | |
// return new(tree.URL) | |
// return new(tree.color)(color, alpha) | |
} | |
} |
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
// http://stackoverflow.com/questions/15733365/cross-browser-ie8-getcomputedstyle-with-javascript#comment23187887_15733365 | |
// http://snipplr.com/view/13523/ | |
if (!window.getComputedStyle) { | |
window.getComputedStyle = function(el, pseudo) { | |
this.el = el; | |
this.getPropertyValue = function(prop) { | |
var re = /(\-([a-z]){1})/g; | |
if (prop == 'float') prop = 'styleFloat'; | |
if (re.test(prop)) { | |
prop = prop.replace(re, function () { |
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
$('.first').lines({ | |
replace: function(lines) { | |
var lastLine = lines[lines.length-1]; | |
var center = $(this).width()/2 - lastLine.width/2; | |
lines[lines.length-1].text = '<span style="position:relative;margin-left:'+center+'px">'+lastLine.text+'</span>'; | |
return lines; | |
} | |
}); |
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
#banner { | |
border: 1px solid #666; | |
display: block; | |
width: 100%; | |
height: 1em; | |
font-size: 1em; | |
line-height: 1em; | |
margin: 20px auto; | |
padding: 0px; | |
text-align: justify; |