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 getFacebookCurrentUserId( $secret = null ) | |
{ | |
$data = getFacebookCurrentUser($secret); | |
return (isset($data['user_id'])) ? $data['user_id'] : null; | |
} | |
function getFacebookCurrentUser( $secret = null ) | |
{ |
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 getYoutubeVideos( $username, $limit = null) | |
{ | |
$url = 'http://gdata.youtube.com/feeds/api/users/'.$username.'/uploads'; | |
$feed = simplexml_load_file($url); | |
$videos = array(); | |
$limit = ($limit === null ) ? count($feed->entry) : $limit; | |
$i = 0; |
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
echo '<pre style="background-color: #FFF; color:#000">'; | |
$s3Key = ''; | |
$s3Sectret = ''; | |
$imagePath = UPLOAD_PATH. DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR; | |
$fileName = 'barcode_2012090000110.jpg'; | |
$bucketName = $_SERVER['HTTP_HOST']; | |
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 | |
/** | |
* Amazon Simple Email Service (SES) connection object | |
* | |
* Integration between Zend Framework and Amazon Simple Email Service | |
* | |
* @category Zend | |
* @package Zend_Mail | |
* @subpackage Transport |
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 app_api() | |
{ | |
$return = array('status' => 'error', 'status_msg' => 'Operation Error'); | |
$params = $_GET; | |
unset($params['action']); | |
$result = get_posts($params); | |
if($result){ | |
$return['status'] = 'ok'; |
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
/* | |
* Wp Update URL | |
* Based on http://www.onextrapixel.com/2010/01/30/13-useful-wordpress-sql-queries-you-wish-you-knew-earlier/ | |
* Change the url on the database. | |
* @author Emerson Carvalho (@emersonbroga) | |
* | |
* @param $oldUrl STRING REQUIRED ex: http://www.site.com.br | |
* @param $newUrl STRING OPCIONAL ex: http://www.newsite.com | |
* | |
*/ |
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
var URL = window.location.protocol + '//'+ window.location.host; | |
$(document).ready(function(){ | |
$('#contact').validate({ | |
rules:{ | |
name:{ | |
required: true, | |
minlength: 3 | |
}, |
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 | |
$toName = 'Emerson Carvalho'; | |
$toEmail = '[email protected]'; | |
$name = ''; | |
$email = ''; | |
$phone = ''; | |
$subject = ''; |
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> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> |
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 | |
$toName = 'Emerson Carvalho'; | |
$toEmail = '[email protected]'; | |
$name = ''; | |
$email = ''; | |
$phone = ''; | |
$subject = ''; |