| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
| #!/usr/bin/env python | |
| import tweepy | |
| from BeautifulSoup import BeautifulSoup as parser | |
| import urllib | |
| import sys | |
| import argparse | |
| import ConfigParser |
| description "nginx http daemon" | |
| author "Philipp Klose" | |
| start on (filesystem and net-device-up IFACE=lo) | |
| stop on runlevel [!2345] | |
| env DAEMON=/opt/nginx/sbin/nginx | |
| env PID=/opt/nginx/logs/nginx.pid | |
| expect fork |
| $ rspec --format MacVimFormatter --color spec |
Changes:
-
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
-
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.
| <%= f.input :nome, :collection => get_schools_name, :include_blank => false, :input_html => {:rel => 'autocomplete', :data_default => @school.nome} %> |
Patch for ruby 1.9.3-p327 is here: https://gist.github.com/4063779
This script installs a patched version of ruby 1.9.3-p286 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Many thanks to funny-falcon for the performance patches.
| class AnonymousUser < User | |
| attr_accessible *ACCESSIBLE_ATTRS, :type, :token, as: :registrant | |
| def register(params) | |
| params = params.merge(type: 'User', token: nil) | |
| self.update_attributes(params, as: :registrant) | |
| end | |
| end |
| set :path_to_repo, "/path_to_repo/" | |
| set :running_app_user, "appusername" | |
| namespace :webscale do | |
| desc "Cache a signed out version of the path. Usage: cap webscale:signed_out_cache_page -s path_to_cache=/films/on_netflix" | |
| task :signed_out_cache, roles: :app do | |
| cache_base_path = "#{path_to_repo}/public/signed_out" | |
| cached_destination_path = "#{cache_base_path}#{path_to_cache}.html" | |
| working_path = "#{cached_destination_path}.tmp" |
| # Copyright © 2010-2011 Tech-Angels. All Rights Reserved. | |
| # CollectorTransaction will be created each time the Collector needs | |
| # to trace an activity. | |
| # | |
| # Attributes: | |
| # * id [integer, primary, not null] - primary key | |
| # * before_tr [binary] - associated model serialized before transaction | |
| # * created_at [datetime] - creation time | |
| # * model_id [integer] - belongs_to Model (polymorphic) |