Mix.install([
{:plug_cowboy, "~> 2.6"}
])| <body> | |
| <input id="input" type="file" accept=".gpx" />; | |
| <script type="module" src="/main.js"></script> | |
| </body> | |
| let newHandle; | |
| input.addEventListener("change", async (e) => { |
| /* Using a JavaScript proxy for a super low code REST client */ | |
| // via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
| // also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
| // also see https://github.com/fastify/manifetch | |
| // also see https://github.com/flash-oss/allserver | |
| const createApi = (url) => { | |
| return new Proxy({}, { | |
| get(target, key) { | |
| return async function(id = "") { | |
| const response = await fetch(`${url}/${key}/${id}`) |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| Test |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| function countContainers() { | |
| docker ps -q $1 | wc -l | |
| } | |
| function countCrashedContainers() { | |
| docker ps -a | grep -v -F 'Exited (0)' | grep -c -F 'Exited (' | |
| } |
| # A commented nginx configuration file for Ruby on Rails | |
| # | |
| # Author: Tommaso Pavese | |
| # [email protected] | |
| # http://tommaso.pavese.me | |
| # | |
| # License: http://www.wtfpl.net/ | |
| # | |
| # | |
| # Tested with: |
This is a complete, step-by-step tutorial showing how to create a fully functional contact form in production in rails 5. Rather than reinvent things, the following borrows from the best available documentation and tutorials (most notably, this tutorial on making a contact form in development). The finished contact form can be viewed here.
This tutorial uses:
- heroku for deployment,
- gmail for the mailer, and
- github for version control
It would be a good idea to create a new gmail account to use for your mailer now, if you haven't already. If you haven't yet got a heroku account and installed the heroku CLI, it would be easiest to do so now.