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 'spec_helper' | |
describe ItemFaq do | |
pending "add some examples to (or delete) #{__FILE__}" | |
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
class Video < ActiveRecord::Base | |
attr_accessible :credits, :image, :link, :title, :video_category_id, :homepage, :client | |
belongs_to :video_category | |
before_validation :update_attributes_through_api | |
mount_uploader :image, ImageUploader | |
acts_as_list | |
def vimeo_url | |
return "http://vimeo.com/api/v2/video/#{self.link}.json" | |
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
Ieri sono stato chiamato dal sysadmin del nostro server web (dove ospitiamo i siti dei nostri clienti) il quale mi ha detto che lo spazio sul nostro server e la relativa banda e è andata sotto il limite disponibile. | |
Vi starete chiedendo cosa implica tutto cio' , bene , provate ad accedere ad un qualsiasi sito di un nostro clliente, per esempio: | |
http://www.mmagnetto.com/ , oppure http://www.trabaldotogna.com/ oppure ancora http://www.awaredesign.eu/. | |
come potete notare.....NON VANNO!!! | |
volete sapere il motivo? |
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
module Mmplus | |
module Resolvers | |
module Admin | |
class AdminResolver < ::ActionView::FileSystemResolver | |
def initialize | |
super("app/views") | |
end | |
def find_templates(name, prefix, partial, details) | |
super(name, "admin/shared", partial, details) |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.4' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem "rake", "0.8.7" | |
gem 'devise' | |
gem 'sunspot_rails', :git => 'https://github.com/sunspot/sunspot.git' |
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 DataManipulation | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
ALLOWED_MODELS = [:products, :stores] | |
attr_accessor :file, :model_name | |
def initialize(options = {}) | |
self.file = options[:file] | |
self.model_name = options[:model_name].try(:singularize) |
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
Id_libro Arg_catalogo Autore Titolo Sottotitolo Luogo_stampa Editore Anno_stampa Prezzo_itl Prezzo_eur Note_biblio Soggetto Materia Num_catalogo Varie_1 Varie_2 Varie_3 Varie_4 | |
37 888366003X A cura di Maria Adelaide Bartoli Bacherini e Raffaello Monterosso Vincenzo Bellini "in questa graziosa capitale della Toscana", Catalogo della Mostra bibliografico-documentaria (Firenza, Biblioteca Nazionale Centrale, 19 dicembre 2001 - 19 gennaio 2002). Fondazione Monteverdi 2001 32,00 Un volume di pp. 104. Monografie e studi critici | |
19 9788886288002 Sacre rappresentazioni nel manoscritto 201 della Biblioteca Municipale di OrlÈans. Fondazione Monteverdi 1958 48,00 Edizione fototipica. Testi e musiche trascritti e commentati da Giampiero Tintori. Volume di cm. 25x35, pp. 88 di introduzione e commento, 104 di musica trascritta e facsimili. In brochure. Altre edizioni monumentali | |
20 9788886288019 La Fida Ninfa. Dramma per musica in tre atti di Scipione Maffei. Musica di Antonio Vivaldi. Edizione di |
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 Controller < ApplicationController | |
@items = Sunspot.search(ModelName) do | |
fulltext params[:q], :fields => ["description_#{I18n.locale}".to_sym, :author] | |
end | |
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
Marcos-MacBook-Pro:~ marcocrepaldi$ ps aux | |
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND | |
marcocrepaldi 25226 0.0 2.7 2557336 114636 s004 S+ 3:11PM 0:14.09 ruby path/to/rake watcher:start |
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 PagesController < ApplicationController | |
require 'nokogiri' # or wathever parses the responses | |
def home | |
@blog_responses = make_requests ["http://url_to_first.blog", "http://url_to_second.blog"] | |
end | |
protected | |
def make_requests(urls = []) |
NewerOlder