arrow-up1137imageThey got me :(RNAi [he/him] to politics • 4 years agomessage-square48 Commentsfedilink
minus-squareeduardog3000 [he/him]hexbear7·edit-24 years ago Here is example of simple bash script: #!/bin/bash WP="$(find ~+ -type f -exec mimetype {} + 2>/dev/null | awk -F': +' '{ if ($2 ~ /^image\//) print $1 }' | sort -R | tail -30 | shuf -n 1)" dconf write /org/mate/desktop/background/picture-filename "'${WP}'" lmao link
minus-squarealcoholicorn [comrade/them, doe/deer]hexbear2·4 years agoThat is more painful to read than regex. link
minus-squareeduardog3000 [he/him]hexbear6·4 years agowdym, this is so easy to read: https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*) link
minus-squarealcoholicorn [comrade/them, doe/deer]hexbear2·edit-24 years agoYou joke, but that's very straightforward to me. https, or nothing :// www., or nothing 1-256 of these chars: [-a-zA-Z0-9@:%._+~#=] Until you get to a "." followed by: 1-6 of these chars:[a-zA-Z0-9()] Any line break 0+ of these chars: [-a-zA-Z0-9()@:%_+.~#?&//=] link
minus-squareeduardog3000 [he/him]hexbear2·4 years agoI mean, yeah it's really not too bad when you really dig into it. But it's still just a mess. Although your "https, or nothing" is actually "http, optionally s" That one isn't even completely right. It gets a lot of false positives AFAIK (example: https://..com). The real thing is even worse. link
#!/bin/bash WP="$(find ~+ -type f -exec mimetype {} + 2>/dev/null | awk -F': +' '{ if ($2 ~ /^image\//) print $1 }' | sort -R | tail -30 | shuf -n 1)" dconf write /org/mate/desktop/background/picture-filename "'${WP}'"
lmao
deleted by creator
That is more painful to read than regex.
wdym, this is so easy to read:
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
You joke, but that's very straightforward to me.
https, or nothing
://
www., or nothing
1-256 of these chars: [-a-zA-Z0-9@:%._+~#=]
Until you get to a "." followed by:
1-6 of these chars:[a-zA-Z0-9()]
Any line break
0+ of these chars: [-a-zA-Z0-9()@:%_+.~#?&//=]
I mean, yeah it's really not too bad when you really dig into it. But it's still just a mess.
Although your "https, or nothing" is actually "http, optionally s"
That one isn't even completely right. It gets a lot of false positives AFAIK (example:
https://..com
). The real thing is even worse.