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
// Find the sheet music images on the page | |
const elements = document.getElementsByClassName('split-image'); | |
// Check that there are actually images on the page | |
if (elements.length === 0) { | |
console.error('No images found'); | |
} else { | |
// If images were found, extract the base url from the 1st one | |
const imageUrl = elements[0].src; | |
const imageIdMatch = /\/sheets\/([\w\d]+)\//; |
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
#!/usr/bin/env ruby | |
# A sample use of optparse to parse command line arguments/flags | |
# Sample run: | |
# $> ./db_backup.rb -u bijan.hoomand --password blahblah -s local --verbosity 3 | |
# {:user=>"bijan.hoomand", :password=>"blahblah", :server=>"127.0.0.1", :verbosity=>3} | |
# | |
# $> ./db_backup.rb -u bijan --password blahblah --server dev -v 5 --iteration | |
# ./db_backup.rb:40:in `<main>': invalid argument: -u bijan (OptionParser::InvalidArgument) |
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
# alias:northwind | |
db1.example.com:5432:northwind:postgres:hunter2 | |
# alias:mainframe | |
db1.example.com:5432:mainframe:dave:password123 | |
db1.example.com:5432:unaliased:postgres: |