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
// ==UserScript== | |
// @name select all button on GMail basic HTML client | |
// @include /^https?://mail\.google\.com/mail/u/0/h/.*/ | |
// ==/UserScript== | |
const inputs = document.querySelector("form[name='f'] table tr td") | |
if (inputs) { | |
const selectall = document.createElement("input"); | |
selectall.type = "checkbox"; | |
selectall.onchange = function(e) { |
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
#!/bin/sh -- | |
# \ | |
exec jq -nsRrf "$0" --args -- "$@" | |
def path2gronpath: | |
reduce .[] as $k ("json"; . + ($k | | |
if type == "number" or . == "" or test("^[0-9]|[^0-9a-zA-Z_]") | |
then @json "[\(.)]" | |
else ".\(.)" | |
end)); |
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
#include <errno.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <bash/builtins.h> | |
#include <bash/shell.h> | |
#include <bash/builtins/bashgetopt.h> | |
#include <bash/builtins/common.h> |
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
#include <errno.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <spawn.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
extern char **environ; |
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
1s/^/1 / | |
2,$g/^/-t -\ | |
s/ .*//\ | |
s/^9*$/0&/\ | |
t .\ | |
s/^.*[^9]\(9*\)$/\1 /\ | |
s/9/0/g\ | |
-s/9*$//\ | |
s/8$/9/\ | |
s/7$/8/\ |
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
#!/bin/sh -- | |
# \ | |
exec jq -Crf "$0" -- "$@" | |
def children: | |
objects | | |
.path as $p | | |
(.firstChild | objects | .path = $p + "/1"), | |
(.secondChild | objects | .path = $p + "/2") | | |
select(has("id")); |
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
#!/bin/bash -- | |
# https://lists.gnu.org/archive/html/bug-bash/2022-05/msg00052.html | |
bashrematch_push () { | |
local BASH_REMATCH a | |
for a | |
do [[ $a =~ .* ]] | |
done | |
} | |
bashrematch_pop () { |
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
#!/bin/sh -- | |
# \ | |
exec jq --unbuffered --stream -rn --args -f "$0" -- "$@" | |
$ARGS.positional | | |
if length != 1 then | |
@json "Invalid arguments: \(.).\n" | halt_error(2) | |
else . end | | |
( | |
.[0] | |
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
#!/bin/bash -- | |
if [[ $# != 1 ]]; then | |
printf >&2 'Usage: jcsvid URL\n' | |
exit 2 | |
fi | |
eval -- "$(curl -LSgs -- "$1" | xj | jq -r ' | |
first( | |
.. | .video? | arrays | |
NewerOlder