DEV Community


Posted on • Updated on

waybackmachine February 20'

... because it's always fun to go back in time and remember how it was back then ...

CLI :: The power of $tee

tee command is helpful when you need to store and view, both at the same time, the output of any given command.

usage example:

  • When you need to save a sudo requiring file while inside a non-sudoed vim execution, without quitting vim. (usage explanation)

:w !sudo tee %

I'm quite sure you'd agree with this being the first most common usage of tee.

  • When needing to examine the too-long output of an executable JAR. I wanted to have a look at the complete log in detail (being able to search over it). In other words, I wanted to execute it and have the output both in the sysout and in a file.
$ java -jar runnable-jar.jar | tee log.txt
Enter fullscreen mode Exit fullscreen mode

CLI :: watch the Kubernetes

watch is one of my favourite commands when working with async scopes where the task result is delayed in time.

example of usage:

  • watch the application of certain configuration over Kubernetes
$ kubectl apply -f config.yaml
$ watch kubectl get pods | nodes | services | whatever resource
Enter fullscreen mode Exit fullscreen mode
  • another common usage I make of it, is when working on a specific API endpoint returning a JSON content-type, as a quick test assurance. I just watch whether the specific desired expression is being satisfied over time
$ watch "http :8080 /whateverendpoint | jq 'whatever expression'"
Enter fullscreen mode Exit fullscreen mode

watch :: MIT missing semester

I would have loved having this resource while I was in the uni, but yet now, I'm enjoying watching it.

MIT has released a bunch of videos (1h approx each) about the following basic topics:

  • The shell
  • Shell Tools and Scripting
  • Editors (vim)
  • Data wrangling
  • CLI
  • Version control (git)
  • Debugging and profiling
  • metaprogramming
  • security and cryptography
  • potpurri and Q&A

Hope you enjoy them as much as I and thanks to whoever started spreading the word on my twitter TL

the w00t? :: ELMO

Whenever the meeting discussion starts to run off track the chair picks up Elmo to indicate "Enough Let’s Move On"

a pic :: time to move to an autogen password manager?

Been thinking about this for a while and think I'm gonna start trying the autogen key of Firefox Lockwise mode

password strength craking
source: @terahashcorp

humor strip :: turnoff

Just came across this IT comic strip, which has become my welcome tab on the browser.

malloc joke

monthly ear hook :: SandwitchTunes

A groovy version with blues harp!

Top comments (0)