This file contains 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 expectOne(array) { | |
if(array.length === 1) | |
return array[0]; | |
else | |
throw new Error("Expected one element, got " + array.length); | |
} | |
function findMediaTitle() { | |
var bag = expectOne(document.getElementsByClassName("playback-longpause-container")); |
This file contains 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
with builtins; | |
let | |
# evaluate expr, returning default on error | |
tryDefault = expr: default: | |
let res = (tryEval expr); | |
in if res.success then res.value else default; | |
isPython = pkg: pkg?name && (parseDrvName pkg.name).name == "python"; | |
hasPropagatedPython = pkg: |
This file contains 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
_nix_build_defexpr () { | |
local -a result | |
local -a queue=($1) | |
setopt local_options null_glob | |
while [[ ${#queue} > 0 ]]; do | |
local current=$queue[1] | |
shift queue | |
if [[ -e $current/default.nix ]]; then | |
result+=($current) | |
else |
NewerOlder