Skip to content
View ruby_cryptology.rb
CIPHER = { 'a' => 'n', 'b' => 'o', 'c' => 'p', 'd' => 'q',
'e' => 'r', 'f' => 's', 'g' => 't', 'h' => 'u',
'i' => 'v', 'j' => 'w', 'k' => 'x', 'l' => 'y',
'm' => 'z', 'n' => 'a', 'o' => 'b', 'p' => 'c',
'q' => 'd', 'r' => 'e', 's' => 'f', 't' => 'g',
'u' => 'h', 'v' => 'i', 'w' => 'j', 'x' => 'k',
'y' => 'l', 'z' => 'm' }.freeze
REVERSE_CIPHER = CIPHER.invert.freeze
View assets.rb
# config/initializers/assets.rb
# ...
# The last two are for the file browser
Rails.application.config.assets.precompile += %w(ckeditor/config ckeditor/application ckeditor/filebrowser/*)
View helpers.rb
# spec/support/helpers.rb
require 'support/helpers/i18n_helpers'
# ...
RSpec.configure do |config|
config.include Features::I18nHelpers, type: :feature
# ...
end
View Chewy_price_filter.rb
# Assumes gems: Chewy, Money and eu_central_bank
class SearchForm
include ActiveModel::Model
DEFAULTS = { 'currency' => 'TRY' }
attr_accessor :price_min, :price_max, :currency
# ...
View digitize_benchmark.rb
require 'benchmark/ips'
def digits_s(n)
n.to_s.chars.map(&:to_i)
end
# http://stackoverflow.com/a/12909952/372654
def digits_divmod(n)
n = n.abs
[].tap do |result|
View Amazon Elastic Beanstalk Rails.md

Last Status

  • 2015-11-10: Abandoned AWS EB.

    Got Create environment operation is complete, but with errors. For more information, see troubleshooting documentation..

    Tried to set up CloudWatch Logs but got The following resource(s) failed to create: [AWSEBCWLHttp4xxMetricFilter, AWSEBCWLHttp5xxMetricFilter].

View migrations.rb
class CreateTables < ActiveRecord::Migration
def change
create_table :products do |t|
# ...
end
create_table :orders do |t|
# ...
end
create_table :order_items do |t|
t.references :order, index: true, foreign_key: true
View Comodo Essential SSL CA Bundle.md

Concatenate the files in the following order:

Root CA Certificate - AddTrustExternalCARoot.crt
Intermediate CA Certificate - COMODORSAAddTrustCA.crt
Intermediate CA Certificate - COMODORSADomainValidationSecureServerCA.crt
Your EssentialSSL Certificate - www_example_com.crt *

(*) Exclude the real certificate "www_example_com.crt" if CA bundle is entered separately.

View Paperclip_S3_IAM_user_per_bucket_region.md

Amazon

I'm assuming you have already created an Amazon AWS account and an S3 bucket.

  1. Open the [IAM console][1]

  2. Create a group:

    • Groups
    • Create New Group
    • (Enter a name, e.g. user_per_bucket) Next Step
Something went wrong with that request. Please try again.