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
# Natural Scrolling / inverte o scroll do mouse | |
sudo add-apt-repository ppa:zedtux/naturalscrolling | |
sudo apt-get update | |
sudo apt-get install naturalscrolling | |
# Sublime Text 2 / excelente editor de código | |
sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
sudo apt-get install sublime-text |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Visualizacao extends CI_Controller { | |
/** | |
* | |
* contar_visualizacao | |
* | |
* Verifica se o IP do visitante já visulizou o id da | |
* tabela no dia atual, se não tiver nenhum registro, |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
| ------------------------------------------------------------------------- | |
| Site Helper | |
| ------------------------------------------------------------------------- | |
| Desenvolvido por Bruno Almeida | |
| | |
*/ |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^siteantigo.com.br$ [OR] | |
RewriteCond %{HTTP_HOST} ^www.siteantigo.com.br$ [OR] | |
RewriteCond %{HTTP_HOST} ^sitenovo.com.br$ | |
RewriteRule (.*)$ http://www.sitenovo.com.br/$1 [R=301,L] |
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 | |
/** | |
* verificar_video | |
* | |
* Verifica qual é o vídeo (youtube ou vimeo) e retorna um array com o link e o tipo | |
* | |
* | |
* @param $string | |
* @return array |
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 | |
class MinhaClasse { | |
// DECLARAR A VARIÁVEL DE QUALQUER TIPO | |
private $configuracoes = array(); | |
public function __construct() { | |
parent::__construct(); | |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
| ------------------------------------------------------------------------- | |
| Site Helper | |
| ------------------------------------------------------------------------- | |
| Desenvolvido por Bruno Almeida | |
| | |
*/ |
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
# http://railscasts.com/episodes/402-better-errors-railspanel?autoplay=true | |
# Gemfile | |
group :development do | |
gem 'better_errors' # mostra os erros de uma forma melhor | |
gem 'binding_of_caller' # mostra mais detalhes de erros | |
gem 'meta_request' #mostra debug no chrome! Necessita de plugin https://github.com/dejan/rails_panel | |
end |
NewerOlder