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
window.fbAsyncInit = function () { | |
FB.init({ | |
appId: 'APPID', | |
Status: true, | |
Cookie: true, | |
Xfbml: true | |
}); | |
FB.Event.subscribe('edge.create', function (response) { | |
Alert("Hello World! URL Liked!"); | |
}); |
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
FB.Event.subscribe('edge.create', function(targetUrl) { | |
_gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]); | |
}); |
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
validates_inclusion_of :birthday, | |
:in => Date.new(1900)..Time.now.years_ago(18).to_date, | |
:message => 'Too young, dude!' |
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 hideAddressBar() | |
{ | |
if(!window.location.hash) | |
{ | |
if(document.height < window.outerHeight) | |
{ | |
document.body.style.height = (window.outerHeight + 50) + 'px'; | |
} | |
setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); |
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
<IfModule mod_deflate.c> | |
SetOutputFilter DEFLATE | |
<IfModule mod_setenvif.c> | |
# Netscape 4.x has some problems | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
# Netscape 4.06-4.08 have some more problems | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Google Maps JavaScript API v3 Example: Geocoding Simple</title> | |
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" rel="stylesheet"> | |
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<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
#!/bin/bash | |
# mongodump reference: http://www.nacaolivre.com.br/servidor/mysql-backup-com-mysqldump/ | |
# Author: Lazaro Lima - www.lazarolima.com.br | |
# | |
S3_BUCKET_NAME="condomundo-databases-snapshots" | |
S3_BUCKET_PATH="mysql-backups" | |
MYSQLROOT="yourUserName" | |
MYSQLPASS="yourPassword" |
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
maps.google.com/maps?q=25.279139,51.551230 |
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
/* | |
* An example of how to use a Google Map overlay to display a label on top of marker. | |
* This is a slight re-work of http://www.tdmarketing.co.nz/blog/2011/03/09/create-marker-with-custom-labels-in-google-maps-api-v3/ | |
* I suggest you rather view that blog post, this code is pasted here purely for my own personal reference. | |
*/ | |
var | |
point = { | |
lat: 37.8478115, | |
long: 15.2934327 |
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
# Google Direction API | |
include HTTParty | |
format :json | |
def api_key | |
# Your API key | |
end | |
def direciton_api_url |
OlderNewer