Skip to content

Instantly share code, notes, and snippets.

View aiwaiwa's full-sized avatar
💭
⌨️ Enjoying Elixir and Phoenix

aiwaiwa

💭
⌨️ Enjoying Elixir and Phoenix
View GitHub Profile
@aiwaiwa
aiwaiwa / mix_phx_server.ps1
Last active June 19, 2023 15:00
Run elevated `mix phx.server` on Windows
Start-Process powershell -ArgumentList "-Command Set-Location '$PWD'; mix.bat phx.server" -Verb RunAs
@aiwaiwa
aiwaiwa / compare_phoenix_versions.exs
Last active July 21, 2023 17:23
Compare Phoenix Versions with extra custom steps like mix phx.gen.live Accounts User users name:string
#
# Compare Phoenix releases with additional custom setup to enhance comparison.
#
# Usage:
# elixir <this_script_name.exs> 1.7.2
# (downloads 1.7.2 and compares with the closest previously downloaded version if available)
#
# elixir <this_script_name.exs> 1.7.2 1.7.7
# (downloads both versions and compares)
#
@aiwaiwa
aiwaiwa / heroicons_gen.exs
Last active March 10, 2023 15:36
heroicons_gen for Phoenix >=1.7.1
# |
# | This is designed for Phoenix >= 1.7.1 to add Heroicons components
# | from the list of .svg files in any of:
# |
possible_sources = [
# As introduced in =1.7.1
"priv/hero_icons/optimized/20/solid",
# Since >=1.7.2 with a maybe variant
"assets/vendor/hero_icons/optimized/20/solid/",
"assets/vendor/heroicons/optimized/20/solid/"