- ReactJS
- jQuery
- Volt Framework
- Docker
# secret_key_base must be same for both applications | |
development: | |
secret_key_base: c85ef952bfeb14117a3d55c249fa5e582e5c6327fa56f227e6dbb88b4be780ba2aef9e20f58c3f65e0faf282a49a802aefa29d2aae3e36d1a4ffc7e625a644d5 | |
test: | |
secret_key_base: 29f526a44fdd6f5596da9cb46ee4823da7ffaf9893a7c8e34f126dd9865bdaf0d65cb04381faf7d56544a86e688d1aa7704ceb23a65560585cca266946b877c2 | |
production: | |
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> |
# Use a different cache store in production. | |
# Configure this in both applications | |
elasticache = Dalli::ElastiCache.new('amit.patel.cfg.usw2.cache.amazonaws.com:11211') | |
config.cache_store = :dalli_store, elasticache.servers |
<!-- Accessed via http://first.example.com --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<iframe src="//second.example.com/path/to/resource" width="100%" height="100%"></iframe> | |
</body> | |
</html> |
{ | |
"post_id": "11468", | |
"post_title": "Post with short sommary", | |
"post_date": { | |
"year": 2016, | |
"month": 4, | |
"day": 29, | |
"hour": 9, | |
"min": 20, | |
"sec": 12 |
#asumpution - Hash contains all keys as symbols | |
hash = {:post_id=>"11468", | |
:post_title=>"Post with short sommary", | |
:post_date=>{:year=>2016, :month=>4, :day=>29, :hour=>9, :min=>20, :sec=>12}} | |
#1. deep_stringify_keys! - Destructively convert all keys to strings. This includes the keys from the root hash and from all nested hashes and arrays. | |
hash.deep_stringify_keys! | |
#2. Write to file | |
file = 'path/to/output/file.txt' |
def paginated(resources, per_page = 10) | |
resources.page(params[:page]).per(per_paget) | |
end |
development: | |
adapter: mysql2 | |
encoding: utf8 | |
pool: 10 | |
min_messages: warning | |
timeout: 5000 | |
database: myapp_development | |
username: root | |
password: root | |
socket: /var/run/mysqld/mysqld.sock |
class CreateContentUnits < ActiveRecord::Migration | |
def change | |
create_table :content_units, primary_key: :guoid do |t| | |
t.boolean :active, default: false | |
end | |
end | |
end |
CREATE TABLE `content_units` ( | |
`guoid` int(11) NOT NULL AUTO_INCREMENT, | |
`active` tinyint(1) DEFAULT '0', | |
PRIMARY KEY (`guoid`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |