|
|\_ 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 <[email protected]> | |
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
# 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
127.0.0.1:6379> ZADD class1:math 98 Tithi 50 Raju 80 Andrew # Create a new class 1 math score SET. | |
(integer) 3 # Add three members with their respective scores | |
127.0.0.1:6379> ZRANGEBYSCORE class1:math 0 10 # Fetch students scored between 0 to 10. No Student scored between 0 to 10 | |
(empty list or set) | |
127.0.0.1:6379> ZRANGEBYSCORE class1:math 0 60 # Fetch students scored between 0 to 60. Raju | |
1) "Raju" | |
127.0.0.1:6379> ZRANGEBYSCORE class1:math 0 60 WITHSCORES # Fetch students with scores who scored between 0 to 60. Raju | |
1) "Raju" | |
2) "50" | |
127.0.0.1:6379> ZRANGE class1:math 0 10 WITHSCORES # Fetch students from ZSET class1:math with position 0 to 10. |
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
127.0.0.1:6379> HSET my_hash key1 1 # Initializes a HASH my_hash with key-value key1: 1 | |
(integer) 1 | |
127.0.0.1:6379> HSET my_hash key2 value2 # Sets another key-value pair key2: value2 in my_hash | |
(integer) 1 | |
127.0.0.1:6379> HGET my_hash key1 # GET the data for key1 in my_hash | |
"1" | |
127.0.0.1:6379> HGET my_hash key2 # GET the data for key2 in my_hash | |
"value2" | |
127.0.0.1:6379> HGETALL my_hash # GET the complete data in my_hash | |
1) "key1" |
NewerOlder