Attemp to make work react with elm on a phoenix project.
The project directory for elm is
web
├── channels
├── controllers
│ └── api
│ └── v1
jQuery ($) -> | |
$('.add_fields').each -> | |
$this = $(this) | |
insertionNode = $this.data('association-insertion-node') | |
insertionTraversal = $this.data('association-insertion-traversal') | |
if (insertionNode) | |
if (insertionTraversal) | |
insertionNode = $this[insertionTraversal](insertionNode) | |
else |
Rails as it has never been before :) | |
Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring. | |
Note: Some of them are collected from different online resources/posts/blogs with some tweaks. |
Attemp to make work react with elm on a phoenix project.
The project directory for elm is
web
├── channels
├── controllers
│ └── api
│ └── v1
- Check rails version | |
$ rails -v | |
- To update rails | |
$ gem update rails | |
- Creating a new rails app using postgresql | |
$ mkdir rails_projects | |
$ cd rails_projects | |
$ rails new myapp --database=postgresql |
Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault :
bash <(curl -Ls http://git.io/eUx7rg)
However, at the time of writing the script is not compatible with OS X El Capitan (10.11)
An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"
Make sure Homebrew has the latest formulae, so run brew update
first
npm install -g create-react-app
. | |
├── actions | |
├── stores | |
├── views | |
│ ├── Anonymous | |
│ │ ├── __tests__ | |
│ │ ├── views | |
│ │ │ ├── Home | |
│ │ │ │ ├── __tests__ | |
│ │ │ │ └── Handler.js |
FROM python:3.6-stretch as python-base | |
COPY webpack requirements.txt package.json yarn.lock ./ | |
RUN set -ex \ | |
&& apt-get update \ | |
&& apt-get install apt-transport-https \ | |
&& apt-get update \ | |
&& apt-get install --no-install-recommends -y \ | |
libpq-dev curl libjpeg-dev rsync libsass-dev libicu57 zlib1g-dev libpng-dev libmagickwand-dev \ |
This table was created in 2015 so may be quite outdated today.
Feature | Meteor Solution | Alternative Solutions | Description |
---|---|---|---|
Live DB Sync | [livequery][lq] ([mongo-oplog]), [ddp] | RethinkDB, Redis, ShareDB, [npm:mongo-oplog], [firebase], etc. | Push DB updates to client/server. |
Latency Compensation, Optimistic UI | [minimongo][mm] | [RethinkDB][lcr], [mWater/minimongo] (fork, not ws but http, browserify) | Imitate successful db query on client before it is done. |
Isomorphic Code | [isobuild] & isopacks | browserify | Write one code for server/client/mobile. |
Isomorphic Packaging | [isobuild], atmosphere | No more separate packages for server & client. Get bower + npm + mobile. |