Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
query = from workout in Workout, | |
where: workout.id == ^id, | |
left_join: group in assoc(workout, :workout_set_groups), | |
left_join: set in assoc(group, :workout_sets), | |
join: excercise in assoc(group, :excercise), | |
preload: [workout_set_groups: {group, excercise: excercise, workout_sets: set}] |
# define a record, first attribute is considered the key | |
defrecord User, email: "", first: "", last: "" | |
# encapsulates mnesia calls | |
defmodule Database do | |
def create_schema do | |
create_table User | |
end | |
def find(record, id) do |