All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login

All gists matching topic elixir

Recently created
Least recently created
Recently updated
Least recently updated
gaiety's Avatar

gaiety / ecto-search-simple-word-similarity.ex

0 likes
0 forks
1 files
Last active 1753036694
ecto elixir phoenix search
1 defp items_search(search) do
2 dynamic(
3 [item],
4 fragment(
5 "word_similarity(?, CONCAT(?, ' ', ?)) > 0.6",
6 ^search,
7 item.name,
8 item.description
9 )
10 )
gaiety's Avatar

gaiety / ecto-dynamic-list-within-list-query.sh

0 likes
0 forks
1 files
Last active 1752987893
Adding a check of an elixir list compared to a PostgreSQL array
dynamic ecto elixir query
1 def query(filters, dynamic) do
2 dynamic(
3 [features],
4 ^dynamic and fragment("? && ?::varchar[]", ^features, item.features)
5 )
6 end
gaiety's Avatar

gaiety / Phoenix (Elixir) + LitElement + TailwindCSS

0 likes
0 forks
1 files
Last active 1752987531
Inline import the compiled TailwindCSS and Phoenix LiveView ViewHook and make it available to components
elixir lit phoenix tailwindcss
1 import {LitElement, unsafeCSS} from 'lit'
2 import type {ViewHook} from 'phoenix_live_view'
3 import styles from '../../../priv/static/assets/app.css?inline'
4
5 declare global {
6 interface HTMLElement {
7 LitLiveHook?: ViewHook
8 }
9 }
Newer Older

Powered by Opengist ⋅ Load: 123ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ Links ⋅ Portfolio ⋅ Git