Essential dot profile

Andres Rodriguez
1 min readNov 13, 2018

--

This is really documentation for my .profile in the form of a blog post. I detail the utilities that I use on daily base via function definitions on this file and a little of what I have learned maintaining this file.

Better Terminal Handling

I separate the code side on the .profile and then the private variables (not suitable for publication) on .bashrc.

Meta Documentation

In order to generate the gist for this post, I execute the following to create a gist from the command line:

A="Authorization: token $GITHUB_PAT"
C=$(jq -R -s . ~/.profile)
B='{"public":true,"files":{"profile.sh":{"content": '$C'}}}'
curl -v -H "$A" -X POST -d "$B" https://api.github.com/gists

I also added the following CSS to hide line numbers from the gists:

/* Hide line numbers from gists */
td[data-line-number] { display: none; }

Embedded Utilities (of note)

There are some “bash” functions embedded in the .profile and are things that I use recurrently. Some of those are:

  • fpd: Fix Photo(s) Date(s) by modifying the file date to the EXIF date creation
  • ips: To list AWS IP addresses for a set of AWS profiles
  • medium: To post a medium story via the API
  • terms: To open the terminals I need for development

The profile file

Originally published at R@andomCurve on 2018–11–13

--

--

Andres Rodriguez

Interested in (almost) everything. AI/ML Researcher once upon a time. Tech-preneur nowadays.