$ ssh <mydomain.com>
$ dokku apps:create
#!/bin/bash | |
# Required deps: | |
# imagemagick: https://imagemagick.org/script/download.php | |
# iconutil: https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html | |
# name of your master icon, should be 1024x1024 or .svg | |
if [ -z "$PNG_MASTER" ]; then | |
# If not set, assign a default value | |
PNG_MASTER="icon-large.png" | |
fi |
If your project has any issues with the native folders, you can rebuild them by deleting both the ios and android directories at the root level of your project and running this command:
$ react-native eject
Running this command will check if the ios and android directories exist and then rebuild whichever one is missing.
The first time you run this command it will spit out a configuration JSON file called app.json
. By default, app.json
will have 2 properties:
defmodule User do | |
use Ecto.Model | |
schema "users" do | |
field :email, :string | |
field :hashed_password, :string | |
field :password, :string, virtual: true | |
field :password_confirmation, virtual: true | |
timestamps |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
$(function() { | |
var source = new EventSource('/events'); | |
source.onopen = function (event) { | |
console.log("eventsource connection open"); | |
}; | |
source.onerror = function() { | |
if (event.target.readyState === 0) { | |
console.log("reconnecting to eventsource"); | |
} else { | |
console.log("eventsource error"); |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.bz2 | |
tar -xvjf ruby-1.9.3-p392.tar.bz2 | |
cd ruby-1.9.3-p392/ | |
./configure --prefix=/usr/local | |
make | |
make install |