Skip to content

Instantly share code, notes, and snippets.

@Cairnarvon
Created June 12, 2011 18:40
Show Gist options
  • Save Cairnarvon/1021869 to your computer and use it in GitHub Desktop.
Save Cairnarvon/1021869 to your computer and use it in GitHub Desktop.
Browser extensions suck.
#!/bin/bash
# Open a Youtube or other video in your browser, wait for it to load, leave the
# browser window open. Run script. Profit.
# May not work with Gnash &c.
lsof -u $(whoami) | grep Flash | awk '{sub(/[^0-9]+/, "", $4)
sub(/\/tmp\//, "", $9)
print "/proc/"$2"/fd/"$4, $9".flv"}' | xargs -rn 2 cp -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment