Skip to content

Instantly share code, notes, and snippets.

View thutterer's full-sized avatar
🥨

Thomas Hutterer thutterer

🥨
View GitHub Profile
@thutterer
thutterer / dig_up.sh
Created July 15, 2015 19:32
Look in all subfolders for all files of certain types and dig them up
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: Provide file extensions as arguments"
exit 1
fi
for ext in "$@"
do
for subdir in *; do [ -d "${subdir}" ] && mv ${subdir}/*.${ext} .; done
@thutterer
thutterer / rubowhat
Last active June 17, 2022 09:33
Find out what Rubocop wants from you ... from your console.
#!/usr/bin/env ruby
abort "Usage: rubowhat [cop] [cop] ..." if ARGV.empty?
ARGV.each do |c|
category, cop = c.split('/')
(puts "Skipping '#{c}' as it is not in 'category/cop' format."; next) if cop.nil?
category.downcase!
cop.downcase!