save_and_open_page
have_button(locator)
<?php | |
class CustomTextExtension extends Extension { | |
public function Paragraph($count){ | |
$doc = new SS_HTMLValue($this->owner->value); | |
$content = $doc->getElementsByTagName('p'); | |
$current = 0; | |
foreach($content as $p){ | |
++$current; |
<?php | |
Object::add_extension('Text', 'CustomTextExtension'); |
<div class="row"> | |
<div class="span6 frame-content"> | |
<p class="pull-left">$Content.Paragraph(1)</p> | |
</div> | |
<div class="span6 frame-content"> | |
<p>$Content.Paragraph(2)</p> | |
</div> | |
</div> |
class BabysitterProfile < ActiveRecord::Base | |
belongs_to :user | |
has_many :references, :as => :referenceable | |
end |
<div id="reference-form"> | |
<%= form_for @reference, :remote => true do |f| %> | |
<div> | |
<%= f.text_field :name, :title => "Reference Name", :class => "reference-field" %> | |
<%= f.text_field :phone_number, :title => "Phone Number", :class => "reference-field" %> | |
<%= f.text_field :email, :title => "Email", :class => "reference-field" %> | |
<%= f.select :relationship, | |
"<option value='fr'>Friend</option> | |
<option value='cw'>Co-Worker</option> | |
<option value='fa'>Family</option>".html_safe, |
$ chmod +x ./proxy_list_fetcher.rb | |
$ ./proxy_list_fetcher.rb | head | |
180.94.88.58 8080 Afghanistan fast HTTPS High +KA | |
187.87.155.2 8080 Brazil fast HTTPS High +KA | |
120.132.132.119 8080 China medium HTTPS High +KA | |
210.211.109.244 8081 Viet Nam fast HTTP Low | |
216.244.71.143 3128 United States medium HTTPS High +KA | |
190.237.224.22 8080 Peru slow HTTPS High +KA |
Started GET "/dashboard" for 127.0.0.1 at 2013-01-20 04:34:10 +0800 | |
Processing by HomeController#dashboard as HTML | |
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 999 LIMIT 1 | |
*********redirect if necessary**************** | |
********2************** | |
SeekerPreference Load (0.2ms) SELECT `seeker_preferences`.* FROM `seeker_preferences` WHERE `seeker_preferences`.`user_id` = 999 LIMIT 1 | |
%%%%%%%[email protected]%%%%%%%%%%%%%%shittrue | |
******in care seeker****true** [email protected]* | |
%%%%%%%[email protected]%%%%%%%%%%%%%%shittrue | |
################################################ |
Composer: | |
cd /path/to/my/project | |
curl -s http://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/bin/composer | |
composer install | |
php.ini | |
default_unicode = false | |
PEAR |
def show | |
@order = Order.find(params[:id]) | |
respond_to do |format| | |
format.html | |
format.pdf do | |
pdf = Prawn::Document.new | |
pdf.text "Hello World" | |
send_date pdf.render | |
end | |
end |