gaiety / Simple nginx static site docker compose

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1753035666
No build steps or anything fancy, easy to throw into a static project
1 name: nginx-static-site
2 services:
3 client:
4 image: nginx
5 ports:
6 - 80:80
7 volumes:
8 - ./:/usr/share/nginx/html

gaiety / dotfiles-link.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1753035078
Links need to be absolute, which is hard when you don't know where a git repo will be cloned to. This helps with that!
1 # Link current directory instead of having to always do absolute
2 ln -s "$(pwd)/cool-tool" ~/.config/cool-tool

gaiety / ecto-get-random.ex

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1752988050
1 def get_random_items(limit \\ 3) do
2 query =
3 from Item,
4 order_by: fragment("RANDOM()"),
5 limit: ^limit,

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

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1752987893
Adding a check of an elixir list compared to a PostgreSQL array
1 def query(filters, dynamic) do
2 dynamic(
3 [features],
4 ^dynamic and fragment("? && ?::varchar[]", ^features, item.features)
5 )
6 end

gaiety / Phoenix (Elixir) + LitElement + TailwindCSS

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1752987531
Inline import the compiled TailwindCSS and Phoenix LiveView ViewHook and make it available to components
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 }

gaiety / randomAlphaNumeric.js

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1752987404
Great for simple dynamic items, like a dynamic html ID suffix
1 # Returns random a-z0-9 pattern of 9 characters
2 # Example: qhp050kba
3
4 function randomAlphaNumeric() {
5 return Math.random().toString(36).slice(2)
6 }

gaiety / head-tail-trim.sh

0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1752986921
1 echo foo\nbar\nbaz | head -n 2
2 # foo
3 # bar
4
5 echo foo\nbar\nbaz | tail -n 2
6 # bar
7 # baz
Новіше Пізніше