Send email asynchroniously using Sidekiq.
Create your mailer us usual:
# Phoenix | |
if grep -q '^ "phoenix"' mix.lock; then | |
source $HOME/.asdf/asdf.sh | |
source $HOME/.asdf/completions/asdf.bash | |
export $(cat $RELEASE_DIR/../../.rbenv-vars | xargs) | |
echo ' | |
-----> Detected Phoenix app.' | |
mix local.rebar --force | |
mix local.hex --force |
# In Haskell, you write a function like this: | |
# f :: a -> b | |
# which reads as "f is a function from type a to b" | |
# | |
# Function composition allows you to chain functions together, | |
# building more powerful and complex composite functions from | |
# simpler component functions. | |
# | |
# OOP does not have a similar mechanism. Composition in OOP seems | |
# to mostly be limited to aggregation and delegation, neither of |
#Install WDI_MELB style
##Stage 1 - Ruby Version Manager
go to rvm.io copy and paste the two commands
command no. 1
require 'minitest/autorun' | |
require 'minitest/reporters' # optional | |
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new() # optional | |
require_relative './allergies' | |
class AllergiesTest < MiniTest::Test |
###PT PLANNER ####Melbourne Public Transport Journey Planner
There are 3 train lines:
The Alamein line has the following stops: Flinders Street, Richmond, East Richmond, Burnley, Hawthorn, and Glenferrie.
The Glen Waverly line has the following stops: Flagstaff, Melbourne Central, Parliament, Richmond, Kooyong and Tooronga.
The Sandringham line has the following stops: Southern Cross, Richmond, South Yarra, Prahran, and Windsor.
# Add poltergeist gem to Gemfile, in :test group, | |
# then run `bundle` to install | |
group :test do | |
... | |
gem 'poltergeist' | |
... | |
end |
In the game of chess, a queen can attack pieces which are on the same row, column, or diagonal.
A chessboard can be represented by an 8 by 8 array.
Write a program that positions two queens on a chess board and indicates whether or not they are positioned so that they can attack each other.
The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.