Skip to content

Instantly share code, notes, and snippets.

View noelworden's full-sized avatar

Noel Worden noelworden

View GitHub Profile
@noelworden
noelworden / Standardized_Commits.md
Last active August 24, 2023 08:45
How to standardize git commit messages, #helpers
  • Why standardize messages? Its clean. Easy to see what changed and when. As an up-and-coming developer, my repos will probably be potential employers first impressions of me. Clean code (proper indentions/spacing etc) and formatted commit messages help show that I care about my code.

  • The workflow is to create a .txt file as a template, and configure git to use that file as the default message when commiting.

  • The key is the character count. Note the dashed lines representing 50 characters for the summary, and 72 for the description.

####implimentation####

  • cd ~ #to confirm in the home directory
@noelworden
noelworden / column_data10.ex
Last active April 26, 2023 07:03
#blog_snippets
defmodule Atlas.Mapping.CSVUtil do
@moduledoc """
Utility module to ingest `destination.csv`
"""
alias NimbleCSV.RFC4180, as: CSV
alias Atlas.{Mapping, Mapping.Destination, Repo}
def csv_row_to_table_record(file) do
column_names = get_column_names(file)

Keybase proof

I hereby claim:

  • I am noelworden on github.
  • I am noelworden (https://keybase.io/noelworden) on keybase.
  • I have a public key ASDfPA7xVsNbGyYBF0WfDVqhpxVqKtPdJku9SmEFni_gTQo

To claim this, I am signing this object:

@noelworden
noelworden / prying_debugging.md
Last active February 18, 2021 22:08
#helpers
@noelworden
noelworden / angling_atlas_journal.md
Last active December 23, 2020 21:56
#anglersatlas
@noelworden
noelworden / column_data01.ex
Last active December 1, 2020 15:20
#blog_snippets
def csv_row_to_table_record(file) do
column_names = get_column_names(file)
file
|> File.stream!()
|> CSV.parse_stream(skip_headers: true)
|> Enum.map(fn row ->
row
|> Enum.with_index()
|> Map.new(fn {val, num} -> {column_names[num], val} end)
@noelworden
noelworden / column_data03.ex
Last active December 1, 2020 14:24
#blog_snippets
[
{"-105.6929", 0},
{"39.8763", 1},
{"Heart Lake", 2},
{"Description goes here", 3},
{"true", 4},
{"true", 5},
{"true", 6},
{"false", 7},
{"false", 8},
@noelworden
noelworden / column_data09.ex
Last active November 30, 2020 23:43
#blog_snippets
row["longitude"]
@noelworden
noelworden / column_data08.ex
Last active November 30, 2020 23:43
#blog_snippets
defp create_or_skip(row) do
case Repo.get_by(Destination,
latitude: row["latitude"],
longitude: row["longitude"]
) do
nil ->
Mapping.create_destination(%{
longitude: Decimal.new(row["longitude"]),
latitude: Decimal.new(row["latitude"]),
name: row["name"],
@noelworden
noelworden / column_data07.ex
Created November 30, 2020 23:43
#blog_snippets
Mapping.create_destination()