|
|\_ app
|...
|\_ docker
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rails:4.2.3 | |
MAINTAINER Renato Filho <renatosousafilho@gmail.com> | |
ENV HOME /home/app | |
ENV RAILS_ENV development | |
RUN useradd -m -s /bin/bash app | |
RUN gem install -N bundler |
Credit: Based on asukakenji
Modified: To check for all version of Go in go[0-9].[0-9][0-9].[0-9] pattern
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io
, fmt
) are included.
Interfaces that have significant importance are also included.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Streaming processing services: | |
1. https://medium.com/@chandanbaranwal/spark-streaming-vs-flink-vs-storm-vs-kafka-streams-vs-samza-choose-your-stream-processing-91ea3f04675b | |
Consistent Hashing: | |
Article - https://medium.com/@sent0hil/consistent-hashing-a-guide-go-implementation-fe3421ac3e8f | |
Golang - https://github.com/indyarocks/consistent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## /config/initializers/dynamodb_client.rb | |
module DynamodbClient | |
def self.initialize! | |
client_config = if Rails.env.development? | |
{ | |
region: 'us-west-2', | |
endpoint: 'http://localhost:8000' | |
} | |
else | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# have_attr_reader matcher for attr_reader | |
RSpec::Matchers.define :have_attr_reader do |field| | |
match do |object_instance| | |
object_instance.respond_to?(field) | |
end | |
failure_message do |object_instance| | |
"expected attr_reader for #{field} on #{object_instance}" | |
end |
- Change your database RDS instance security group to allow your machine to access it.
- Add your ip to the security group to acces the instance via Postgres.
- Make a copy of the database using pg_dump
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
- you will be asked for postgressql password.
- a dump file(.sql) will be created
- Restore that dump file to your local database.
- but you might need to drop the database and create it first
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
- the database is restored
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/tasks/dynamodb_tables_v1/create_activity_table.rake | |
# Rake task to create activities table | |
namespace :dynamodb_tables_v1 do | |
desc "bundle exec rake dynamodb_tables_v1:create_activity_table RAILS_ENV=<ENV>" | |
task :create_activity_table => :environment do | |
puts "Creating activities table in #{Rails.env}\n" | |
create_activity_table | |
puts "Completed task\n" | |
end |
NewerOlder