Skip to content

Instantly share code, notes, and snippets.

@angelikatyborska
angelikatyborska / gettext_test.exs
Last active January 16, 2022 16:24
A unit test for Gettext translations that checks if the original and the translation use the same HTML tags. Uses Floki to parse HTML.
defmodule MyAppWeb.GettextTest do
use ExUnit.Case
import MyAppWeb.Gettext
# A unit test for Gettext translations that checks if the original and the translation
# use the same HTML tags.
#
# Uses Floki to parse HTML.
describe "translations" do
@idlehands
idlehands / 00_info.md
Last active April 4, 2025 09:20
-info and links
@ks2211
ks2211 / Phoenix esbuild with Tailwind and Fontawesome
Last active July 30, 2024 01:50
Phoenix with esbuild, fortawesome, and tailwindcss
Phoenix esbuild with Tailwind+Fontawesome
@adibenc
adibenc / docker-compose.yml
Last active April 26, 2022 13:24
example docker-compose.yml for kong, postgres and konga, a bit fixes
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@avoiney
avoiney / .env
Created July 28, 2021 06:47
Directus under non root path with nginx
DIRECTUS_KEY=<...>
DIRECTUS_SECRET=<...>
DIRECTUS_DB_DATABASE=<...>
DIRECTUS_DB_USER=<...>
DIRECTUS_DB_PASSWORD=<...>
DIRECTUS_CACHE_ENABLED=true
DIRECTUS_CACHE_STORE=redis
DIRECTUS_ADMIN_EMAIL=<...>
DIRECTUS_ADMIN_PASSWORD=<...>
DIRECTUS_PUBLIC_URL=https://<server_name>/directus/ # server_name is the one used in nginx. Note the slash at the end.
@mcrumm
mcrumm / app.js
Last active March 4, 2025 13:07
flatpickr + LiveView example
// assets/js/app.js
// ...
import Pickr from "./pickr"
const hooks = {
Pickr
}
// ...
@alexdesousa
alexdesousa / curl.sh
Created June 1, 2021 13:00
`curl <url> | sh` but for Elixir >= 1.12
# Step 2: Pipe the curl's output into elixir directly.
# Warning: only execute scripts you trust.
$ FILENAME="https://raw.githubusercontent.com/wojtekmach/mix_install_examples/d98fce880eedda18747e592ec6c42b6ca817136f/scenic.exs" \
curl "$FILENAME" | exsh
@Cinderella-Man
Cinderella-Man / index.html
Created May 27, 2021 19:57
HTML Canvas animations experiment
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<canvas id="canvasDemo" height="1920" width="1080">
Sorry, your browser does not support canvas.
</canvas>
@samselikoff
samselikoff / tailwind.config.js
Created April 16, 2021 15:57
Firefox plugin for Tailwind CSS. Add styles that target Firefox browser only.
const plugin = require("tailwindcss/plugin");
module.exports = {
mode: "jit",
purge: {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx,vue}"],
},
theme: { extend: {} },
variants: {},
plugins: [
@mattdanielbrown
mattdanielbrown / fixed-bottom-nav-w-tailwind.markdown
Created February 21, 2021 18:31
Fixed Bottom Nav w/ Tailwind