Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
cc8ac57
mirrored a row
StephenGrider Oct 19, 2016
1be1f44
added custom map
StephenGrider Oct 19, 2016
cd05957
finish creating grid
StephenGrider Oct 19, 2016
a058019
finished grid building
StephenGrider Oct 19, 2016
1d76537
calculated points
StephenGrider Oct 19, 2016
40bf858
save image
StephenGrider Oct 21, 2016
888fab3
generated project
StephenGrider Oct 21, 2016
77c4fef
configured database
StephenGrider Oct 21, 2016
b4aca9d
added material css
StephenGrider Oct 22, 2016
d07d22f
added topics migration
StephenGrider Oct 24, 2016
6df926e
added new route
StephenGrider Oct 24, 2016
7ea0383
added topic controller
StephenGrider Oct 24, 2016
4b8fa1a
receive conn argument
StephenGrider Oct 24, 2016
ad606ce
delete log
StephenGrider Oct 24, 2016
d988f01
added topic
StephenGrider Oct 24, 2016
b1e3e08
added changeset
StephenGrider Oct 24, 2016
c3d141c
made changeset
StephenGrider Oct 24, 2016
dcfc80f
added form tag
StephenGrider Oct 24, 2016
79d2a1a
added form tags
StephenGrider Oct 24, 2016
e0a231e
added create henadler
StephenGrider Oct 24, 2016
e8c4936
handle warning
StephenGrider Oct 24, 2016
de2d707
insert new topic
StephenGrider Oct 24, 2016
61a68b8
handled fail to insert topic
StephenGrider Oct 24, 2016
4ef702c
added in css
StephenGrider Oct 24, 2016
6697c10
added new route
StephenGrider Oct 24, 2016
cca353e
added query for all topics
StephenGrider Oct 24, 2016
3c3b642
render list of topics
StephenGrider Oct 25, 2016
4e74f34
redirect from topic create to topic index
StephenGrider Oct 25, 2016
876309a
added link tag to topic index
StephenGrider Oct 25, 2016
673c355
added edit route
StephenGrider Oct 25, 2016
df6ca1e
added edit form
StephenGrider Oct 25, 2016
299f99e
added update route
StephenGrider Oct 25, 2016
fcb9d21
topics can be edited
StephenGrider Oct 25, 2016
625aa60
added link tag
StephenGrider Oct 25, 2016
406b3fe
changed router to use resources
StephenGrider Oct 25, 2016
c7782cb
added delete handler
StephenGrider Oct 25, 2016
f3b75ae
finish topiccontroller
StephenGrider Oct 25, 2016
37b8b9f
installed ueberauth
StephenGrider Oct 25, 2016
a8a58e2
added oauth routes
StephenGrider Oct 25, 2016
511cf81
fixed config file
StephenGrider Oct 25, 2016
8bc1549
added users migration
StephenGrider Oct 25, 2016
20c8280
added user model
StephenGrider Oct 25, 2016
ff02e91
made user changeset
StephenGrider Oct 25, 2016
06c419c
added new user
StephenGrider Oct 25, 2016
e3ffd31
added signin helper func
StephenGrider Oct 26, 2016
3ab4afd
successfully auth user
StephenGrider Oct 26, 2016
c650a85
added setuser plug
StephenGrider Oct 26, 2016
acf7b84
use a module plug to set current user
StephenGrider Oct 26, 2016
29057c3
added module plug to pipeline
StephenGrider Oct 26, 2016
5166b89
users can signout
StephenGrider Oct 27, 2016
e18d582
added require auth plug
StephenGrider Oct 27, 2016
c9cf198
added plug in controller
StephenGrider Oct 27, 2016
32f198d
added migration
StephenGrider Oct 27, 2016
ed95206
finished migration
StephenGrider Oct 27, 2016
30e4ccd
updated topic and user
StephenGrider Oct 27, 2016
a0a0a6a
added build assoc call
StephenGrider Oct 27, 2016
d242d54
check topics owner
StephenGrider Oct 27, 2016
086b2a6
Create README.md
StephenGrider Oct 27, 2016
430f430
added topic
StephenGrider Oct 27, 2016
b34d5f9
added comments migration
StephenGrider Oct 27, 2016
fb84493
added comments model
StephenGrider Oct 27, 2016
bbb1ddb
added comments channel
StephenGrider Oct 27, 2016
580b3b8
progress with phoenix sockets
StephenGrider Oct 28, 2016
2abff6a
publish message
StephenGrider Oct 28, 2016
8f5a9a9
clean up log
StephenGrider Oct 28, 2016
a745575
refactored to pass along the topic id
StephenGrider Oct 28, 2016
229689c
pass back topic
StephenGrider Oct 28, 2016
7410e8f
removed debug stuff
StephenGrider Oct 28, 2016
15989cb
add comments into db
StephenGrider Oct 28, 2016
aa7e487
Merge branch 'master' of github.com:StephenGrider/ElixirCode
StephenGrider Oct 28, 2016
78b1f36
poison encoder
StephenGrider Sep 11, 2017
445cf4c
comment list
StephenGrider Sep 11, 2017
8bbcdbc
update client
StephenGrider Sep 11, 2017
dcca244
event obj
StephenGrider Sep 11, 2017
a2ab727
current socket user
StephenGrider Sep 11, 2017
eef95a9
associate
StephenGrider Sep 11, 2017
289ad7c
fetch users
StephenGrider Sep 11, 2017
eaf9e6a
Added diagrams.xml
StephenGrider Sep 11, 2017
40b1ae6
Update diagrams.xml
StephenGrider Sep 11, 2017
85716da
render users
StephenGrider Sep 11, 2017
010c26b
Merge branch '163-render-users'
StephenGrider Sep 11, 2017
ce595fe
Update diagrams.xml
StephenGrider Sep 11, 2017
613095b
Update diagrams.xml
StephenGrider Sep 11, 2017
228976d
Update diagrams.xml
StephenGrider Sep 11, 2017
56cd088
Update diagrams.xml
StephenGrider Sep 12, 2017
b56b3a4
added update
StephenGrider Oct 30, 2017
9bab231
Merge branch 'master' of github.com:StephenGrider/ElixirCode
StephenGrider Oct 30, 2017
755a805
added react example
StephenGrider Jan 22, 2018
c79b6ed
Enum.chunk/1 is deprecated. Replace with Enum.chunk_every/3. (Elixir …
newmanicspree Oct 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ElixirCode



Each example from the course can be found within this repo. You can either look at the files in a completed state, or check out the changes that were made in each video by using the branch browser.
1 change: 1 addition & 0 deletions diagrams.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36" version="7.3.7" editor="www.draw.io" type="github"><diagram id="1ba09c8e-dacc-6d28-3093-366aba4a723e" name="004 - changes">7ZhNj5swEIZ/Sw9cK7CTlBwbdtteWlXKYc8OTMBag5FjStJf33EYCBRWm42U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JQShqdtMFRSQmhaGNNa7dppKyXad01ZDB1gETLRRb/wyCSEDly3DrwFHid060lAgSULH2KtNpLu53j+Kv8U4TUrx6L8LGGR2jUgf+74M62UKa7W+xkIW9qybEW/uxPRat4apOnTwSs6bJnY0NIjnoWbLPu2gyVN0RzKsuQLA9vVdfzpLuEGFikLbXSHOkAsMWuBrQFeVkuzuYItQUyr4syUUBpDUkmwqUarByhBrJk7sX9VpOQAyzNdcSEamVRdxJU0JCTPo3ZzxPyDOBM8loiFWCHA4JQqANrA/mQVBxU3KHlQazD6gCnUwbsmOku5T6i9a4hnTFjS0M1oQpolvcbV0DVneEG0HafQP0XhK3096RsN/iJ9QYcmiPBZRE2lTaJiJZmY1+i0TWSDNNhz89XCVzhu0bwv+TRMmxv7bGwSh9gdt3PLRwIZlRmhYFnGwwKkFDvMdzDmQESxjVEI1XN8r1Ra3e6pJkoG25rwn8F9USlbnvNEYzXVRoeUNaT9g+kYTOOp15WDBsEM37ZHfwm344417+eLDt8oXNOmUUPGH9kyT7ALTxWXJp9HMHWC22M2sAbguIHdUGDNoyjXygnr/or3TlqNtmGacb27NZkJzlrw0r1yveGwZcNLGr03LTT6Z1utRoparTJk/ilv1SR6UTn6PTYdv9r0tE39P2TTScemHz/9py4dnXUpmnQ4uP6HXDnsMHer8L0BZZRAvuLI/rzDfwloRPsWYbd1jScfu5Wzrf25YPJgEi7jizIhyrM4Kt+uMwS+xSheY60tkKVKRgWSp7Mc/bGBDKt410M5bdeRy5snI4L66+fYYa79+HnGee7FSut/9PKD9tHLC7pHL3905OhVnrif4Xts1i9Whdjql1d//hM=</diagram><diagram id="359d2982-a095-930a-241b-46fa0fdfbd81" name="002 - split">7ZhNc9owEIZ/DdeMLWNwjglN2kM705kcmp46wl5sNbLEyHKA/vpK8tpY2GGSUJoLMMNI766+9pFW2JNoUW4/K7ouvskM+IQE2XYSfZoQMp9Nza8Vdo0QxdeNkCuWNVK4Fx7YH0AxQLVmGVSeo5aSa7b2xVQKAan2NKqU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BZ9SvbNU+6NvLNWH+0gVh8O3a2sb/T/Inv8A</diagram><diagram id="fac20898-fa7d-3df4-1df4-4f1e1040aa13" name="009 - gen commands">7VVNc5wwDP01XDOAQ7rXhU3aS0/bTs+O0YIntsUYE9j++spgYMk2M+nH5BQutp5ky9J7NhEr9PDZ8qb+iiWoKI3LIWKHKE2T5PaOBo+cJyRjuwmorCxD0Aoc5U8IYBzQTpbQbgIdonKy2YICjQHhNhi3Fvtt2AnVNmvDK7gCjoKra/SHLF091xXHq+MLyKoOqXdZcDxy8VRZ7EzIF6XsNH6TW/N5rxDf1rzE/gJi9xErLKKbZnooQPnezm2b1j284l3ObcG4tyxg04JnrrpQupaD36EebiowN7XTPnwvBNXkWpp+b8HS0NHgTdBcqojtW2elqUJR7jw30sFA58jHbdghoSkF4hMUqNASYtBQZH6SSr2AuJKVIVNQJZSR5c9gnSSK9sGhZVn6NHlfSwfHhgufsydBEjZSAL7I2Oecu+wNxR9B5QtPL0+CxgU9prtgzyFEZjx+hIe+0ZlgeLX3ycIo3RRADc6eKSQsSJNsWhIuSTKLol8ld/cpYPWF2max8aDyatl6ZZomgezfE3/7NuIPshVd20o0nuxv2Egx3kUaPeCk8xR8sP/v7C9v33uwn/0N+wVq7Yvzz+44a6cX2I0Vf2jgzzWQMLbRAIuvNbBj2X/RAJnrb2X0Xfy72f0v</diagram></mxfile>
24 changes: 24 additions & 0 deletions discuss/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# App artifacts
/_build
/db
/deps
/*.ez

# Generated on crash by the VM
erl_crash.dump

# Static artifacts
/node_modules

# Since we are building assets from web/static,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/

# The config/prod.secret.exs file by default contains sensitive
# data and you should not commit it into version control.
#
# Alternatively, you may comment the line below and commit the
# secrets file as long as you replace its contents by environment
# variables.
/config/prod.secret.exs
20 changes: 20 additions & 0 deletions discuss/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Discuss

To start your Phoenix app:

* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.create && mix ecto.migrate`
* Install Node.js dependencies with `npm install`
* Start Phoenix endpoint with `mix phoenix.server`

Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.

Ready to run in production? Please [check our deployment guides](http://www.phoenixframework.org/docs/deployment).

## Learn more

* Official website: http://www.phoenixframework.org/
* Guides: http://phoenixframework.org/docs/overview
* Docs: https://hexdocs.pm/phoenix
* Mailing list: http://groups.google.com/group/phoenix-talk
* Source: https://github.com/phoenixframework/phoenix
69 changes: 69 additions & 0 deletions discuss/brunch-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"

// To use a separate vendor.js bundle, specify two files path
// http://brunch.io/docs/config#-files-
// joinTo: {
// "js/app.js": /^(web\/static\/js)/,
// "js/vendor.js": /^(web\/static\/vendor)|(deps)/
// }
//
// To change the order of concatenation of files, explicitly mention here
// order: {
// before: [
// "web/static/vendor/js/jquery-2.1.1.js",
// "web/static/vendor/js/bootstrap.min.js"
// ]
// }
},
stylesheets: {
joinTo: "css/app.css",
order: {
after: ["web/static/css/app.css"] // concat app.css last
}
},
templates: {
joinTo: "js/app.js"
}
},

conventions: {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/web/static/assets". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(web\/static\/assets)/
},

// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: [
"web/static",
"test/static"
],

// Where to compile files to
public: "priv/static"
},

// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
}
},

modules: {
autoRequire: {
"js/app.js": ["web/static/js/app"]
}
},

npm: {
enabled: true
}
};
36 changes: 36 additions & 0 deletions discuss/config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config

# General application configuration
config :discuss,
ecto_repos: [Discuss.Repo]

# Configures the endpoint
config :discuss, Discuss.Endpoint,
url: [host: "localhost"],
secret_key_base: "u9hBRCWHemNRWIx/RnJ6J4TY3NYqN0PXCBS22vQwmwxoKgG0oJ1UOUvZYtd1gOb6",
render_errors: [view: Discuss.ErrorView, accepts: ~w(html json)],
pubsub: [name: Discuss.PubSub,
adapter: Phoenix.PubSub.PG2]

# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env}.exs"

config :ueberauth, Ueberauth,
providers: [
github: { Ueberauth.Strategy.Github, [] }
]

config :ueberauth, Ueberauth.Strategy.Github.OAuth,
client_id: "9239f35642a875b098aa",
client_secret: "fbfacf2758ec121ddaa3931d7bc1ba1b4441fc5d"
43 changes: 43 additions & 0 deletions discuss/config/dev.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
use Mix.Config

# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :discuss, Discuss.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [node: ["node_modules/brunch/bin/brunch", "watch", "--stdin",
cd: Path.expand("../", __DIR__)]]


# Watch static and templates for browser reloading.
config :discuss, Discuss.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{web/views/.*(ex)$},
~r{web/templates/.*(eex)$}
]
]

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"

# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20

# Configure your database
config :discuss, Discuss.Repo,
adapter: Ecto.Adapters.Postgres,
username: "stephengrider",
password: "",
database: "discuss_dev",
hostname: "localhost",
pool_size: 10
61 changes: 61 additions & 0 deletions discuss/config/prod.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
use Mix.Config

# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include the path to a manifest
# containing the digested version of static files. This
# manifest is generated by the mix phoenix.digest task
# which you typically run after static files are built.
config :discuss, Discuss.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/manifest.json"

# Do not print debug messages in production
config :logger, level: :info

# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :discuss, Discuss.Endpoint,
# ...
# url: [host: "example.com", port: 443],
# https: [port: 443,
# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
#
# Where those two env variables return an absolute path to
# the key and cert in disk or a relative path inside priv,
# for example "priv/ssl/server.key".
#
# We also recommend setting `force_ssl`, ensuring no data is
# ever sent via http, always redirecting to https:
#
# config :discuss, Discuss.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.

# ## Using releases
#
# If you are doing OTP releases, you need to instruct Phoenix
# to start the server for all endpoints:
#
# config :phoenix, :serve_endpoints, true
#
# Alternatively, you can configure exactly which server to
# start per endpoint:
#
# config :discuss, Discuss.Endpoint, server: true
#

# Finally import the config/prod.secret.exs
# which should be versioned separately.
import_config "prod.secret.exs"
19 changes: 19 additions & 0 deletions discuss/config/test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use Mix.Config

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :discuss, Discuss.Endpoint,
http: [port: 4001],
server: false

# Print only warnings and errors during test
config :logger, level: :warn

# Configure your database
config :discuss, Discuss.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "discuss_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
31 changes: 31 additions & 0 deletions discuss/lib/discuss.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
defmodule Discuss do
use Application

# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec

# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
supervisor(Discuss.Repo, []),
# Start the endpoint when the application starts
supervisor(Discuss.Endpoint, []),
# Start your own worker by calling: Discuss.Worker.start_link(arg1, arg2, arg3)
# worker(Discuss.Worker, [arg1, arg2, arg3]),
]

# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Discuss.Supervisor]
Supervisor.start_link(children, opts)
end

# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
def config_change(changed, _new, removed) do
Discuss.Endpoint.config_change(changed, removed)
:ok
end
end
42 changes: 42 additions & 0 deletions discuss/lib/discuss/endpoint.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
defmodule Discuss.Endpoint do
use Phoenix.Endpoint, otp_app: :discuss

socket "/socket", Discuss.UserSocket

# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
at: "/", from: :discuss, gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt)

# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloading? do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
end

plug Plug.RequestId
plug Plug.Logger

plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Poison

plug Plug.MethodOverride
plug Plug.Head

# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
plug Plug.Session,
store: :cookie,
key: "_discuss_key",
signing_salt: "b+pDMONc"

plug Discuss.Router
end
3 changes: 3 additions & 0 deletions discuss/lib/discuss/repo.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defmodule Discuss.Repo do
use Ecto.Repo, otp_app: :discuss
end
Loading