Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
| # Like OpenStruct but doesn't let you read a non-assigned value (raises instead of returning nil). | |
| # This avoids issues where you read the wrong value due to a typo and don't notice. | |
| class HalfOpenStruct | |
| def initialize(hash = {}) | |
| @hash = hash | |
| end | |
| def include?(name) | |
| @hash.include?(name) |
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
| #!/usr/bin/ruby | |
| # encoding: utf-8 | |
| # Grab google web fonts and embed them as base64 data URIs | |
| # <http://brettterpstra.com/2015/03/14/embedding-google-web-fonts/> | |
| require 'base64' | |
| if ARGV.length > 0 | |
| input = ARGV | |
| elsif STDIN.stat.size > 0 | |
| input = STDIN.read.strip.split(/\n+/) |
| #!/bin/bash | |
| # | |
| # _ _ __ | |
| # __ _ __ _ _ __| |__ (_)/ _|_ _ | |
| # / _` |/ _` | '__| '_ \| | |_| | | | | |
| #| (_| | (_| | | | |_) | | _| |_| | | |
| # \__, |\__,_|_| |_.__/|_|_| \__, | | |
| # |___/ |___/ | |
| # | |
| # |
This document is a collection of concepts and strategies to make large Elm projects modular and extensible.
We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:
| #!/usr/bin/python | |
| # TODO make range command line arguments | |
| import sys, codecs | |
| sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # if your terminal can't do utf-8, well... | |
| import time | |
| import urllib2 | |
| import BeautifulSoup |
| sentence = "there is a wild rose" | |
| letters = sentence.gsub(' ','').split(//) |
| - Tune /etc/ssh/sshd_config | |
| UseDNS no # Disable DNS lookups | |
| GSSAPIAuthentication no # Disable negotation of slow GSSAPI | |
| don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it | |
| - Tune Vagrantfile | |
| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] |