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
bower install |
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
{ | |
"name": "meu-projeto", | |
"version": "0.0.0", | |
"dependencies": { | |
"jquery": "master", | |
"angular": "1.0.7" | |
} | |
} |
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
# Instala os pacotes definidos no bower.json do seu projeto | |
bower install | |
# Instala um pacote específico | |
bower install <package> | |
# Instala uma versão (git tag) de um pacote | |
bower install <package>#<version> |
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
npm install -g bower |
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
# admin/posts/_form.html.haml | |
= f.actions do | |
= f.action :submit, button_html: { onclick: 'this.form.target = "_self"; return true' } | |
= f.action :submit, label: 'Preview', button_html: { onclick: 'this.form.target = "_blank"; return true' } |
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 | |
App::uses('Controller', 'Controller'); | |
class AppController extends Controller { | |
public $components = array('Session', 'Auth'); | |
public function isPrefix($prefix) { | |
return isset($this->request->params['prefix']) && $this->request->params['prefix'] == $prefix; | |
} |
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 | |
// Inclui nossa classe com os métodos de segurança | |
require_once "Seguranca.php"; | |
// Dados vindos do formulário | |
$usuario = $_POST['usuario']; | |
$senha = $_POST['senha']; | |
// Autentica o usuário | |
if ($Seguranca->login($usuario, $senha)) { |
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
<form method="post" action="valida.php"> | |
<label for="usuario">Usuário</label> | |
<input type="text" name="usuario" id="usuario" /> | |
<label for="senha">Senha</label> | |
<input type="password" name="senha" id="senha" /> | |
<input type="submit" value="Entrar" /> | |
</form> |
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
CREATE TABLE IF NOT EXISTS `usuarios` ( | |
`id` INT(10) unsigned NOT NULL AUTO_INCREMENT, | |
`nome` VARCHAR(100) NOT NULL, | |
`usuario` VARCHAR(50) NOT NULL, | |
`senha` CHAR(40) NOT NULL, | |
PRIMARY KEY (`id`) | |
); |
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
$ ab -kc 20 -t 60 http://demo.magentocommerce.com/sony-vaio-11-1-notebook-pc.html/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking demo.magentocommerce.com (be patient) | |
Finished 433 requests | |