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
# .editorconfig (not found) |
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
regexLib = { | |
multiLineCComments: a("/\\*.*?\\*/", "gs"), | |
singleLineCComments: /\/\/.*$/gm, | |
singleLinePerlComments: /#.*$/gm, | |
doubleQuotedString: /"([^\\"\n]|\\.)*"/g, | |
singleQuotedString: /'([^\\'\n]|\\.)*'/g, | |
multiLineDoubleQuotedString: a('"([^\\\\"]|\\\\.)*"', "gs"), | |
multiLineSingleQuotedString: a("'([^\\\\']|\\\\.)*'", "gs"), | |
xmlComments: a("(<|<)!--f.*?--(>|>)", "gs"), | |
url: /\w+:\/\/[\w-.\/?%&=:@;#]*/g, |
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
/***************************************************************************/ | |
// Vanilla Javascript Data Gathering | |
// Used to collect data without using a framework or library tools | |
// TODO: Get all X on a page (img url, a href, script src etc) | |
// REF: https://drafts.csswg.org/cssom/ | |
// GET ALL IDS ON PAGE | |
function getAllIds() { |
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
# Machine currently playing goes into sleep mode during playback | |
# A simple curl request to see if this machine is currently active | |
# If true reset wake timer and set timer to run again at t-1 wake timer | |
# Hooks: Run script at spotify application launch and run at machine wake | |
# https://developer.spotify.com/web-api/endpoint-reference/ | |
# ref: https://developer.spotify.com/web-api/console/get-user-player/ | |
# example: | |
curl -X GET "https://api.spotify.com/v1/me/player" -H "Accept: application/json" -H "Authorization: Bearer <API-KEY>" |
NewerOlder