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/perl | |
| # A replacement for Sublime Text 2's built-in "subl" command-line utility, | |
| # which forces files into new windows regardless of prefs. | |
| # by Joseph Huckaby, 2012 | |
| use strict; | |
| use Cwd qw/abs_path/; | |
| use FileHandle; |
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
| function parseQueryString(url) { | |
| // parse query string into key/value pairs and return as object | |
| var query = {}; | |
| url = (url || location.search).replace(/^.*\?/, '').replace(/([^\=]+)\=([^\&]*)\&?/g, function(match, key, value) { | |
| query[key] = decodeURIComponent(value); | |
| return ''; | |
| } ); | |
| return query; | |
| } |
NewerOlder