Below outlines what is setup with my average rails app
- Digital Ocean/AWS Server/Heroku
- AWS S3
- Heroku Postgres
- Skylight
| $ redis-cli | |
| > config set stop-writes-on-bgsave-error no | 
Copy this gist and customise it to your liking.
| using System; | |
| using MonoTouch.UIKit; | |
| namespace System | |
| { | |
| public static class ExtensionMethods | |
| { | |
| public static UIColor ToUIColor(this string hexString) | |
| { | |
| hexString = hexString.Replace("#", ""); | 
| // | |
| // Countdown.cs | |
| // Created by Alexey Kinev on 11 Jan 2015. | |
| // | |
| // Licensed under The MIT License (MIT) | |
| // http://opensource.org/licenses/MIT | |
| // | |
| // Copyright (c) 2015 Alexey Kinev <[email protected]> | |
| // | |
| using System; | 
| CarrierWave.configure do |config| | |
| if Rails.env.test? || Rails.env.cucumber? | |
| config.storage = :file | |
| config.enable_processing = false | |
| else | |
| config.asset_host = Rails.application.secrets.asset_host | |
| config.fog_provider = 'fog/openstack' | |
| config.fog_credentials = { | |
| provider: 'OpenStack', | |
| openstack_auth_url: 'https://api.selcdn.ru/v3', | 
| public class MyDbContext : DbContext | |
| { | |
| private ITenantIdLocator tenantIdLocator; | |
| public MyDbContext(ITenantIdLocator tenantIdLocator) | |
| { | |
| if (tenantIdLocator == null) throw new ArgumentNullException(nameof(tenantIdLocator)); | |
| this.tenantId = tenantIdLocator.GetTenantId(); | |
| } | |