🌉 bridged from @trymeout@lemmy.world by Tidepool
trymeout
@trymeout.lemmy.world.ap.tdpl.io
SideX: VSCode without Electron, using Tauri instead
I was searching for an IDE like VSCode or Atom or Pulsar and found this. This looks cool. Not sure if most or many VSCode extensions will work with this fork.
I never liked Electron apps due to their bloat and always prefer Tauri apps.
Zed looks like a cool IDE but it is written in Rust and Rust is great for performance but for extension adoption, I can see this being an issue since more people know HTML/CSS/JS over Rust and I would image would prefer writing an extension in HTML/CSS/JS over Rust.
Therefore a good Tauri based IDE that is similar to the Electron IDEs would be interesting and perhaps will be good enough for performance, and developer friendly.
github.com
Is the master secret for SLIP39 (Shamir Backup) generated the same way as Entropy is for BIP39?
When playing around with these tools (Which I know you should not use for your phrase to store funds), it seems to me the entropy field which can be made visible by checking off the "Show entropy details" box in the BIP39 tool and the master secret field in the SLIP39 tool are the same. They are both hexadecimal values and can be 128 or 256 bits. Is the SLIP39 master secret also generated by entropy when generating a SLIP 39 Shamir Backup? How is the master secret generated? I found this article explaining step by step how a BIP39 phrase is generated and it starts with entropy, wouldn't SLIP39 be the same by starting with entropy? https://medium.com/coinmonks/mnemonic-generation-bip39-simply-explained-e9ac18db9477 https://iancoleman.io/bip39/ https://iancoleman.io/slip39/
Symfony Mailer - Encrypted Messages?
cross-posted from: https://lemmy.world/post/48266338
I am learning how to use Symfony Mailer and am a bit lost on the encrypting message section. This is my simple code below which works in sending the email.
<?php require 'vendor/autoload.php'; const FROM = 'me@example.com'; const TO = 'example@email.com'; const SUBJECT = 'My Subject'; const MESSAGE = 'Hello World'; const DSN = 'smtp://localhost:1025'; $transport = \Symfony\Component\Mailer\Transport::fromDsn(DSN); $mailer = new \Symfony\Component\Mailer\Mailer($transport); $email = (new \Symfony\Component\Mime\Email()) ->from(FROM) ->to(TO) ->subject(SUBJECT) ->text(MESSAGE); $encrypter = new \Symfony\Component\Mime\Crypto\SMimeEncrypter('my-certificate.crt'); $encryptedEmail = $encrypter->encrypt($email); try { $mailer->send($encryptedEmail); } catch (\Symfony\Component\Mailer\Exception\TransportExceptionInterface $error) { echo 'Unable to send email' . PHP_EOL; }And this is how I generated the certificate and key...
openssl genrsa -aes256 -out my-certificate.key 4096 openssl req -new -x509 -days 29220 -key my-certificate.key -out my-certificate.crt
I am able to receive the email using SMTP tools like Mailpit. My two questions are... 1. My emails are encrypted using the certificate, but shouldn't it be done using PGP? 2. How do I decrypt the email with SMTP testing tool or any online or CLI tool? I tried to decrypt the email and could not decrypt it even though I have all of the keys.
WebSpace - Web Apps, Websites And PWAs Manager!
cross-posted from: https://lemmy.world/post/48011911
I found this very promising app that looks like it can be an alternative to Ferdium, Rambox, Franz, Hamsket. WebSpace is an app that brings websites and web apps together in one organized, streamlined interface. Any web app you can think off can be used in WebSpace in its own web instance instead of your main web browser. Basically it is a web browser but for web apps you use often and may want running in the background. For use degoogled users who use website, web apps, PWAs over native apps, this makes using these services much easer. WebSpace also adds many privacy features such as ad blocking and filtering, cookie isolation, and more. Also it is written in Flutter! Meaning this could become available on desktop in the future! One app, one codebase for all major OSes! Check it out and contribute!
github.com
WebSpace - Web Apps, Websites And PWAs Manager!
cross-posted from: https://lemmy.world/post/48011911
I found this very promising app that looks like it can be an alternative to Ferdium, Rambox, Franz, Hamsket. WebSpace is an app that brings websites and web apps together in one organized, streamlined interface. Any web app you can think off can be used in WebSpace in its own web instance instead of your main web browser. Basically it is a web browser but for web apps you use often and may want running in the background. For use degoogled users who use website, web apps, PWAs over native apps, this makes using these services much easer. WebSpace also adds many privacy features such as ad blocking and filtering, cookie isolation, and more. Also it is written in Flutter! Meaning this could become available on desktop in the future! One app, one codebase for all major OSes! Check it out and contribute!
github.com
Linux: Run Nushell Scripts From File Manager
To be able to run Nushell scripts from your File Manager and have the terminal window of the running script not close when the script is finished executing or if the scripts exits, you can use these instructions to achieve this. This example is on Linux Mint using Nemo as a file manager and GNOME Terminal as a terminal app. • Create the following script on your system and store the file where ever you like...
run-in-terminal.nudef run-in-terminal [code: string] { # Using GNOME Terminal gnome-terminal -- nu -c ($code) } # The Nushell code that runs in the terminal def get-terminal-code [script: string] { return $" try { nu ($script) print '' print '' print '' print 'Script finished executing' } catch { print '' print '' print '' print 'Script failed executing' } print '' # Must press enter to close terminal window input 'Press Enter to exit' " } def main [script:string] { run-in-terminal (get-terminal-code $script) }• Create the Nemo action file and in the file, replace
/path/to/run-in-terminal.nuwith the path to therun-in-terminal.nufile...~/.local/share/nemo/actions/nushell.nemo_action[Nemo Action] Name=Run in Terminal Comment=Execute script in Terminal Exec=nu /path/to/run-in-terminal.nu %F Icon-Name=terminal Selection=Single Extensions=nu;
Now simply right click on any Nushell script file (
.nu) in Nemo and you will see an option Run In Terminal.Simple Nushell Script To Always Disable Laptop Internal Monitor When Using AR Glasses
cross-posted from: https://lemmy.world/post/48010802
I created a simple Nushell script that will always disable the default/internal monitor(s) on your laptop or external display when using AR glasses. I find this useful for when using AR glasses such as the XReal One which allows you to change the mode from regular mode to ultra-wide mode and when doing this, it will act as your unplugging the XReal ones and plugging in XReal one again in a new mode, causing the other display to become enabled. To keep the laptop display always off, weather the laptop lid is either closed or open, this simple Nushell script will always disable the screen every X seconds (You can change it by changing the
waitconstant) Simply copy this script and create a new Nushell script such asdisable-displays.nu, add it to your startup applications with the command ofnu /path/to/disable-displays.nuand it will run in the background. You will need to runxrandrcommand with all of your displays enabled to get the names of the displays and change the constants values in the script accordingly. NOTE: This script may not work with a full Wayland setup and may only work on X11. Enjoy# RUN xrandr TO GET THE NAMES OF THE DISPLAYS AND SET THE VARIABLES TO THESE NAMES const ar_glasses_display = 'USB-C-0' const displays = [ 'eDP', 'HDMI-0' ] const wait = 5 def is-ar-glasses-connected [] { return (xrandr | str contains $"($ar_glasses_display) connected") } def disable-display [display: string] { xrandr --output $display --off } def enable-display [display: string] { xrandr --output $display --auto } loop { if (is-ar-glasses-connected) { for current_display in $displays { disable-display $current_display } } else { for current_display in $displays { enable-display $current_display } } sleep ($wait * 1sec) }Simple Nushell Script To Always Disable Laptop Internal Monitor When Using AR Glasses
I created a simple Nushell script that will always disable the default/internal monitor(s) on your laptop or external display when using AR glasses. I find this useful for when using AR glasses such as the XReal One which allows you to change the mode from regular mode to ultra-wide mode and when doing this, it will act as your unplugging the XReal ones and plugging in XReal one again in a new mode, causing the other display to become enabled. To keep the laptop display always off, weather the laptop lid is either closed or open, this simple Nushell script will always disable the screen every X seconds (You can change it by changing the
waitconstant) Simply copy this script and create a new Nushell script such asdisable-displays.nu, add it to your startup applications with the command ofnu /path/to/disable-displays.nuand it will run in the background. You will need to runxrandrcommand with all of your displays enabled to get the names of the displays and change the constants values in the script accordingly. NOTE: This script may not work with a full Wayland setup and may only work on X11. Enjoy# RUN xrandr TO GET THE NAMES OF THE DISPLAYS AND SET THE VARIABLES TO THESE NAMES const ar_glasses_display = 'USB-C-0' const displays = [ 'eDP', 'HDMI-0' ] const wait = 5 def is-ar-glasses-connected [] { return (xrandr | str contains $"($ar_glasses_display) connected") } def disable-display [display: string] { xrandr --output $display --off } def enable-display [display: string] { xrandr --output $display --auto } loop { if (is-ar-glasses-connected) { for current_display in $displays { disable-display $current_display } } else { for current_display in $displays { enable-display $current_display } } sleep ($wait * 1sec) }How do you fully 100% uninstall an app?
Do you just simply uninstall it from the Android settings? On desktop, when you uninstall and app, it most likely leaves files and directories behind even if they are hidden on your system.
When you uninstall and app on Android, is this also the case? Or does it also delete every single file and directory associated with the app?
Some Android apps (very, very few) Will create files in your Documents or Home directory and I understand these will not be removed when you uninstall an app.
Veracrypt Clients
Since EDS client for Android is discontinued, there has not been any Veracrypt clients available until I found these two apps... https://github.com/jmccoy600/androidCrypt Pros • Small app size • On F-Droid Cons • Basic features https://github.com/AlsatianConsulting/CryptoContainer Pros • Many features Cons • Not on F-Droid I hope CrypoContainer gets on F-Droid and both apps get the ability to mount to a directory on the "main internal drive" simular to EDS client. Please help these apps out and spread the word.
Simple Bash Script To Always Disable Laptop Internal Monitor When Using AR Glasses
EDIT I made a Nushell version of this script that is updated... https://lemmy.world/post/48010802 ——— I created a simple Bash script that will always disable the default/internal monitor on your laptop when using AR glasses (or any other external monitor). I find this useful for when using AR glasses such as the XReal One which allows you to change the mode from regular mode to ultra-wide mode and when doing this, it will act as your unplugging the XReal ones and plugging in XReal one again in a new mode, causing the interal laptop display to become enabled. To keep the laptop display always off, weather the laptop lid is either closed or open, this simple bash script will always disable the laptop screen every X seconds (You can change it by changing the
waitvariable) Simply copy this script and create a new bash script such asdisable-display.sh, make the script file executable and add it to your startup applications and it will run in the background. You will need to runxrandrcommand with all of your displays enabled to get the names of the displays and change the variable names in the script accordingly. NOTE: This script may not work with a full Wayland setup and may only work on X11. Enjoy#!/bin/bash #RUN xrandr TO GET THE NAMES OF THE DISPLAYS AND SET THE VARIABLES TO THESE NAMES readonly default_display="eDP" readonly external_display="USB-C-0" readonly wait=5 while true; do #Check if there is an external display connected if xrandr | grep -q "$external_display connected"; then #Disable the internal display xrandr --output $default_display --off fi sleep $wait donebitnami/nginx + bitnami/phpfpm: "File not found." When I load localhost:8080 in browser.
I am trying to create a podman compose of NGINX and PHP:FPM. I was able to get NGINX to work on its own using the
docker.io./bitnami/nginximage. I gotten close I believe to getting the PHP:FPM to work also but due to an issue with NGINX not cooperating with the PHP:FPM. In the logs of the NGINX container, I get this error every time I load localhost:8080 in the browser...10.89.4.2 - - [24/Jul/2024:20:18:35 +0000] "GET / HTTP/1.1" 404 47 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "-" 2024/07/24 20:18:35 [error] 44#44: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.89.4.2, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://10.89.4.3:9000", host: "localhost:8080"
And when I load localhost:8080 in the browser, it displays a blank page which says "File not found.". I am using podman 5.1.2 on Linux Mint 21.3. My goal is to simply NGINX and PHP to work, to be able to have a web server that can use PHP. Any advice would be most appreciated. ——— Directory structure
nginx-php/ compose.yml nginx.conf php.dockerfile php.ini www/ public/compose.yml
version: '3' networks: app-tier: driver: bridge services: nginx: image: docker.io/bitnami/nginx volumes: - ./nginx.conf:/opt/bitnami/nginx/conf/server_blocks/my_server_block.conf:ro - .:/app/ networks: - app-tier ports: - 8080:8080 php: build: context: . dockerfile: php.dockerfile volumes: - .:/app/ networks: - app-tiernginx.conf
server { server_name localhost; listen 0.0.0.0:8080; root /app/www/public; index index.php index.html index.htm; autoindex on; location / { try_files $uri $uri/index.php; } location ~ \.php$ { fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi.conf; } }php.dockerfile (Will like to get debugging and databases to work later on...)
FROM docker.io/bitnami/php-fpm # Install xdebug for nicer error messages and debugging # RUN pecl install xdebug # RUN docker-php-ext-enable xdebug # Install mysqli # RUN docker-php-ext-install mysqli # RUN docker-php-ext-enable mysqli # Install PDO # RUN docker-php-ext-install pdo pdo_mysql
php.ini (Will like to get debugging and databases to work later on...)
[PHP] extension=mysqli extension=pdo_mysql ; xdebug settings for debugging zend_extension=xdebug xdebug.start_with_request = yes xdebug.client_host=xdebug://gateway
bitnami/nginx + bitnami/phpfpm: "File not found." When I load localhost:8080 in browser.
I am trying to create a podman compose of NGINX and PHP:FPM. I was able to get NGINX to work on its own using the
docker.io./bitnami/nginximage. I gotten close I believe to getting the PHP:FPM to work also but due to an issue with NGINX not cooperating with the PHP:FPM. In the logs of the NGINX container, I get this error every time I load localhost:8080 in the browser...10.89.4.2 - - [24/Jul/2024:20:18:35 +0000] "GET / HTTP/1.1" 404 47 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "-" 2024/07/24 20:18:35 [error] 44#44: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.89.4.2, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://10.89.4.3:9000", host: "localhost:8080"
And when I load localhost:8080 in the browser, it displays a blank page which says "File not found.". I am using podman 5.1.2 on Linux Mint 21.3. My goal is to simply NGINX and PHP to work, to be able to have a web server that can use PHP. Any advice would be most appreciated. ——— Directory structure
nginx-php/ compose.yml nginx.conf php.dockerfile php.ini www/ public/compose.yml
version: '3' networks: app-tier: driver: bridge services: nginx: image: docker.io/bitnami/nginx volumes: - ./nginx.conf:/opt/bitnami/nginx/conf/server_blocks/my_server_block.conf:ro - .:/app/ networks: - app-tier ports: - 8080:8080 php: build: context: . dockerfile: php.dockerfile volumes: - .:/app/ networks: - app-tiernginx.conf
server { server_name localhost; listen 0.0.0.0:8080; root /app/www/public; index index.php index.html index.htm; autoindex on; location / { try_files $uri $uri/index.php; } location ~ \.php$ { fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi.conf; } }php.dockerfile (Will like to get debugging and databases to work later on...)
FROM docker.io/bitnami/php-fpm # Install xdebug for nicer error messages and debugging # RUN pecl install xdebug # RUN docker-php-ext-enable xdebug # Install mysqli # RUN docker-php-ext-install mysqli # RUN docker-php-ext-enable mysqli # Install PDO # RUN docker-php-ext-install pdo pdo_mysql
php.ini (Will like to get debugging and databases to work later on...)
[PHP] extension=mysqli extension=pdo_mysql ; xdebug settings for debugging zend_extension=xdebug xdebug.start_with_request = yes xdebug.client_host=xdebug://gateway
Is it possible to debug a bash script using a debugger in attached mode? For debugging scripts on the host machine and scripts inside a docker container?
I was able to setup a debugger using a launch mode using Visual Studio Code with the Bash Debug extension. Is it possible to setup the debugger in VSCode to be able to debug a bash script using a attach debug mode?
For debugging scripts on the host machine and scripts inside a docker container?
VSCode: Debugging Attached Process does not work
I made some Go scripts that require user input
fmt.Scanln(&fileName)during the execution. When I use the Go debugger built into VSCode which is the launch type, it works but there is no way to enter any prompts when your exeuctable asks for a input. With other programming languages like NodeJS and PHP, there is way to run the scripts in "debugging mode" where it will run the code but before it executes the code, it will wait to attach to a debugger on your system and then execute the code. This has always allowed me to use the terminal for inputs in the executable. For example to do this in NodeJS, you will usenode --inspect-brk=0.0.0.0 main.jsinstead ofnode main.jsand then run the debugger in VSCode to attach it to the executing script. Is there a way to do this with Go? Do I need to set something up to achieve this? I am on Linux Mint and cannot find any commands to rungo run .but to wait for a debugger to attach to the executable before executing.php with xdebug: Unable to debug console PHP in Visual Studio Code when using podman (Works in Docker)
I am unable to get the VSCode debugger to work with PHP running in a podman container. I was able to set this up using Docker by following these steps... 1. Create php.dockerfile (Dockerfile) 2. Create php.ini 3. Add VSCode debugging launch configuration to VSCode settings.json 4. Create container in Docker 5. Start container 6. Open workspace folder of the PHP script in VSCode 7. Add breakpoints in the PHP script in VSCode 8. Start Debugger in VSCode 9. Run PHP script in docker container which will trigger the debugger in VSCode I believe it is due to some networking setup with Podman which requires additional configuring for the debugger attach itself to the PHP script in the Podman container. Any help will be most appreciated. Dockerfile php.dockerfile
FROM docker.io/php:cli # Install xdebug for nicer error messages RUN pecl install xdebug RUN docker-php-ext-enable xdebug
php.ini
[PHP] ; xdebug settings for debugging zend_extension=xdebug xdebug.mode=debug xdebug.client_host=xdebug://gateway
VSCode debugger launch config...
"launch": { "configurations": [ { "name": "PHP (Container): Terminal", "type": "php", "request": "launch", "pathMappings": { "/usr/src/app/": "${workspaceFolder}" } } ] },Terminal commands to set this all up and run the script
$ docker image build -t my-php-image -f php.dockerfile . $ docker container create --name my-container -v ./app/:/usr/src/app/ -v .:/usr/local/etc/php/ -w /usr/src/app/ -it my-php-image $ docker container start my-container $ docker container exec -it my-container php -d xdebug.start_with_request=yes test.php
Content Licensing and Attribution Section?
When using dependencies such as NPM packages, Composer packages. Weather you use a CDN or host the packages on the web server, don't many packages out there require you to display the licenses of the package being used and show attributions?
How would one place this on their website? I even went to several websites to see how they do this and could not find a section and I am sure these website use packages that require the license to be listed and list the attributions.
I can find the licenses and attributions of packages used in many applications on desktop and mobile, usually in the apps "about" page.
Any good dedicated VPN providers?
I am looking for a VPN with the following specs...
• Is either only a dedicated VPN provider (Does not offer shared VPNs) or is both a shared VPN provider and offers dedicated VPN servers • Low price (If possible) • Dedicated VPN server offers port forwarding (Many ports available, not just a few) • Private (Zero logs, good juristriction) • Multi-hop. Can connect to shared VPN server and hop to dedicated VPN server. (If VPN provider offers static VPN servers) • Linux (GUI prefferred, CLI will do) • Accepts bitcoin or other crypto for payment
I want to host servers behind a VPN. Do not want to use a VPS since the VPS is not under my control being off-site. However running a server at home without a VPN will expose my home IP address.
I am not going to be doing anything illegal nor will I be doing any torrenting.
Playing Call Of Duty - World At War (COD WAW) Plutonium on Linux (Using Wine)
I been playing around with Plutonium on Linux and want to share this guide on how to get it to run on Linux using Wine. 1. Install COD WAW. You can install it using Steam or with the retail disk in Wine. If you are installing the game with the retail disk, you need to install each patch in Wine also. 2. Create a Wine prefix for COD WAW Plutonium. It can be a 32 bit or 64 bit Wine prefix. Plutonium works with Wine 8.0.1. You can download this version of wine and many other wine version from Kron4ek. 3. Install Winetricks if it is not installed yet 4. In the terminal, enter the following commands to install these dependencies into the Wine prefix. I want to thank this guide on finding out what dependencies are needed. I did remove most of the dependencies since all seems to work fine with only these one being installed for COD WAW using Plutonium. However you may need more dependencies when setting up other COD titles with Plutonium in Wine.
sudo winetricks --self-update WINEPREFIX="/path/to/wine/prefix" winetricks -q --force dotnet48 WINEPREFIX="/path/to/wine/prefix" winetricks -q d3dcompiler_47
5. Download Plutonium EXE 6. Place the Plutonium EXE inside your Wine prefix c_drive folder "/path/to/wine/prefix/drive_c/plutonium.exe" 7. Run the Plutonium EXE inside the Wine Prefix 8. Once Plutonium is running, go the T4 Multiplayer or T4 Coop/Zombies menu in Plutonium and click on Game Settings. 9. Set the game path to the directory were COD WAW is installed. If you installed the game using Steam, the path will be in the Z:\ drive. By default the steam games directory is Z:\home\USERNAME.steam\steam\steamapps\common\Call of Duty World at War\ which may need to be manually typed in since the /.steam/ directory in the home folder is hidden. If you installed the game using the retail disk, the path will be in the C:\ drive. 10. Your now all set!
Which COD titles have official support for zombie mods?
Which COD titles have official support for zombie mods with many zombie map mods available?