android
Android Rick_C137 4 days ago 100%
`chown` on a sdcard directory impossible...

Hi, I would like to change the owner of a directory on the sdcard `/sdcard/aDirectory` I have a terminal installed on my Android 10 (LineageOS 17) `com.android.terminal` `sudo` is not present so I use `su` and it works. ```bash su #Terminal was granted Superuser rights cd /sdcard chown 10:10 aDirectory #I don't get any error message. stat aDirectory #Uid (0/root) ``` So the owner stay **root** no matter what I'm doing, any ideas ?

20
12
android Android How terminal in, on Android
Jump
  • Rick_C137 Rick_C137 5 days ago 100%

    I've found the most simple way (for my case) adb shell 'a command'

    example

    adb shell ls /
    
    1
  • android Android How terminal in, on Android
    Jump
  • Rick_C137 Rick_C137 5 days ago 100%

    Thank you all for your input.. but it seem my question is still not fully answered...

    let me rephrase, I'm not looking to have a GUI to transfer files, but I would like to execute terminal command remotely (from my computer) to my android phone. Like SSH .

    So I've read that I can install a SSH server on my android phone.. (If you know some's (FLOSS), I'm all ears) Or if you know a better way than SSH I'm all ears too.

    Thanks.

    1
  • css CSS CSS, select an element that have div:not(something) possible ? [ solved ]
    Jump
  • Rick_C137 Rick_C137 2 weeks ago 100%

    I've found

    #container > div:not(div.barfoo)
    

    seem to do the trick..

    9
  • css
    CSS Rick_C137 2 weeks ago 100%
    CSS, select an element that have div:not(something) possible ? [ solved ]

    Hi everyone, I have something like this ```html <div id="container"> <div> <div class="foobar"></div> </div> <div> <div class="foobar"></div> </div> <div> <div class="foobar"></div> <div class="barfoo"></div> </div> <div> <div class="foobar"></div> </div> <div> <div class="foobar"></div> </div> <div> ``` I would like to select all the `#container > div` (the childs of container) that do not have a `div.barfoo` in their childs. is it possible with CSS ? I'm at ```css #container> div :not(div.barfoo) {} ``` but this is not working, and will select anyway `#container > div > div` Any ideas ?

    13
    2
    android
    Android Rick_C137 4 weeks ago 93%
    How terminal in, on Android

    Hi, I created another user on my custom rom Android (aka Multiple users) Unfortunately when doing so the system do not adapt the permission of the sdcard and some other directory, thus the new user can't access them :/ So I wanted to "remote" terminal into my android device from my computer. How are you achieving this ? ( without 3thparty apps please ! ) Thanks.

    14
    10
    librewolf
    LibreWolf Rick_C137 4 weeks ago 25%
    Mozilla - Devil Incarnate

    long but Interesting ! \ https://digdeeper.club/articles/mozilla.xhtml

    -14
    6
    librewolf
    LibreWolf Rick_C137 4 weeks ago 90%
    Is there a list of all the tweaks, changes between Firefox and LibreWolf ?

    Hi everyone, Is there somewhere a list of all the changes made compared to Firefox ? edit: ~~Sorry if it's been already asked over here, but it seem that Lemmy do not provide a search within a Community 😮~~ no, actually we can, there isn't a shortcut to make such a search. and no ability to limit the search to the titles.. ![](https://programming.dev/pictrs/image/03ba5c79-1976-4a22-9760-a96e9e3dd532.jpeg) \*Wubba Lubba dub-dub\*

    18
    1
    selfhosting
    Self-hosting Rick_C137 4 weeks ago 87%
    Nginx how enable CORS for multi origins ?

    cross-posted from: https://programming.dev/post/18360806 > Hi everyone, > > I would like to enable [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Glossary/CORS) on my Nginx server. for few origins (cors requestor)/domains. > > I've found this article https://www.juannicolas.eu/how-to-set-up-nginx-cors-multiple-origins that is nice, but not complete and on my browser seem really hard to read due to the layout 🤮 > > So I've opened a CodeBerg git repository for the good soul that want to perfect this piece of code the allow the most of use to use CORS with Nginx. > > https://codeberg.org/R1ckSanchez_C137/BestOfxxx/src/branch/main/Nginx/CORS_MultiDomains.py > > If you don't want to create an account on codeberg feel free to post your code here ! > > ```nginx > server { > # Server > > map "$http_origin" $cors { # map in Nginx is somewhat like a switch case in a programming language. > default ''; #Seem to set $cors to '' empty string if none of the follwing rexeg match ? > "~^https:\/\/([\w-_\.]+\.)?example.com$" "$http_origin"; > #regex domain match > # ~ mean I suppose the string is RegEx ? > # Need to come with a RegEx expression that match https://anything.example.com[optional ports and Query string ?X=Y] > "~^https:\/\/([\w-_\.]+\.)?example2.com$" "$http_origin"; #regex domain match > } > > > location /static { > > # if preflight request, we will cache it > if ($request_method = 'OPTIONS') { > add_header 'Access-Control-Max-Age' 1728000; #20 days > add_header 'Content-Type' 'text/plain charset=UTF-8'; > add_header 'Content-Length' 0; > return 204; #https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204 } > > if ($cors != "") { > add_header 'Access-Control-Allow-Origin' "$cors" always; # <-- Variable $cors > add_header 'Access-Control-Allow-Credentials' 'true' always; > add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; > add_header 'Access-Control-Allow-Headers' 'Accept, Authorization, Cache-Control, Content-Type, DNT, If-Modified-Since, Keep-Alive, Origin, User-Agent, X-Requested-With' always;} > > # configuration lines... > > } > } > > } > ``` > >

    6
    0
    selfhost
    Nginx how enable CORS for multi origins ?

    cross-posted from: https://programming.dev/post/18360806 > Hi everyone, > > I would like to enable [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Glossary/CORS) on my Nginx server. for few origins (cors requestor)/domains. > > I've found this article https://www.juannicolas.eu/how-to-set-up-nginx-cors-multiple-origins that is nice, but not complete and on my browser seem really hard to read due to the layout 🤮 > > So I've opened a CodeBerg git repository for the good soul that want to perfect this piece of code the allow the most of use to use CORS with Nginx. > > https://codeberg.org/R1ckSanchez_C137/BestOfxxx/src/branch/main/Nginx/CORS_MultiDomains.py > > If you don't want to create an account on codeberg feel free to post your code here ! > > ```nginx > server { > # Server > > map "$http_origin" $cors { # map in Nginx is somewhat like a switch case in a programming language. > default ''; #Seem to set $cors to '' empty string if none of the follwing rexeg match ? > "~^https:\/\/([\w-_\.]+\.)?example.com$" "$http_origin"; > #regex domain match > # ~ mean I suppose the string is RegEx ? > # Need to come with a RegEx expression that match https://anything.example.com[optional ports and Query string ?X=Y] > "~^https:\/\/([\w-_\.]+\.)?example2.com$" "$http_origin"; #regex domain match > } > > > location /static { > > # if preflight request, we will cache it > if ($request_method = 'OPTIONS') { > add_header 'Access-Control-Max-Age' 1728000; #20 days > add_header 'Content-Type' 'text/plain charset=UTF-8'; > add_header 'Content-Length' 0; > return 204; #https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204 } > > if ($cors != "") { > add_header 'Access-Control-Allow-Origin' "$cors" always; # <-- Variable $cors > add_header 'Access-Control-Allow-Credentials' 'true' always; > add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; > add_header 'Access-Control-Allow-Headers' 'Accept, Authorization, Cache-Control, Content-Type, DNT, If-Modified-Since, Keep-Alive, Origin, User-Agent, X-Requested-With' always;} > > # configuration lines... > > } > } > > } > ``` > >

    12
    1
    webdev
    Web Development Rick_C137 4 weeks ago 71%
    Nginx how enable CORS for multi origins ?

    Hi everyone, I would like to enable [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Glossary/CORS) on my Nginx server. for few origins (cors requestor)/domains. I've found this article https://www.juannicolas.eu/how-to-set-up-nginx-cors-multiple-origins that is nice, but not complete and on my browser seem really hard to read due to the layout 🤮 So I've opened a CodeBerg git repository for the good soul that want to perfect this piece of code the allow the most of use to use CORS with Nginx. https://codeberg.org/R1ckSanchez_C137/BestOfxxx/src/branch/main/Nginx/CORS_MultiDomains.py \ and \ https://codeberg.org/R1ckSanchez_C137/BestOfxxx/issues \ If you don't want to create an account on codeberg feel free to post your code here ! ```nginx server { # Server map "$http_origin" $cors { # map in Nginx is somewhat like a switch case in a programming language. default ''; #Seem to set $cors to '' empty string if none of the follwing rexeg match ? "~^https:\/\/([\w-_\.]+\.)?example.com$" "$http_origin"; #regex domain match # ~ mean I suppose the string is RegEx ? # Need to come with a RegEx expression that match https://anything.example.com[optional ports and Query string ?X=Y] "~^https:\/\/([\w-_\.]+\.)?example2.com$" "$http_origin"; #regex domain match } location /static { # if preflight request, we will cache it if ($request_method = 'OPTIONS') { add_header 'Access-Control-Max-Age' 1728000; #20 days add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; #https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204 } if ($cors != "") { add_header 'Access-Control-Allow-Origin' "$cors" always; # <-- Variable $cors add_header 'Access-Control-Allow-Credentials' 'true' always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Accept, Authorization, Cache-Control, Content-Type, DNT, If-Modified-Since, Keep-Alive, Origin, User-Agent, X-Requested-With' always;} # configuration lines... } } } ```

    3
    0
    linux Linux FACL, lost in it's behavior..
    Jump
  • Rick_C137 Rick_C137 1 month ago 100%
    setfacl -m m:r aFile
    #re set the mask
    

    solve the problem, but the question is: why the F**** this is happening !?

    2
  • linux
    Linux Rick_C137 1 month ago 46%
    FACL, lost in it's behavior..

    Hi, I got `FileA` that have `640` a `getfacl FileA` give me ```txt # file: FileA # owner: me # group: me user::rw- user:aUser:r-- group::r-x #effective:r-- mask::r-- other::--- ``` So it's give me the expected... but when I do ```bash chmod 600 aFile getfacl aFile ``` ```txt ... user:aUser:r-- #effective:--- ... mask::--- ... ``` Why suddenly `aUser` lost his ability to read the file !?!?!

    -1
    2
    linux Linux FACL, Get effective: ---
    Jump
  • Rick_C137 Rick_C137 1 month ago 100%

    Update, this is only happening when I copy files from a ~SMB share... :'(
    Otherwise it's correct...

    1
  • linux
    Linux Rick_C137 1 month ago 66%
    FACL, Get effective: ---

    Hi, I've set for a directory the following ```bash setfacl -dm u:aUser:r aDirectory #set new files to be readable by aUser cp ~/Desktop/aFile.txt /xx/xx/xx/aDirectory getfacl aFile.txt #the copied one ``` ```txt # file: aFile.txt # owner: me # group: me user::rwx user:aUser:r-- group::r-x mask::rwx other::rwx ``` So indeed we see the `aUser` got `r--` but ```bash stat aFile.txt ``` return ```txt (0777/-rwxrwxrwx) #!!!! ``` is that normal !!!!??? Thanks.

    4
    3
    linux Linux What vm software you use on linux
    Jump
  • Rick_C137 Rick_C137 1 month ago 100%
    5
  • linux Linux Recursive execute(x) required to enable nginx to read a directory !?? [ SOLVED ]
    Jump
  • Rick_C137 Rick_C137 2 months ago 100%

    Thank you all !

    Indeed setting execute perm on example, sub1, sub2, static

    The program/user have now access to the directory.

    In order words all the parents directory need at least execute in order to have access in the targeted directory...

    Now I gave 751 for static. Meaning than others (here nginx) cannot list the files within. But never the less it works
    the static files are appearing when requested (HTTP) but forbidding nginx to list the directory is changing something ? (performance/security)

    Thanks

    1
  • linux
    Linux Rick_C137 2 months ago 91%
    Recursive execute(x) required to enable nginx to read a directory !?? [ SOLVED ]

    Hi, I've noticed something quite odd, but I don't know if the problem come from Linux itself or nginx.. In order to grant nginx access to a directory let say your `static` see: https://stackoverflow.com/questions/16808813/nginx-serve-static-file-and-got-403-forbidden > These parent directories "/", "/root", "/root/downloads" should give the execute(x) permission to 'www-data' or 'nobody'. i.e. but it seem not only the direct parent need to be given XX5 but all the chain for example ```bash example └── sub1 └── sub2 └── static ``` it seem you need to set allow `others` to read and execute `5` all the parents example, sub1, sub2 Why is that !?? I've found it so akward and unsecure ! is there a workaround ? Thanks.

    19
    4
    webdev Web Development nginx, Default server do not works ! [solved]
    Jump
  • Rick_C137 Rick_C137 3 months ago 100%

    I wanted to have a default server that catch ~wrong DNS query to the server

    ::: spoiler Solution

    I don't know how to link to my previous lemmy post, so here it is again

    server {
        listen 443 ssl;
        server_name _;
        ssl_certificate /etc/nginx/ssl/catchall.crt;
        ssl_certificate_key /etc/nginx/ssl/catchall.key;
    
        error_page 404 /404_CatchAll.html;
    
        # Everything is a 404
        location / {
            return 404;
        }
    
        location /404_CatchAll.html {root /var/www/html/;}
    }
    

    :::

    1
  • webdev Web Development nginx, Default server do not works ! [solved]
    Jump
  • Rick_C137 Rick_C137 3 months ago 100%

    The full working code:

    server {
        listen 443 ssl;
        server_name _;
        ssl_certificate /etc/nginx/ssl/catchall.crt;
        ssl_certificate_key /etc/nginx/ssl/catchall.key;
    
        error_page 404 /404_CatchAll.html;
    
        # Everything is a 404
        location / {
            return 404;
        }
    
        location /404_CatchAll.html {root /var/www/html/;}
    }
    
    1
  • webdev Web Development nginx, Default server do not works ! [solved]
    Jump
  • Rick_C137 Rick_C137 3 months ago 100%

    ok I've found something that ~works !

    	server {
    		listen 443 ssl;
    		server_name _;
    		ssl_certificate /etc/nginx/ssl/catchall.crt;
    		ssl_certificate_key /etc/nginx/ssl/catchall.key;
    
    		error_page 404 /404.html; #at /var/www/html/
    
    		location /404.html {internal;}
    
    		return 404;
    	}
    

    so i get the default 404 html from nginx. but not the one that I specified error_page 404 /404.html; any ideas ?

    1
  • webdev Web Development nginx, Default server do not works ! [solved]
    Jump
  • Rick_C137 Rick_C137 3 months ago 100%

    line 5 you mean ?

    error_page 404 /404.html; #this one ?
    
    1
  • webdev
    Web Development Rick_C137 3 months ago 50%
    nginx, Default server do not works ! [solved]

    Hi, You might be aware that if a DNS request point your nginx server. and this later do not have a `server` rule for it , nginx will server anyway the first server found in your config file, WTF ! So I've found https://stackoverflow.com/a/23281442 ```nginx server { listen 80 default_server; server_name everythingelse; error_page 404 /404.html; # Everything is a 404 location / { return 404; #return the code 404 } # link the code to the file location = /404.html { #EDIT this line to make it match the folder where there is your errors page #Dont forget to create 404.html in this folder root /var/www/nginx/errors/; } } ``` But this is not working ! I made one of my domain pointing to this nginx server, and he still server another site aka `server` For httpS for http nothing appear.. Thanks.

    0
    6
    stallmanwasright
    Stallman Was Right Rick_C137 4 months ago 22%
    Is owning websites for private individuals become forbidden by our governments ?

    cross-posted from: https://programming.dev/post/13465911 > Hi, > > I'm confuse about those mandatory legal notices that governments impose for websites.. > > Before going further I invite you to read:\ > [A Declaration of the Independence of Cyberspace](https://www.eff.org/cyberspace-independence) \ > and \ > Discourse on Voluntary Servitude[^1] \ > > From all the articles[^2] that I read about *the mandatory notice to display for website* none of them reference the URL of their claim !! / of the legal text !! WTF[^links] > > Internet is by essence world wide, and when reading all those legal requirement it's seem that you should display notices for EVERY country ! > > it's seem also that if you own a private website, just for your own or family use, like for example a web file hosting services. (NextCloud etc..) > You should comply with the same requirement that are asked for company ! again... WTF ! > > Also I don't understand, why make mandatory those notices...(beside the scam (money) ) , I'll come back to this below. > > - If you want to buy something off a website, and this later do not mentions any legal address , contact info and so on, the responsibility to buy or not should be only yours. (For example, will you buy a yogurt in the supermarket if there were no brand, contact info on the packing or bill ?) > - if the state want to ~~censor~~ "regulate" a website on the *old internet*[^OI] there is plenty of way to know who is the author or at the very least where is it hosted.. > - if a website use/distribute a copyrighted&copy; elements. The right holder can do/contact in the following order: > - check the website for contact (if any) > - check the DNS record > - check the hosting > - contact the owner of the IP (IP are leased by company../ ISP ) > > > So there is no sense to ask everyone that extra heavy burden. > The only advantage is for law firm (and those cookies related firm) that make a profit out of it. I heard in my entourage peoples that had pay thousandth of $$ to generate those text, keep up to date etc.. even for small website. > > - If you think those legal notice are a good thing please do not hesitate to motivate your answer. > - If you have any good links about it, feel free to share. > - What are you doing your self on website of customer and/or for your private websites ? > - if you know a Lemmy community worth to share this post, step forward. > > Thanks... > > [^1]:https://en.wikipedia.org/wiki/Discourse_on_Voluntary_Servitude \ > https://archive.org/details/0000-00-00-00-etienne-de-la-boetie-00_202201/1548-00-00_Discourse%20on%20Voluntary%20Servitude_1942_org/mode/2up \ > -- > [^2]:https://elementor.com/blog/website-legal-requirements > https://www.websitepolicies.com/blog/legal-requirements-for-websites > [^OI]:The one that you are using now with the [domains scam](https://en.wikipedia.org/wiki/Domain_name). A future internet might be using TOR or GNU Name System > > [^links]: if you have those links feel free to share !

    -10
    3
    webdev
    Web Development Rick_C137 5 months ago 33%
    Is owning websites for private individuals become forbidden by our governments ?

    Hi, I'm confuse about those mandatory legal notices that governments impose for websites.. Before going further I invite you to read:\ [A Declaration of the Independence of Cyberspace](https://www.eff.org/cyberspace-independence) \ and \ Discourse on Voluntary Servitude[^1] \ From all the articles[^2] that I read about *the mandatory notice to display for website* none of them reference the URL of their claim !! / of the legal text !! WTF[^links] Internet is by essence world wide, and when reading all those legal requirement it's seem that you should display notices for EVERY country ! it's seem also that if you own a private website, just for your own or family use, like for example a web file hosting services. (NextCloud etc..) You should comply with the same requirement that are asked for company ! again... WTF ! Also I don't understand, why make mandatory those notices...(beside the scam (money) ) , I'll come back to this below. - If you want to buy something off a website, and this later do not mentions any legal address , contact info and so on, the responsibility to buy or not should be only yours. (For example, will you buy a yogurt in the supermarket if there were no brand, contact info on the packing or bill ?) - if the state want to ~~censor~~ "regulate" a website on the *old internet*[^OI] there is plenty of way to know who is the author or at the very least where is it hosted.. - if a website use/distribute a copyrighted&copy; elements. The right holder can do/contact in the following order: - check the website for contact (if any) - check the DNS record - check the hosting - contact the owner of the IP (IP are leased by company../ ISP ) So there is no sense to ask everyone that extra heavy burden. The only advantage is for law firm (and those cookies related firm) that make a profit out of it. I heard in my entourage peoples that had pay thousandth of $$ to generate those text, keep up to date etc.. even for small website. - If you think those legal notice are a good thing please do not hesitate to motivate your answer. - If you have any good links about it, feel free to share. - What are you doing your self on website of customer and/or for your private websites ? - if you know a Lemmy community worth to share this post, step forward. Thanks... ::: spoiler CrossPosted on: https://lemmy.ml/post/15583047 ::: [^1]:https://en.wikipedia.org/wiki/Discourse_on_Voluntary_Servitude \ https://archive.org/details/0000-00-00-00-etienne-de-la-boetie-00_202201/1548-00-00_Discourse%20on%20Voluntary%20Servitude_1942_org/mode/2up \ -- [^2]:https://elementor.com/blog/website-legal-requirements https://www.websitepolicies.com/blog/legal-requirements-for-websites [^OI]:The one that you are using now with the [domains scam](https://en.wikipedia.org/wiki/Domain_name). A future internet might be using TOR or GNU Name System [^links]: if you have those links feel free to share !

    -5
    1
    linux Linux Systemd wants to expand to include a sudo replacement
    Jump
  • Rick_C137 Rick_C137 5 months ago 50%

    Something worth reading regarding Systemd https://www.devuan.org/os/announce/ Cheers.

    0
  • webdev
    Web Development Rick_C137 7 months ago 57%
    Find a decent Internet v2 domain registrar

    Hi, Unfortunately I need to register a domain name for the "old" Internet. So this one with the **domain name scam**[^DomainScam] and so on.. So which registrar would you recommend that is the closed regarding the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) / GNU philosophy ? And then I hope the world, will migrate to something better than this WWW scam and I could get rid of this domain.. Thanks. [^DomainScam]: - https://www.namepros.com/threads/is-the-domain-industry-like-a-ponzi-scheme.725672 - https://www.w3.org/2014/strint/papers/65.pdf - https://www.gnunet.org/en - https://www.torproject.org - https://youbroketheinternet.org

    1
    3
    security Security How asymmetrically encrypt under windows ( CLI )
    Jump
  • Rick_C137 Rick_C137 7 months ago 100%

    I've gave a longer trial to gpg4win and it's very power full and easy to use ! Of course it's pointless to use such a nice tool on a none air-gaped Windows..

    For the others there is Gnu-Linux :)

    1
  • cybersecurity
    Cybersecurity Rick_C137 7 months ago 90%
    Should you allow username to use Apostrophe (aka quotes )

    cross-posted from: https://programming.dev/post/10497245 > Hi, > > For websites I've always restricted `username` to use [Apostrophe](https://en.wikipedia.org/wiki/Apostrophe) `'` and `"` and some times even space ` `. If a website necessitate special character then I prefer to create an additional DB field ~`DisplayName`. > > It's easier to forbid the use of Apostrophe, otherwise you will have to escape also your search query to match what has been recorded in the DB. > > On the topic I've this > https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense > > But if you have better documentation feel free to share :) > > Thanks >

    18
    9
    webdev
    Web Development Rick_C137 7 months ago 69%
    Should you allow username to use Apostrophe (aka quotes )

    Hi, For websites I've always restricted `username` to use [Apostrophe](https://en.wikipedia.org/wiki/Apostrophe) `'` and `"` and some times even space ` `. If a website necessitate special character then I prefer to create an additional DB field ~`DisplayName`. It's easier to forbid the use of Apostrophe, otherwise you will have to escape also your search query to match what has been recorded in the DB. On the topic I've this https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense But if you have better documentation feel free to share :) Thanks

    5
    5
    thunderbird Thunderbird Is it possible to sign a PDF with an OpenPGP key generated by Thunderbird ?
    Jump
  • Rick_C137 Rick_C137 7 months ago 100%

    I've received a lot of reactions on the original post: https://programming.dev/post/10465121

    But if someone is involved with the development of Thunderbird I think this is worth reading: https://programming.dev/comment/7677398

    For my part I will use the OpenPGP sigin tools for now.

    Cheers.

    2
  • linux Linux Is it possible to sign a PDF with an OpenPGP key generated by Thunderbird ?
    Jump
  • Rick_C137 Rick_C137 7 months ago 100%

    Thank you all for your quick reactions !!

    To summarize if I want to use the PDF built-in signing I will need to convert my OpenPGP into a X.509 cert otherwise I can simply use the OpenPGP file signing

    I want to stick to the UNIX Philosophy especially:

    Write programs that do one thing and do it well.

    So I will use the OpenPGP signing tool :)

    Thanks !

    3
  • thunderbird
    Thunderbird Rick_C137 7 months ago 100%
    Is it possible to sign a PDF with an OpenPGP key generated by Thunderbird ?

    cross-posted from: https://programming.dev/post/10465121 > Hi everyone, > > I was wondering if you know a way to use the generated OpenPGP key created trough Thunderbird to sign PDF's ? > > ([Devuan ](https://www.devuan.org/)distro) > > Thanks.

    5
    1
    linux
    Linux Rick_C137 7 months ago 97%
    Is it possible to sign a PDF with an OpenPGP key generated by Thunderbird ?

    Hi everyone, I was wondering if you know a way to use the generated OpenPGP key created trough Thunderbird to sign PDF's ? ([Devuan ](https://www.devuan.org/)distro) Thanks.

    32
    10
    html HTML How display an element from another page hosted on another sub domain ?
    Jump
  • Rick_C137 Rick_C137 7 months ago 100%

    You can interact with the HTML DOM with Python !!!!!

    1
  • javascript JavaScript How run validation on `input` that have a `value` set ?
    Jump
  • Rick_C137 Rick_C137 7 months ago 100%

    Thanks all for your input.

    My only workaround was to check programmatically all those input and set them with a setCustomValidity()

    Too bad there isn't a method to relaunch the validity across all the page :/

    Cheers

    1
  • javascript JavaScript How run validation on `input` that have a `value` set ?
    Jump
  • Rick_C137 Rick_C137 8 months ago 100%

    Thank @daisyKutter@lemmy.ml

    it's look like that that code only verify the form when submitting.. I need to check the validity when the element has been loaded.

    btw checkValidity() do not solve this issue as it return True when the length is longer than maxlength ! O_o I guess this is were is lying the "bug"

    ::: spoiler My two cent For me this is a huge flaw ! I don't understand how we (dev) are we still developing on "standard" that are so f*ck-up.. :::

    1
  • javascript JavaScript How run validation on `input` that have a `value` set ?
    Jump
  • Rick_C137 Rick_C137 8 months ago 100%

    Thank you @coffee_poops@sh.itjust.works that exactly my question.. how can I trigger the validation process again ?

    1
  • javascript JavaScript How run validation on `input` that have a `value` set ?
    Jump
  • Rick_C137 Rick_C137 8 months ago 100%

    It will not be digest to send all what I use for you to see it (it will lead to TL;DR)

    but here an elements (loaded with XHR that give the problem

    <input id="something" name="something" type="text" placeholder="aPlaceholder"  minlength="3" maxlength="32" value="this value is more than the limiation of 32 char" autofocus required>
    

    So normally this element should be invalid and a CSS selector of :invalid should match. but it's not the case because the browser seem to not run the validation check on loaded elements... !?

    if we edit manually the input , for example removing one character then the validation process kick-in and the CSS selector work etc..

    1
  • javascript
    JavaScript Rick_C137 8 months ago 100%
    How run validation on `input` that have a `value` set ?

    ~~ cross-posted from: https://programming.dev/post/9179830 ~~ > Hi, > > I'm loading some content with [XHR (aka Ajax)](https://en.wikipedia.org/wiki/XMLHttpRequest) the loaded `input` elements that have a invalid `value` assigned are not checked trough the [validation process](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation). > > so the `CSS` styling with `:invalid` is for example not working etc.. > > is there a way to force the validation process on those elements ? > > edit: Browser is Firefox > > Thanks.

    7
    9
    css
    CSS Rick_C137 9 months ago 66%
    Hex Color To CSS Filter, Converter

    cross-posted from: https://programming.dev/post/7667731 > Hi, > > As CSS do not have a color-overlay[^1] filter. > > There is some heavy work around: > > https://isotropic.co/tool/hex-color-to-css-filter/ > > that use a combination of CSS filter to target the desired color... > > Those online calculators are neat, but I would like an offline version, in case the provided one become inaccessible. > > I've downloaded the zip of https://codepen.io/sosuke/pen/Pjoqqp > > But it doesn't work locally.. :/ > > So I would like to know, if someone know one in 🐍 Python ? or how can I make one then ? > > Or if someone know another way to have the color-overlay[^1] effect in html\css, I'm all ears ! > > Thank. > > > [^1]: To apply like in Photoshop a color on the shape of the image (so not on the parts that have transparency.

    1
    0
    python
    Python Rick_C137 9 months ago 75%
    Hex Color To CSS Filter, Converter

    Hi, As CSS do not have a color-overlay[^1] filter. There is some heavy work around: https://isotropic.co/tool/hex-color-to-css-filter/ that use a combination of CSS filter to target the desired color... Those online calculators are neat, but I would like an offline version, in case the provided one become inaccessible. I've downloaded the zip of https://codepen.io/sosuke/pen/Pjoqqp But it doesn't work locally.. :/ So I would like to know, if someone know one in 🐍 Python ? or how can I make one then ? Or if someone know another way to have the color-overlay[^1] effect in html\css, I'm all ears ! Thank. [^1]: To apply like in Photoshop a color on the shape of the image (so not on the parts that have transparency.

    2
    0
    security Security How asymmetrically encrypt under windows ( CLI )
    Jump
  • Rick_C137 Rick_C137 9 months ago 100%

    Hey @hatedbad@lemmy.sdf.org

    Thanks for your output, but RSA seem to not be recommended anymore, dig on a search engine..

    1
  • lemmytips
    LemmyTips Rick_C137 10 months ago 11%
    Make Lemmy thrive, Privacy &amp; Censorship.

    cross-posted from: https://programming.dev/post/6788379 > Hi, > > As we might all know ( Early adopter of Lemmy ). > Lemmy has been (also) made to give an alternative to the censor kingdom of Reddit ! > https://en.wikipedia.org/wiki/Lemmy_(software) > > And further more Lemmy is [fLOSS](https://en.wikipedia.org/wiki/FOSS) 😍 > > Great ! but watch out ! we don't want that Lemmy take the same path as Reddit did ! ( hopefully this is limited as it run as a ~Federated model ) > > Anyways, I believe to avoid censorship and jeopardize users privacy the following should be considered by Instance admins and moderators. > > - Avoid as possible a mandatory email to register > Doing so is not reducing spam or whatever you're afraid ! > It's limiting users to create account that preserve their anonymity ! > If you don't know why anonymity is important I'll suggest you to dig this website to start with https://www.laquadrature.net/en/support/#chiffrement > BTW if I couldn't be anonymous, I wouldn't write any post on Lemmy, as I'm not living in a free country !! > Look on other instances some admin have found clever way to circumvent bots without the need of an email. > > - Also Lemmy don't require too much of moderation ! as any user can use the **block** feature in their options ![](https://programming.dev/pictrs/image/5dc1c53f-7478-4e1a-87a6-463c2ad9618b.png) > so you should not censor content in behave of others ! > > If the freedom of expression is limited to the ideas that we like, it is not freedom of expression. > [Noam Chomsky.](https://en.wikipedia.org/wiki/Noam_Chomsky_bibliography_and_filmography#Filmography) > > Cheers,

    -7
    0
    android Android An easy way to Install AOSP on Smartphone... ? FOSS
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    @crystal@feddit.de I didn't know about GrapheneOS too bad it only work Pixel phones (that are also owned by Google ! ) So If I'm against Google for all what they do https://degooglisons-internet.org/en/ I'll certainly not give them money !

    (Finding and importing a phone is something you have to do even when using the stock OS.)

    True, but you will do it multiple time if the phone that your looking for doesn't have an available ROM somewhere..

    1
  • android Android An easy way to Install AOSP on Smartphone... ? FOSS
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    Indeed, but in AOSP there is no GMS and that already better !

    2
  • android Android An easy way to Install AOSP on Smartphone... ? FOSS
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    Yes I'm talking about it in my initial post.. but it's not changing the six steps

    ::: spoiler six steps

    1. Found a smartphone ( with the spec you want and in your budget )
    2. Check if you can have\import it in your “country”
    3. Check if someone already cook a ROM that support that specific model
    4. or create it by yourself (even more time consuming )
    5. Sometimes: bypass any protection that prevent to install another ROM !
    6. Finally install the ROM’s, boot loader etc… :::
    1
  • android
    Android Rick_C137 10 months ago 66%
    An easy way to Install AOSP on Smartphone... ? FOSS

    cross-posted from: https://programming.dev/post/6749271 > Hi, > > ::: spoiler Intro about XDA forum (skippable) > > I was using a lot `xda-developers.com` for anything that was related to Android development and phone support. ([ROM ](https://en.wikipedia.org/wiki/Custom_firmware#Android)etc..) > > But it became rotten --> > > ![](https://programming.dev/pictrs/image/0b30b1df-4a81-4d24-9a1c-1d5e62bb3650.png) 😱 > > ![](https://programming.dev/pictrs/image/75cdc0d7-bfe7-4161-ba48-57fca51f4603.png) 😱 > ::: > > ::: spoiler Current situation ton Install another ROM ~OS > > As you may know, in order to install another [ROM ](https://en.wikipedia.org/wiki/Custom_firmware#Android) > For example to get rid of [Google](https://en.wikipedia.org/wiki/Google_Mobile_Services) ! 👿 > > You need one that is specifically build for your devices > for example: https://wiki.lineageos.org/devices/ > > This is so inefficient ! > > You might have heard of **Treble** that focus on this problem > - https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html > - https://www.hsc.com/resources/blog/what-is-android-treble/ > > sadly it's made by google 👿 and I doubt that they will release all the code. We will see. > > If you don't know what is [AOSP](https://en.wikipedia.org/wiki/Android_(operating_system)#Development) &lt;-- > > > ::: > > ::: spoiler The question : How to install AOSP on a "Supported device" > > I've always use only google-free smartphone ! But OMG it's time consuming. > 1. Found a smartphone ( with the spec you want and in your budget ) > 2. Check if you can have\import it in your "country" > 3. Check if someone already cook a ROM that support that specific model > 4. or create it by yourself (even more time consuming ) > 5. Sometimes: bypass any protection that prevent to install another ROM ! > 6. Finally install the ROM's, boot loader etc... > > At this time, when it seem that **Treble** is not there yet... > Do you have a quicker path\Solution ? > > Thanks > :::

    4
    1
    android
    Android Rick_C137 10 months ago 89%
    An easy way to Install AOSP on Smartphone... ? FOSS

    cross-posted from: https://programming.dev/post/6749271 > Hi, > > ::: spoiler Intro about XDA forum (skippable) > > I was using a lot `xda-developers.com` for anything that was related to Android development and phone support. ([ROM ](https://en.wikipedia.org/wiki/Custom_firmware#Android)etc..) > > But it became rotten --> > > ![](https://programming.dev/pictrs/image/0b30b1df-4a81-4d24-9a1c-1d5e62bb3650.png) 😱 > > ![](https://programming.dev/pictrs/image/75cdc0d7-bfe7-4161-ba48-57fca51f4603.png) 😱 > ::: > > ::: spoiler Current situation ton Install another ROM ~OS > > As you may know, in order to install another [ROM ](https://en.wikipedia.org/wiki/Custom_firmware#Android) > For example to get rid of [Google](https://en.wikipedia.org/wiki/Google_Mobile_Services) ! 👿 > > You need one that is specifically build for your devices > for example: https://wiki.lineageos.org/devices/ > > This is so inefficient ! > > You might have heard of **Treble** that focus on this problem > - https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html > - https://www.hsc.com/resources/blog/what-is-android-treble/ > > sadly it's made by google 👿 and I doubt that they will release all the code. We will see. > > If you don't know what is [AOSP](https://en.wikipedia.org/wiki/Android_(operating_system)#Development) &lt;-- > > > ::: > > ::: spoiler The question : How to install AOSP on a "Supported device" > > I've always use only google-free smartphone ! But OMG it's time consuming. > 1. Found a smartphone ( with the spec you want and in your budget ) > 2. Check if you can have\import it in your "country" > 3. Check if someone already cook a ROM that support that specific model > 4. or create it by yourself (even more time consuming ) > 5. Sometimes: bypass any protection that prevent to install another ROM ! > 6. Finally install the ROM's, boot loader etc... > > At this time, when it seem that **Treble** is not there yet... > Do you have a quicker path\Solution ? > > Thanks > :::

    22
    4
    android
    Android Rick_C137 10 months ago 50%
    An easy way to Install AOSP on Smartphone... ? FOSS

    Hi, ::: spoiler Intro about XDA forum (skippable) I was using a lot `xda-developers.com` for anything that was related to Android development and phone support. ([ROM ](https://en.wikipedia.org/wiki/Custom_firmware#Android)etc..) But it became rotten --> ![](https://programming.dev/pictrs/image/0b30b1df-4a81-4d24-9a1c-1d5e62bb3650.png) 😱 ![](https://programming.dev/pictrs/image/75cdc0d7-bfe7-4161-ba48-57fca51f4603.png) 😱 ::: ::: spoiler Current situation to Install another ROM ~OS As you may know, in order to install another [ROM ](https://en.wikipedia.org/wiki/Custom_firmware#Android) For example to get rid of [Google](https://en.wikipedia.org/wiki/Google_Mobile_Services) ! 👿 You need one that is specifically build for your devices for example: https://wiki.lineageos.org/devices/ This is so inefficient ! You might have heard of **Treble** that focus on this problem - https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html - https://www.hsc.com/resources/blog/what-is-android-treble/ sadly it's made by google 👿 and I doubt that they will release all the code. We will see. If you don't know what is [AOSP](https://en.wikipedia.org/wiki/Android_(operating_system)#Development) and [this article too](https://www.androidauthority.com/aosp-explained-1093505/) ::: ::: spoiler The question : How to install AOSP on a "Supported device" I've always use only google-free smartphone ! But OMG it's time consuming. 1. Found a smartphone ( with the spec you want and in your budget ) 2. Check if you can have\import it in your "country" 3. Check if someone already cook a ROM that support that specific model 4. or create it by yourself (even more time consuming ) 5. Sometimes: bypass any protection that prevent to install another ROM ! 6. Finally install the ROM's, boot loader etc... At this time, when it seem that **Treble** is not there yet... Do you have a quicker path\Solution ? Thanks :::

    0
    3
    programming Programming How send emails trough CLI (Windows) ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    Has I found nothing, I've write a piece of code in Python 🐍 ! and compile it for Windows..

    3
  • programming Programming How send emails trough CLI (Windows) ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    Thank you @Vilian@lemmy.ca Seem great, I'll keep it for later :)

    But not for what I need now, as

    Mutt is a small but very powerful text-based mail client for Unix operating systems

    and it's a "full" client, I need just the SMTP functionality.

    3
  • programming Programming How send emails trough CLI (Windows) ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    yes, it's been years that I'm using CMD and as I'm planning get rid of windows there is no point for me to learn it.

    1
  • meta Programming.dev Meta Community Programming stuck ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 33%

    OMG that too bad ! Lemmy that is federated and LOSS use github to track the bugs :/ Too bad I don't have an account. So anyone, feel free to report this bug. Thanks.

    -1
  • lemmy Lemmy Community Programming stuck ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 33%

    see my comment in the original post ( https://programming.dev/post/6111023) for more info on the suspected bug.

    -1
  • lemmy
    Lemmy Rick_C137 10 months ago 81%
    Community Programming stuck ?

    cross-posted from: https://programming.dev/post/6111023 > Hi, > > I'm trying to post on: !programming@programming.dev > > but it seem stuck > > ![](https://programming.dev/pictrs/image/e585295d-db67-4c08-82e8-ae286efa6e87.png) > >

    7
    1
    meta Programming.dev Meta Community Programming stuck ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    ok I manage to send my post ! (it look like a lemmy bug... , do you know where to report it ? )

    it seem that lemmy didn't support the following

    2
  • programming
    Programming Rick_C137 10 months ago 90%
    How send emails trough CLI (Windows) ?

    Hi everyone, Before I was using [SendEmail](http://caspian.dotconf.net/menu/Software/SendEmail/) but it seem that it's not supporting TLSv1.3 :/ too bad because the SMTP server that I would like to use require it. Do you have any solution ( Windows ) to send emails (TLSv1.3 supported) trough the [CLI](https://en.wikipedia.org/wiki/Command-line_interface)? Not powerShell ! but `CMD`

    17
    10
    meta Programming.dev Meta Community Programming stuck ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    and weirdly, I can post here...

    2
  • meta
    Programming.dev Meta Rick_C137 10 months ago 100%
    Community Programming stuck ?

    Hi, I'm trying to post on: !programming@programming.dev but it seem stuck ![](https://programming.dev/pictrs/image/e585295d-db67-4c08-82e8-ae286efa6e87.png)

    6
    7
    security Security How asymmetrically encrypt under windows ( CLI )
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    not yet, I didn't find enough documentation about that topic.

    1
  • security
    Security Rick_C137 10 months ago 100%
    How asymmetrically encrypt under windows ( CLI )

    Hi, How can we (under Windows...) encrypt file (or stdout) asymmetrically ? (best will be with [ECC](https://en.wikipedia.org/wiki/Elliptic-curve_cryptography)) I see I'm not alone with this question https://security.stackexchange.com/questions/86721/can-i-specify-a-public-key-file-instead-of-recipient-when-encrypting-with-gpg Apparently with GnuPG (bin for Windows) it's not working the best, you have first to import the public key .. And ideas, or alternatives ? Thanks.

    4
    5
    security Security WTF website certificates chain of trust...
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    If the computer of the Visitor is already compromised ! your simulation can stop there I think...

    My scenario assume that the visitor computer is not compromised.

    But let say his traffic get intercepted. Sure a hacker can send his PubKey (2) but in (3) the visitor (should) have already the PubKey of one (or few) verification server. So it should not be possible for an hacker to interfer with the communication (3) right ?

    1
  • security Security WTF website certificates chain of trust...
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    and what about something like this.

    1. The visitor connect on the website
    2. he receive the public key
    3. The key ( it's hash ) is compared with at least two "verification" server , if they all return a positive match, the visitor can use the pub key to initiate.

    The "verification servers" grab the public key directly from the Web server.

    Any suggestions, ideas ?

    1
  • security Security WTF website certificates chain of trust...
    Jump
  • Rick_C137 Rick_C137 10 months ago 50%

    So maybe the solution relies trough a blockchain ?

    or something that from scratch mind privacy, and decentralization ? Like TOR

    0
  • security Security WTF website certificates chain of trust...
    Jump
  • Rick_C137 Rick_C137 10 months ago 33%

    Thanks for you reaction @breakingcups@lemmy.world

    1. Yes trough Dnssec, or something else ?

    2. Maybe we should go toward a blockchain ? but maybe it's overkill ?

    -1
  • html HTML How display an element from another page hosted on another sub domain ?
    Jump
  • Rick_C137 Rick_C137 10 months ago 100%

    @UFODivebomb@programming.dev & @ExperimentalGuy@programming.dev

    Thank you for your input !

    I've finally used been forced to use https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API and DOMParser().parseFromString()

    I say forced, because so far it's only that Prehistoric JS available for the front-end, HOPEFULLY there is some coming kick-ass technology to get rid of JS --> https://brython.info ❤️

    2
  • privacy
    Privacy Rick_C137 10 months ago 40%
    WTF website certificates chain of trust...

    cross-posted from: https://programming.dev/post/6002270 > Hi, > > If you don't know how work the `chain of trust` for the http**S** > > You might want to watch this video > https://invidious.privacydev.net/watch?v=qXLD2UHq2vk > ( if you know a better one I'm all ears ) > > So in my point of view this system have some huge concerns ! > > 1. You need to relies to a preinstalled store certificate in your system or browser... > Yeah but do you know those peoples ??!! it might seem weird, but actually you should TRUST people that YOU TRUST/KNOW !! > > Here an extract from the certificate store om Firefox on Windows. > > ![](https://programming.dev/pictrs/image/8e39f569-386c-4e06-8dde-a35cd457548a.png) > > I do not know ( personally ) any of those COMMERCIAL company ! > > 2. Of course we could use Self-certificate but this is not protecting against Man-in-the-middle_attack . Instead of using a chain (so few 3th party involved , so increasing the attack surface ! ) why not using something simpler !? like for example > * a DNS record that hold the HASH of the public key of the certificate of the website ! > * a decentralized or federated system where the browser could check those hash ? > > > Really I don't understand why we are still using a `chain of trust` that is > 1. not trusted > 2. increase the surface of attack > 3. super complex compare to my proposals ? > > Cheers, > > > > > > ::: spoiler Why I don't use the term SSL > Because actually httpS now use TLS not anymore ssl > https://en.wikipedia.org/wiki/Transport_Layer_Security > :::

    -1
    0
    security
    Security Rick_C137 10 months ago 22%
    WTF website certificates chain of trust...

    Hi, If you don't know how work the `chain of trust` for the http**S** You might want to watch this video https://invidious.privacydev.net/watch?v=qXLD2UHq2vk ( if you know a better one I'm all ears ) So in my point of view this system have some huge concerns ! 1. You need to relies to a preinstalled store certificate in your system or browser... Yeah but do you know those peoples ??!! it might seem weird, but actually you should TRUST people that YOU TRUST/KNOW !! Here an extract from the certificate store om Firefox on Windows. ![](https://programming.dev/pictrs/image/8e39f569-386c-4e06-8dde-a35cd457548a.png) I do not know ( personally ) any of those COMMERCIAL company ! 2. Of course we could use Self-certificate but this is not protecting against Man-in-the-middle_attack . Instead of using a chain (so few 3th party involved , so increasing the attack surface ! ) why not using something simpler !? like for example * a DNS record that hold the HASH of the public key of the certificate of the website ! * a decentralized or federated system where the browser could check those hash ? Really I don't understand why we are still using a `chain of trust` that is 1. not trusted 2. increase the surface of attack 3. super complex compare to my proposals ? Cheers, ::: spoiler Why I don't use the term SSL Because actually httpS now use TLS not anymore ssl https://en.wikipedia.org/wiki/Transport_Layer_Security :::

    -5
    11
    html
    HTML Rick_C137 11 months ago 100%
    How display an element from another page hosted on another sub domain ?

    Hi, I would like to display an element (div) of another web page, hosted on a owned sub domain.. I was planning to use [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe), but it seem that `iframe` only allow to grab the entire page... any ideas ? Thanks.

    2
    5
    privacy Privacy Is it possible to make windows 10 more Private?
    Jump
  • Rick_C137 Rick_C137 12 months ago 60%

    and a True Linux ! not one that has been "infected" with parts that do not respect The Four Essential Freedoms of Free Software

    So avoid Ubuntu for example..

    have a look a this video https://www.fsf.org/blogs/rms/20140407-geneva-tedx-talk-free-software-free-society/

    And for a Linux distrio have a look at https://www.devuan.org 💓

    and about windows --> https://itvision.altervista.org/why-windows-10-sucks.html

    1