Skip to content

Instantly share code, notes, and snippets.

View herminiotorres's full-sized avatar
🍇
Grapes Vibes

Herminio Torres herminiotorres

🍇
Grapes Vibes
View GitHub Profile
@herminiotorres
herminiotorres / page_live_test.exs
Created February 8, 2021 22:28 — forked from mcrumm/page_live_test.exs
LiveView artifacts
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!"
@herminiotorres
herminiotorres / curl.md
Created August 30, 2019 19:22 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@herminiotorres
herminiotorres / clean_code.md
Created July 17, 2019 20:49 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Keybase proof

I hereby claim:

  • I am herminiotorres on github.
  • I am herminiotorres (https://keybase.io/herminiotorres) on keybase.
  • I have a public key whose fingerprint is FEAA 2800 4DD2 A271 AA33 E90F C3A8 C64E F186 D823

To claim this, I am signing this object: