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 | |
include "class-db.php"; | |
include "data.class.php"; | |
//Lista os aniversariantes, de hoje a ate daqui a 30 dias. | |
// Configure as informacoes pertinentes ao banco: | |
$database = "pina"; | |
$servidor = "localhost"; | |
$user = "root"; | |
$pass = ""; |
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 | |
/** | |
* Description of data.class | |
* | |
* @author Pedro | |
*/ | |
class Data { | |
function b($date){ | |
return implode("-", array_reverse(explode("/", $date))); | |
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 | |
/** | |
* @author Jonathan Gotti <jgotti at jgotti dot org> | |
* @copyleft (l) 2003-2008 Jonathan Gotti | |
* @package DB | |
* @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License | |
* @subpackage MYSQL | |
* @since 2004-11-26 first splitted version | |
* @changelog - 2008-04-06 - autoconnect is now a static property | |
* - 2008-03-20 - new static parameter (bool) $useNewLink used as mysql_connect new_link parameter |
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 | |
/** | |
* Base class for databases object. | |
* @author Jonathan Gotti <jgotti at jgotti dot org> | |
* @copyleft (l) 2003-2008 Jonathan Gotti | |
* @package DB | |
* @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License | |
* @since 2006-04-16 first splitted version | |
* get_field and list_fields have changed -> list_table_fields (list_fields indexed by name) | |
* smart '?' on conditions strings |
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
# Converting to binary, hexadecimal, ASCII, etc. | |
number = 100 | |
base = 2 | |
# syntax: | |
numero.to_s(base) | |
# => "1100100" | |
number.to_s(16) |
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
#---------------------------------------------------------------------------- | |
# Git Setup | |
#---------------------------------------------------------------------------- | |
file '.gitignore', <<-FILE | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
public/uploads/* |
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
# .metrics | |
MetricFu::Configuration.run do |config| | |
config.metrics -= [:rcov, :rails_best_practices] | |
config.flog = {:dirs_to_flog => ['spec', 'lib']} | |
config.reek = {:dirs_to_reek => ['spec', 'lib']} | |
config.roodi = {:dirs_to_roodi => ['spec', 'lib']} | |
end |
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
class Order < ActiveRecord::Base | |
has_many :order_items | |
validates_length_of :order_items, :minimum => 1, :message => :empty | |
accepts_nested_attributes_for :order_items | |
end | |
#en.yml | |
activerecord: |
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
module ApplicationHelper | |
ActionView::Base.default_form_builder = CustomFormBuilder | |
end |
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 http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<meta http-equiv="content-style-type" content="text/css"/> | |
<meta http-equiv="content-script-type" content="text/javascript"/> | |
<meta content="authenticity_token" name="csrf-param" /> | |
<meta content="fepbL0PIBAyt/d7sYzW+muOhGse/+bvoF1QPXRAjIFY=" name="csrf-token" /> | |
OlderNewer