If you are reading this, you probably tried to write code like this
test "testing session" do
build_conn()
|> put_session(:user_id, 234)
|> get("/")
...
end
And got this exception:
-- happy avril 14th :))))))))))))))))))))))))))))))))))))))) | |
do | |
let bars = 4 | |
key = "8" | |
righthand = "[[4 -3] [0 _ _ _ _ _ 0]] [[-3, -8] [7 5 4 0]]" | |
lefthand = "[0 9 12 16] [4 12 16 19] [5 12 17 19] [2 12 17 16]" | |
d1 $ slow bars | |
$ stack [ | |
n (righthand + key + "<24 36>/2"), |
# Sonic Pi tutorial: https://sonic-pi.net/tutorial | |
# Gymnopédie No. 1 by Erik Satie – sheet music: https://musopen.org/music/8010-3-gymnopedies/ | |
# Coded by Alex Glow | |
in_thread(name: :bass) do | |
bass_iter = 0 | |
with_fx :reverb, room: 1 do | |
2.times do | |
8.times do | |
#with_fx :echo, mix: 0.4, phase: 0.4 do |
#!/usr/bin/env bash | |
LOG_PATH="/home/$(whoami)/log/speedtest.log" | |
if result=$(/usr/bin/speedtest --simple); then | |
parsed_result=$(printf "${result}\"" | sed ':a;N;$!ba;s/\n/" /g' | sed 's/: /="/g') | |
printf "[$(date)] ${parsed_result}\n" >> "${LOG_PATH}" | |
else | |
printf "[$(date)] error\n" >> "${LOG_PATH}" | |
exit 1 |
If you are reading this, you probably tried to write code like this
test "testing session" do
build_conn()
|> put_session(:user_id, 234)
|> get("/")
...
end
And got this exception:
UPDATE 2018-02-24: I got a new Lenovo X1 Carbon 5th gen and tried to do the same setup with Debian 9.3.0. It was an utter failure because of some boot issues. I went with Xubuntu instead and everything works FLAWLESSLY. Xubuntu is beautiful.
I've had my mind on switching my development machine from a 13" MacBook Pro Retina to a Lenovo X1 Carbon running Linux for a while. The main reason is getting more familiar with Linux itself and also to have a more stable and minimal dev environment. So I finally got the machine and decided to install Debian 8.5 "jessie". Why Debian? Well, I tried installing Arch Linux once and couldn't get past getting wifi to work, and Ubuntu seemed like it added too much stuff. The choice was either Debian or Linux Mint. I went with Debian because it seems like it's the most stable.
I followed the instructions at https://www.debian.org/releases/jessie/amd64/ch04s
Install makeself
:
apt-get install makeself
or
brew install makeself
# ATTENTION: This is now supported in plug_cowboy as of 2.1.0: | |
# https://hexdocs.pm/plug_cowboy/Plug.Cowboy.Drainer.html | |
defmodule DrainStop do | |
@moduledoc """ | |
DrainStop Attempts to gracefully shutdown an endpoint when a normal shutdown | |
occurs. It first shuts down the acceptor, ensuring that no new requests can be | |
made. It then waits for all pending requests to complete. If the timeout | |
expires before this happens, it stops waiting, allowing the supervision tree | |
to continue its shutdown order. |
It's important to note that running this reset will drop any existing data you have in the application
heroku restart
heroku pg:reset DATABASE
(no need to change the DATABASE
)heroku run rake db:migrate
heroku run rake db:seed
(if you have seed)One liner
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:
defmodule MyApp do | |
use Application | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false | |
children = [ | |
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [ | |
dispatch: dispatch | |
]) |