Skip to content

Instantly share code, notes, and snippets.

@basiszwo
basiszwo / server.md
Created October 6, 2013 11:29
Server Setup
@basiszwo
basiszwo / rails-and-mssql.md
Created September 4, 2013 09:51
Rails and MSSQL Server

Rails and MSSQL

Install freeTDS (http://freetds.schemamania.org/)

brew install freetds for OSX Checkout what's required for Ubuntu.

Install tiny_tds for using freetds on

Check working connection

@basiszwo
basiszwo / carrierwave-upload-partitioning.rb
Created August 29, 2013 10:07
Carrierwave upload directory partitioning
# thanks to @rainchen
class BaseUploader < CarrierWave::Uploader::Base
storage :file
after :remove, :delete_empty_upstream_dirs
# e.g.: "uploads/venue/photo/000/000/003/thumb_Limoni_-_overall-resized-1.jpg"
def store_dir
"#{base_store_dir}/#{model_id_partition}"
end
@basiszwo
basiszwo / nginx-installation.md
Created August 27, 2013 13:10
Nginx / unicorn setup / configuration

Installation assuming Ubuntu

apt-get install nginx

Nginx Configuration

  • see nginx config file below
  • see nginx upstart config below

Unicorn config

@basiszwo
basiszwo / spree-commerce.md
Created August 19, 2013 22:11
Spree Commerce Resources