Skip to content

Instantly share code, notes, and snippets.

@drio
Last active October 11, 2022 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drio/d3cd79eeb1b32cd9828f25e246f6ac6d to your computer and use it in GitHub Desktop.
Save drio/d3cd79eeb1b32cd9828f25e246f6ac6d to your computer and use it in GitHub Desktop.
unix-batteries

Unix batteries

Loads a few crucial tools in your new Unix/Linux box.

Run

# In OSX, this will script will paste the cmd to the clipboard:
$ ./gen-cmd.sh
#!/bin/bash
# -f: fail-early
# -s: silent
# -S: When used with -s, --silent, it makes curl show an error message if it fails.
# -L: Follow redirect
#
SHA=$(git log | head -1 | awk '{print $2}')
URL="https://gist.githubusercontent.com/drio/d3cd79eeb1b32cd9828f25e246f6ac6d/raw/$SHA/unix-batteries.sh"
printf "%s" "/bin/bash -c \"\$(curl -fsSL $URL)\"" | pbcopy
echo "✨ Copied to clipboard"
#!/bin/bash
#
date > unix-batteries.txt
echo "xx" >> unix-batteries.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment