First, find the URL to your db on Heroku:
$ heroku config:get DATABASE_URL
postgres://yada:[email protected]:5432/123
Then transfer from the heroku db to your local db:
First, find the URL to your db on Heroku:
$ heroku config:get DATABASE_URL
postgres://yada:[email protected]:5432/123
Then transfer from the heroku db to your local db:
POST a json {"author":[null]}
to server via AJAX request or some other Http Tool.
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept exploit for Rails Unsafe Query Generation (CVE-2013-0155) | |
# | |
# ## Advisory | |
# | |
# https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/t1WFuuQyavI | |
# | |
# ## Synopsis | |
# |
# Hack below line in canvg.js in svg.parseXml function before deal with the XML | |
xml = xml.replace(/xmlns=\"http:\/\/www\.w3\.org\/2000\/svg\"/, ''); |
# to invoke below code will pupup a download window and allow you to download a canvas as PNG file. | |
img_PNG = Canvas2Image.saveAsPNG(canvas); |
pushToServer: ()-> | |
html2canvas([$(".hidden_container")[0]],{ | |
onrendered: (canvas)=> | |
strDataURI = canvas.toDataURL() | |
@temp_container.children().remove() | |
@temp_container.hide() | |
$.ajax | |
url: '/svg/create' | |
data: {svg: "#{strDataURI}"} |
svg = $('svg').parent().html() | |
canvg('canvas', svg) | |
canvas = document.getElementById("canvas") | |
img_PNG = Canvas2Image.saveAsPNG(canvas, true) | |
$('.chart').html(img_PNG) |
svg = $('svg').parent().html() | |
canvg('canvas', svg) | |
canvas = document.getElementById("canvas") | |
img_PNG = "<img src='#{canvas.toDataURL()}' />" | |
$('.chart').html(img_PNG) |
<!-- #canvas is to store the generated SVG information --> | |
<canvas id="canvas" style="display:none;"></canvas> | |
<div class="title"> | |
Religion Population 2010 | |
<span class="download individual" title="download chart"></span> | |
<span class="share individual" title="share chart"></span> | |
</div> | |
<div class="chart"> |