Skip to content

Instantly share code, notes, and snippets.

@francesco-carrella
francesco-carrella / custom_searcher.rb
Last active August 29, 2015 14:26 — forked from killthekitten/custom_searcher.rb
Dumb way to filter products by multiple properties in Spree.
class CustomSearch < Spree::Core::Search::Base
protected
def add_search_scopes(base_scope)
statement = nil
search.each do |property_name, property_values|
property = Spree::Property.find_by_name(property_name.gsub("_any", ""))
next unless property
substatement = product_property[:property_id].eq(property.id).and(product_property[:value].eq(property_values.first))
@francesco-carrella
francesco-carrella / gist:9916979
Created April 1, 2014 15:51
Ubuntu - Fix splash screen with proprietary drivers
This is soultion how to fix no splash screen in Ubuntu after nvidia proprietary driver installation. It's no matter what Ubuntu version you use, it should work anyway.
Open your terminal and type
sudo apt-get install v86d
Then
sudo gedit /etc/default/grub
Find this line
@francesco-carrella
francesco-carrella / gist:9900750
Created March 31, 2014 19:51
Ubuntu - Change Apt source from ES to generic
sudo sed -i 's/es.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list