Skip to content

Instantly share code, notes, and snippets.

lks128 / 01_paperclip.rb
Created Dec 25, 2012
Paperclip Rails initializer to store data on the European S3 server using Fog.
View 01_paperclip.rb
# config/initializers/01_paperclip.rb
if Rails.env.production?
storage: :fog,
fog_directory: 'lazy-enterprise',
fog_host: '',
fog_public: true,
fog_credentials: {
provider: 'AWS',
View enum.cs
// Получение значения Enum по строковому имени
EnumType dp = EnumType.None;
if(Enum.IsDefined(typeof(EnumType), enumElementName))
dp = (EnumType)Enum.Parse(typeof(EnumType), enumElementName);
Console.WriteLine("Sorry, no element exists!");