Skip to content

Instantly share code, notes, and snippets.

@gotchahn
Last active June 3, 2016 22:11
Show Gist options
  • Save gotchahn/afcaa4cafa933f77bea2ec3c7a98b706 to your computer and use it in GitHub Desktop.
Save gotchahn/afcaa4cafa933f77bea2ec3c7a98b706 to your computer and use it in GitHub Desktop.
How Move All Dataclips

Getting the data

Follow the instructions to grab the right urls posted here

  1. curl https://dataclips.heroku.com/api/v1/clips -H ‘Cookie: xxx’ | pbcopy
  • To get all the url, use chrome->inspect->network on the index dataclip page.
  • Right click on the clips resource and then select copy as cURL
  1. Open the rails console or IRB
  2. clips = JSON.parse %(paste the index response)
  3. sms=clips.select{|clip| clip["heroku_app_name"]=="servemanager-pro"}
  4. slugs = sms.map{|clip| clip["slug"]}
  5. Then follow the instructions for doing the move.
  • You must grab the right DB resource name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment