Skip to content

Instantly share code, notes, and snippets.

# Don't use more memory than the specified amount of bytes.
# When the memory limit is reached Redis will try to remove keys with an
# EXPIRE set. It will try to start freeing keys that are going to expire
# in little time and preserve keys with a longer time to live.
# Redis will also try to remove objects from free lists if possible.
#
# If all this fails, Redis will start to reply with errors to commands
# that will use more memory, like SET, LPUSH, and so on, and will continue
# to reply to most read-only commands like GET.
#
actionmailer (2.3.8, 2.3.5, 2.2.2, 1.3.6)
actionpack (2.3.8, 2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.8, 2.3.5, 2.2.2, 1.15.6)
activeresource (2.3.8, 2.3.5, 2.2.2)
activesupport (2.3.8, 2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
addressable (2.2.2)
arel (1.0.1)
aws-s3 (0.6.2)
12:13 -!- waratuman [~waratuman@c-67-188-210-59.hsd1.ca.comcast.net] has joined #gdal
12:13 -!- Topic for #gdal: http://www.gdal.org | svn http://svn.osgeo.org/gdal | trac http://trac.osgeo.org/gdal | Logs at: http://logs.qgis.org/gdal/ | buildbot http://buildbot.osgeo.org:8500/waterfall | Don't ask to ask, just ask
12:13 -!- Topic set by jmckenna [] [Mon Jan 26 11:15:25 2009]
12:13 [Users #gdal]
12:13 [ bitnerd ] [ EvenR ] [ jlivni ] [ ortelius ] [ szekerest]
12:13 [ cathode ] [ frankie ] [ jonafan ] [ philv ] [ ValiSystM]
12:13 [ cgs_bob_ ] [ FrankW ] [ kalxas ] [ phurl ] [ waratuman]
12:13 [ CIA-27 ] [ hobu ] [ lucasd ] [ pnorman ] [ weta ]
12:13 [ crschmidt] [ HyperJohnGraham] [ mlechner] [ racicot ] [ winkey ]
12:13 [ djay ] [ iacovlev_pavel ] [ mloskot ] [ Schuyler ] [ winkey_ ]
Counting objects: 15, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 764 bytes, done.
Total 8 (delta 7), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
Compiled slug size is 43.8MB
-----> Launching....................................................................................... failed (Heroku error)
uri = URI.parse(ENV["REDISTOGO_URL"])
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
############################ SNAPSHOTTING ############################
dir /local/disk/
rdbcompression yes
dbfilename dump.rdb
########################## APPEND ONLY MODE ###########################
appendonly yes
appendfilename /my/ebs/appendonly.aof
appendfsync everysec
class Anuncioi < ActiveRecord::Base
belongs_to :anuncio
has_attached_file :img, :storage => :s3,
:s3_credentials=>"#{RAILS_ROOT}/config/amazon_s3.yml",
:styles => { :sm => "70x50#",:bi => "470x285#" },
:path => "/anuncio/:id/:style.:extension",
:default_url => "/images/padrao/anuncio/:style.jpg"
validates_attachment_content_type :img,
RestClient.put "https://api.heroku.com/apps/production/ps/import", "qty=%2B2", "Accept-encoding"=>"gzip, deflate", "Content-Type"=>"application/x-www-form-urlencoded", "Content-Length"=>"8", "User-agent"=>"heroku-gem/1.8.2", "X-heroku-api-version"=>"2", "Accept"=>"*/*; q=0.5, application/xml"
# => 422 ClientError | application/xml 1 bytes
RestClient.put "https://api.heroku.com/apps/production/ps/import", "qty=%2B2", "Accept-encoding"=>"gzip, deflate", "Content-Type"=>"application/x-www-form-urlencoded", "Content-Length"=>"8", "User-agent"=>"heroku-gem/1.8.2", "X-heroku-api-version"=>"2", "Accept"=>"*/*; q=0.5, application/xml"
# => 422 ClientError | application/xml 1 bytes
# encoding: utf-8
module Mongoid #:nodoc:
module Extensions #:nodoc:
module Time #:nodoc:
module Conversions #:nodoc:
def set(value)
return nil if value.blank?
time = convertable?(value) ? value.to_time : ::Time.parse(value.to_s)
# Convert time to milliseconds since BSON stores dates with that accurracy, but Ruby uses microseconds
::Time.at(time.to_i, (time.usec/1000.0).round).utc if time