Skip to content

Instantly share code, notes, and snippets.

View caironoleto's full-sized avatar
🎯
Focusing

Cairo Noleto caironoleto

🎯
Focusing
View GitHub Profile
abstract (1.0.0)
actionmailer (2.3.2, 2.2.2, 2.1.0)
actionpack (2.3.2, 2.2.2, 2.1.0)
activerecord (2.3.2, 2.2.2, 2.1.0)
activeresource (2.3.2, 2.2.2, 2.1.0)
activesupport (2.3.2, 2.2.2, 2.1.0)
addressable (2.0.1)
authlogic (2.0.5, 1.4.3)
builder (2.1.2)
capistrano (2.5.3, 2.5.0, 2.4.3)
module Imoby
class FormBuilder < ActionView::Helpers::FormBuilder
(field_helpers - %w(label check_box radio_button fields_for form_for hidden_field radio_sym select_sym)).each do |selector|
src = <<-end_src
def #{selector}(method, options = {})
make_default_template method,
@template.send(#{selector.inspect}, @object_name, method, objectify_options(options))
end
end_src
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/cairo/Workspace/freakauth/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/cairo/Workspace/freakauth/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<?php
function stylesheet_link_tag($source, $media = 'screen')
{
if (strpos($source, '.css'))
return '<link href="' .base_url() .'/public/stylesheets/' .$source .'" media="' .$media .'" rel="stylesheet" type="text/css" />';
return '<link href="' .base_url() .'/public/stylesheets/' .$source .'.css" media="' .$media .'" rel="stylesheet" type="text/css" />';
}
function javascript_include_tag($source) {
#Usage with CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
'User remembers me until one week' FAILED
expected: Sat, 29 Nov 2008 17:22:51 UTC +00:00,
got: Sat, 29 Nov 2008 17:22:51 UTC +00:00 (using ==)
spec/models/user_spec.rb:225:
spec/models/user_spec.rb:8:
cairo@lt:~/Workspace/cake/test$ phpunit --testdox AllTests.php
PHPUnit 3.3.2 by Sebastian Bergmann.
Generate
[x] Create a welcome controller
[x] If content of welcome controller is welcome class
[x] Create a user controller
[x] Create a user controller and index view
[x] If content of user controller is user class
[x] If create a index method in welcome controller
<html>
<head>
<title>Welcome to CodeIgniter</title>
<style type="text/css">
body {
background-color: #fff;
margin: 40px;
font-family: Lucida Grande, Verdana, Sans-serif;
font-size: 14px;
color: #4F5155;
class SkatingContest
def o_vencedor; @o_vencedor; end
def o_vencedor=( nome )
unless nome.respond_to? :to_str
raise ArgumentError, "O nome do vencedor deve ser uma String,
não um prooblema matemático ou uma lista de nomes ou qualquer ou
coisa parecida."
end
@o_vencedor = nome
end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Titulo </title>
</head>