start new:
tmux
start new with session name:
tmux new -s myname
2019 update: this essay has been updated on my personal site, together with a followup on how to get started
2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!
If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.
You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos
defmodule MyApp.Repo.Migrations.AddPostgresTriggerAndFunctionForAllTables do | |
use Ecto.Migration | |
def up do | |
# Create a function that broadcasts row changes | |
execute " | |
CREATE OR REPLACE FUNCTION broadcast_changes() | |
RETURNS trigger AS $$ | |
DECLARE | |
current_row RECORD; |
defmodule MyAppWeb.PageLiveTest do | |
use MyAppWeb.ConnCase | |
import Phoenix.LiveViewTest | |
@tag :tmp_dir | |
test "disconnected and connected render", %{conn: conn, tmp_dir: tmp_dir} do | |
{:ok, page_live, disconnected_html} = live(conn, "/") | |
assert disconnected_html =~ "Welcome to Phoenix!" |
# This file contains the configuration for Credo and you are probably reading | |
# this after creating it with `mix credo.gen.config`. | |
# | |
# If you find anything wrong or unclear in this file, please report an | |
# issue on GitHub: https://github.com/rrrene/credo/issues | |
# | |
%{ | |
# | |
# You can have as many configs as you like in the `configs:` field. | |
configs: [ |
Source: https://github.com/zed-industries/community/issues/1526#issuecomment-1543891012 | |
{ | |
// ... | |
"language_overrides": { | |
"Elixir": { | |
"format_on_save": { | |
"external": { | |
"command": "mix", | |
"arguments": ["format", "--stdin-filename", "{buffer_path}", "-"] | |
} |