Skip to content

Instantly share code, notes, and snippets.

@rergw
Last active November 16, 2020 23:53
Show Gist options
  • Save rergw/e202718f2e32acb317d6b73bcd5d3c3d to your computer and use it in GitHub Desktop.
Save rergw/e202718f2e32acb317d6b73bcd5d3c3d to your computer and use it in GitHub Desktop.
C:\Users\pasta\AppData\Local\Android\Sdk\platform-tools\adb.exe forward tcp:9222 localabstract:chrome_devtools_remote
wget -O tabs.json http://localhost:9222/json/list
REM ruby -e "require 'json'; puts JSON.load(File.read('tabs.json')).map{|e| %W{<a href='#{e['url']}'> #{e['title']}</a><br/>} }" | Set-Clipboard -AsHtml
ruby -e "require 'json'; puts JSON.load(File.read('tabs.json')).map{|e| %W{#{e['title']}\t#{e['url']}} }" | Set-Clipboard
# Use as: wget -O - -q https://git.io/Jvfzk | bash
adb forward tcp:9222 localabstract:chrome_devtools_remote
wget -O tabs.json http://localhost:9222/json/list
# copy to clipboard as html
# ruby -e "require 'json'; puts JSON.load(File.read('tabs.json')).map{|e| %W{<a href='#{e['url']}'> #{e['title']}</a>} }" | xclip -sel clip -t text/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment