Skip to content

Instantly share code, notes, and snippets.

View lovebes's full-sized avatar

Seungjin Kim lovebes

View GitHub Profile
@lovebes
lovebes / settings.json
Last active August 10, 2022 05:30
my vscode settings.json for elixir etc
{
"editor.autoIndent": "advanced",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.associations": {
"*.html.eex": "html-eex",
"*.html.leex": "html-eex"
},
"[elixir]": {
@lovebes
lovebes / active_link_view.ex
Created December 26, 2021 22:28
How to make Active Link Phoenix Component
@lovebes
lovebes / Advent_of_Code_Day_15_Djikstra_implementation_enum_sort.ex
Last active December 18, 2021 06:04
2021 Advent of Code Day 15 - with Djikstra Implementation in Elixir, two different min-dist finding solutions
defmodule Advent do
@moduledoc """
How to use it:
1. Uncomment which `@proof` you want to run against - part I or part II
2. Uncomment correct `@last_coord` for target coordinate
3. Decide if you want to expand it or not (check docstring in `run/1), and pipe that result into `Advent.run/1`,
instead of just calling `Advent.run/1`
Metrics:
@lovebes
lovebes / app.js
Last active December 14, 2021 05:27
Phoenix LiveView flash fade out
import 'phoenix_html'
// assets/js/app.js
import { Socket } from 'phoenix'
import { LiveSocket } from 'phoenix_live_view'
let liveSocket = new LiveSocket('/live', Socket, {
params: { _csrf_token: csrfToken },
...