This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DataGrip extension to export results to markdown. | |
* The markdown table format is supported by Github and Jira. I haven't tested others. | |
* | |
* Tested on DataGrip 2016.2.2 | |
* - Open the File view. View -> Tool Windows -> Files | |
* - Activate the "Scratches" tab. You should see "Files", "Scopes", and "Scratches". | |
* - Copy this file to Extensions/Database Tools and SQL/data/extractors/Markdown.JavaScript.md.js | |
* - Run a query with some results. | |
* - Change the export format to Markdown.JavaScript.md.js and click "To Clipboard". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Metronome | |
def self.start(bpm: 120) | |
loop do | |
print "\a" | |
sleep (60 / bpm.to_f) | |
end | |
rescue Interrupt | |
puts "Exiting." | |
end | |
end |