Skip to content

Instantly share code, notes, and snippets.

@monkseal
Last active May 5, 2018 17:47
Show Gist options
  • Select an option

  • Save monkseal/08582a1db2ff169473080d9ed8f3a005 to your computer and use it in GitHub Desktop.

Select an option

Save monkseal/08582a1db2ff169473080d9ed8f3a005 to your computer and use it in GitHub Desktop.
# get any route path (third item) with 'user' in it.
bundle exec rails routes | grep user | awk '{print $3}'
# get any route path (third item) with 'user' in it.
# NOTE: this removes the trailing (.:format)
bundle exec rails routes | grep user | awk '{ gsub("\\\(.:format\\\)","",$3); print $3}'
# generate a Spec file name from react compoment
find app/javascript/ReactApps/components | sed -e 's/app/spec/' | sed -e 's/\.js/Spec.js/'
# Get into the clipboard the first file name in a git status
git st -s | awk '{print $2}' | head | pbcopy
# Get rid of all files with .part
find M -name "*.part" -exec rm {} +
# Remove ._ from thumb drive.
dot_clean -mv /Volumes/MUSIC16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment