save_and_open_page
have_button(locator)
/Users/samuelsimoes/code/*/log/*.log { | |
missingok | |
rotate 0 | |
size 3M | |
create | |
} |
jQuery(function ($) { | |
var dispatcher = $({}); | |
var Cart = { | |
init: function () { | |
var that = this; | |
this.dispatcher.on("shipping-value-calculated", function (event, shippingValue) { | |
that.sumShippingValue(); | |
}); |
###/public_html/< root_of_app >/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} !public/
RewriteRule ^(.*) public/$1
###/public_html/< root_of_app >/public/.htaccess
PassengerEnabled on
##Using Garp gem with stored tokens from OAuth2
You can easily get tokens using omniauth-google-oauth2 gem. Store token, refresh_token and expires_at from auth hash.
Case you don't have any credentials get this in Google Api Console.
Important: you need grant access to Analytics in your scope settings of ominauth gem and in Google API Console in "Services Tab" in order to use Garp gem.
module Reports
# -------------------------------------------------- | |
# Ignoring all files of Magento | |
# -------------------------------------------------- | |
/* | |
!/app/ | |
/app/* | |
# -------------------------------------------------- | |
# Not ignore your theme | |
# -------------------------------------------------- |
exec { "apt-get update": | |
command => 'sudo apt-get update', | |
path => '/usr/bin/' | |
} | |
class utils { | |
$utils = ["curl", "git-core", "python-software-properties", "build-essential", | |
"openssl", "libreadline6", "libreadline6-dev", "curl", "zlib1g", "zlib1g-dev", | |
"libssl-dev", "libyaml-dev", "libsqlite3-dev", "sqlite3", "libxml2-dev", | |
"libxslt-dev", "autoconf", "libc6-dev", "ncurses-dev", "automake", "libtool", |
<?php | |
/** | |
* Classe para criar Metaboxes mais manuteníveis no Wordpress. | |
* | |
* PHP versions 5.3+ | |
*/ | |
class Metabox | |
{ | |
public function __construct($key, $title, $screen, $callback=null) | |
{ |
#Pagseguro, dicas…
Baseado nas minhas experiências com o PagSeguro deixo algumas dicas para quem tá começando com o PagSeguro.
Antes de tudo grave bem esses dois nomes:
Código de Notificação: código que identifica uma notificação, este código precisa ser "traduzido" pelo WebService para lhe trazer as informações da transação em questão (incluindo o código de referência).
Código de Referência: identificador de uma transação no PagSeguro anexado a uma transação no seu app.
###Adaptando o CSS da paginação do Twitter Bootstrap para o CakePHP Marcação necessária:
<div class="pagination">
<div class="list">
<?php
echo $this->Paginator->prev('« Anterior', null, null, array('class' => 'prev disabled'));
echo $this->Paginator->numbers(array('separator' => false));
echo $this->Paginator->next('Próximo »', null, null, array('class' => 'prev disabled'));
?>