Skip to content

Instantly share code, notes, and snippets.

View apoorv-2204's full-sized avatar
🤒
Out sick

Apoorv-2204 apoorv-2204

🤒
Out sick
View GitHub Profile
@apoorv-2204
apoorv-2204 / Ecto migrations, the change , the up and down functions
Last active October 3, 2024 06:10
change function and the up & down functions in Ecto migrations:
change Function:
Automatic Reversibility: Used when Ecto can automatically infer how to reverse the migration.
Simple Operations: Suitable for straightforward schema changes like creating/dropping tables,
adding/removing columns, and modifying indexes.
up and down Functions:
@apoorv-2204
apoorv-2204 / Bash Scrip to sort elixir module aliases Alphabetically , when adopting credo rules
Last active September 27, 2024 11:51
Bash Scrip to sort elixir module aliases Alphabetically , when adopting credo rules
#!/bin/bash
# This script will recursively find all .ex and .exs files
# and sort the alias groups within each file alphabetically.
find . -type f \( -name "*.ex" -o -name "*.exs" \) | while read -r file; do
# Read the file into an array
mapfile -t lines < "$file"
in_alias_group=false

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@apoorv-2204
apoorv-2204 / gk
Last active March 1, 2022 08:28
elixir
Anti-pattern
https://stackoverflow.com/questions/980601/what-is-an-anti-pattern
@apoorv-2204
apoorv-2204 / February 14, 2022.md
Last active March 9, 2022 16:00
//usefull commands in archethic-node development