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
# Logfile created on Tue Oct 26 21:16:39 -0200 2010* Loaded locales: ["brca", "da", "de", "el", "en", "eo", "es", "es-419", "fr", "gl", "ia", "id", "it", "ja", "ko", "mk", "nl", "pt-BR", "pt-PT", "ru", "te"] | |
admin['$cmd'].find({:ismaster=>1}, {}).limit(-1) | |
shapado-development['$cmd'].find({"$eval"=>"db.system.js.save({_id: 'find_tags', value: function find_tags(collection, regex, query, limit) {\n var counts = db.eval(\n function(collection, regex, query){\n var counts = {};\n db[collection].find(query, {\"tags\":1}).limit(500).forEach(\n function(p){\n if ( p.tags ){\n for ( var i=0; i<p.tags.length; i++ ){\n var name = p.tags[i];\n if(name.match(regex) != null)\n counts[name] = 1 + ( counts[name] || 0 );\n }\n }\n }\n );\n return counts;\n },\n collection,\n regex,\n query\n );\n\n var tags = [];\n for ( var tag in counts ){\n tags.push( { name : tag , count : counts[tag] |
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 ActionLogger | |
@@queue = [] | |
@@limit = (Rails.env == 'development' ? 0 : 100 ) | |
def self.add(str) | |
@@queue.push(str) | |
store! if @@queue.size >= @@limit | |
end | |
def self.store! |
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 ApplicationController < ActionController::Base | |
protect_from_forgery | |
after_filter :log_action_taken | |
def current_user | |
@current_user ||= UserSession.find.try :user | |
end | |
# ====== > Should be a plugin along with action_logger.rb |
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 Game::Champ < ActiveRecord::Base | |
belongs_to :user | |
# I want here, to have a has many Game::Item using a table for that. | |
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
rake routes | |
(in /home/fps/workspace3/peded) | |
admin_pay_methods GET /admin/pay_methods(.:format) {:action=>"index", :controller=>"admin/pay_methods"} | |
POST /admin/pay_methods(.:format) {:action=>"create", :controller=>"admin/pay_methods"} | |
new_admin_pay_method GET /admin/pay_methods/new(.:format) {:action=>"new", :controller=>"admin/pay_methods"} | |
edit_admin_pay_method GET /admin/pay_methods/:id/edit(.:format) {:action=>"edit", :controller=>"admin/pay_methods"} | |
admin_pay_method GET /admin/pay_methods/:id(.:format) {:action=>"show", :controller=>"admin/pay_methods"} | |
PUT /admin/pay_methods/:id(.:format) {:action=>"update", :controller=>"admin/pay_methods"} | |
DELETE /admin/ |
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 Admin::Bulky | |
CADASTRADO = "CADASTRADO" | |
INVALIDO = "INVALIDO" | |
# requires w: a workingsheet from the GoogleSpreadsheet lib | |
def self.import_restaurants( w ) | |
# The headers I expect to be there, in String | |
fields = ['nome', 'tipo', 'telefone', 'endereço', 'cep', 'funcionamento', 'status'] |
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 Admin::BulkiesController < ApplicationController | |
#layout 'admin' | |
#before_filter :admin_area | |
def index | |
return redirect_to '/admin/bulkies/auto/add_stores' | |
end | |
# Here the user gets a list of his spreadsheets from his GoogleDocs, if auth | |
def add_stores |
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
require "irb/completion" # activate default completion | |
require 'irb/ext/save-history' # activate default history | |
require 'pp' | |
# save history using built-in options | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
puts "History configured." |
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
# Critical default settings: | |
disable_system_gems | |
disable_rubygems | |
bundle_path '.gems/bundler_gems' | |
# List gems to bundle here: | |
gem 'rails_dm_datastore' | |
gem 'rails', "2.3.5" | |
# Needed for Devise-Plugin |
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
Template Padrão | |
Tamiris Cristina 10:08:20Olá soro, em que posso ajudar? | |
soro 10:08:53olá, estou com um problema quanto a um boleto de renovação que recebi | |
Tamiris Cristina 10:09:32Bom dia me informa por favor o código de cliente | |
soro 10:09:45login: soro, meu código de cliente é xxx | |
Tamiris Cristina 10:11:22sobre a renovação do domínio jaeh.net? | |
soro 10:11:48 sim | |
soro 10:12:03 estou sendo lezado em 2 meses | |
soro 10:12:27no painel está que expira em [Expira em : 30/06/2011], e tenho um email confirmando isso | |
Tamiris Cristina 10:12:33não entendi |
OlderNewer