Skip to content

Instantly share code, notes, and snippets.

View GrayedFox's full-sized avatar
👣
Maken tracks, one step at a time.

Che Fisher GrayedFox

👣
Maken tracks, one step at a time.
View GitHub Profile
@GrayedFox
GrayedFox / git-clone-latest
Last active August 13, 2018 16:52
Bash function to clone the latest tagged version of a repo
#!/usr/bin/env bash
LATEST_TAG="$(curl --silent https://api.github.com/repos/$1/$2/tags | grep -Po '"name": "\K.*?(?=")' | head -1)"
echo "Cloning $LATEST_TAG"
if [ "$3" = "-https" ]; then
git clone https://github.com/$1/$2.git --branch $LATEST_TAG
else
git clone git@github.com:$1/$2.git --branch $LATEST_TAG
@GrayedFox
GrayedFox / RemoveHeaders.java
Last active June 2, 2018 15:58
removeCopyrightHeaders
/*
* Remove all instances of a commented copyright notice from all files inside of a project.
* Needs to be compiled first (javac).
* Will not overwrite hidden files, symbolic links, or attempt to write to directories that are not writable.
* Will only overwrite files where the copyright text is found (will not overwrite with no changes).
*/
import java.io.IOException;
import java.io.*;
import java.nio.file.Files;
@GrayedFox
GrayedFox / foxy-ubuntu.sh
Last active September 25, 2023 07:10
Foxy Ubuntu
#!/usr/bin/env bash
source $HOME/.bashrc
MACHINE=$(uname -s)
cd $HOME
if [ "$MACHINE" == "Linux" ]; then
printf "Removing libreoffice, thunderbird, and webbrowser app..."

Keybase proof

I hereby claim:

  • I am grayedfox on github.
  • I am grayedfox (https://keybase.io/grayedfox) on keybase.
  • I have a public key whose fingerprint is 6847 1215 2CB4 7637 0582 3FBD CC33 73F2 7F9A 9688

To claim this, I am signing this object: