Skip to content

Instantly share code, notes, and snippets.

@T-Rave
T-Rave / copymedia.sh
Created June 30, 2019 02:50
Lazy person media copy
# Bash command to find multiple media types and copy them to a new destination while retaining directory structure
## remove the parent flag on the cp if you want all found files to be moved into a single directory. Note, may lead to barking about duplicate files
## adjust the size value as needed. + is > value, - is < value, only value will match exactly. Not having this may lead to small sprite images
## using -iname allows for case insenitive search
## starts at current location and searches recursively within
find ./ -type f \( -iname \*.jpg -o -iname \*.png -o -iname \*.jpeg -o -iname \*.psd -o -iname \*.mov -o -iname \*.avi -o -iname \*.mpg \) -size +80k -exec cp --parents {} /<path to copy to>/ \;
@T-Rave
T-Rave / alfred-clipboard-dump.sh
Last active June 1, 2023 20:53
Alfred, Mac OS X app, full clipboard dump to text file
## Must have sqlite3 installed. Homebrew user? brew install sqlite
## Can be ran directly in command line and will place file directory where ran
## Remove `-header` if you don't want the output to have the column name `item`
## Checkout more options and Workflow - https://github.com/T-Rave/alfred-clipboard-dump
# dumps output with list option since single column. Produces cleaner data without double quotes
sqlite3 -header -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard;" > clipboard-dump.txt
# dumps full table to csv format
sqlite3 -header -csv ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT * FROM clipboard;" > clipboard-dump.csv
# dumps only items in descending (inverse) order with no column name
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard ORDER BY item DESC;" > clipdump.txt
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="At Flywheel, we work on hard problems. Then we have some fun.">
<title>Send Support a Beer</title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic|Montserrat:400,700" rel="stylesheet" type="text/css">
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

Keybase proof

I hereby claim:

  • I am T-Rave on github.
  • I am trave (https://keybase.io/trave) on keybase.
  • I have a public key whose fingerprint is 283D A04B A375 288B 74EE 2D3D 59FD F59E 764A 947B

To claim this, I am signing this object: