teleren/devto huggingface dataset:
Office in Vagrant VM
Tags: productivity, vagrant
Published: 2019-08-11 14:15:34

---
title: Office in Vagrant VM
published: true
tags: productivity, vagrant
canonical_url: https://ofdigitalwater.postach.io/post/office-in-vagrant-vm
---

I wanted to use office software in a VM, while being able to edit files on the host machine. Usually, people create a VM in [VirtualBox](https://www.virtualbox.org/) and map the host directory into this VM using [shared folders](https://www.virtualbox.org/manual/ch04.html#sharedfolders). But, because it is a long process, I decided to automate it using [Vagrant](https://vagrantup.com).

# TL;DR

1. Go to [this GitHub repository](https://github.com/wincentbalin/VirtualOffice)
2. Download `Vagrantfile` and place it into your documents directory
3. Open your favourite CLI and change into that directory
4. Run `vagrant up` to configure the VM and wait for a while
5. Run `vagrant rdp` and use _vagrant_ as login and as password
6. Open LibreOffice and configure your personal data, so the documents with data fields can set them to appropriate values
7. Edit your documents on the host system!

# Design decisions

The `Vagrantfile` must be placed into directory with documents you want to edit. Of course, I could add the default documents directory on the host OS, but I decided against it: first, it would create additional maintenance burden (especially if the syntax for default OS paths changes), and second, it would not work on systems, where the documents directory was moved to another location. So, for now, the entry for synchronised directory is

```ruby
config.vm.synced_folder ".", "/home/vagrant/Documents", mount_options: ["dmode=775,fmode=664"]

```

The VM created by Vagrant is based on Ubuntu Bionic x64. The `Vagrantfile` installs the packages `xubuntu-desktop` and `libreoffice`. Then it also enables Remote Desktop connexions by installing `xrdp`, by starting it automatically as a service and by enabling port 3389. The forwarding to the port is configured with

```ruby
config.vm.network "forwarded_port", guest: 3389, host: 33389, protocol: "tcp", auto_correct: true

```

The automatic start of XFCE session is enabled by adding `xfce4-session` to the file `.xsession`. Everything is run as the default Vagrant user `vagrant`.
As mulheres que mudaram o rumo da tecnologia
Tags: wecoded, womenintech, braziliandevs
Published: 2024-03-24 14:45:38

Quando eu comecei a fazer lives sobre tecnologia pelo [time da Feministech na Twitch](https://www.twitch.tv/team/livecodergirls), eu pensei em falar sobre mulheres na tecnologia. O objetivo era falar de uma mulher a cada live. E como eu queria ter o registro disso de alguma forma, para que ninguém perdesse a história da mulher que falamos, caso a pessoa tivesse perdido a live, criei um projeto dentro do GitHub.

Isso foi bem importante para mim, a cada live que eu pensava em fazer, pesquisava sobre mulheres na tecnologia e acabava descobrindo histórias incríveis e que ninguém conta abertamente. E lá ia eu, ficar encantada com cada uma dessas histórias e já estava achando pouco falar sobre apenas uma mulher na tecnologia por live.

O projeto foi crescendo e tomando forma. Claro que já tive um milhão de ideias para ele, assim como já recebi também diversas sugestões. Já pensei até em transformar em um livro. (Quem sabe um dia, né?).

E quero aproveitar o [#wecoded](https://dev.to/t/wecoded) para mostrar também para mais pessoas sobre esse projeto. Ainda são pouquíssimas mulheres nele. Tem mulheres que já se foram, mulheres que ainda estão transformando a área de tecnologia com seus estudos, pesquisas e trabalho.

E além disso, quero aproveitar para falar mais uma coisa:
> Você, que está aí em algum lugar, estudando sobre tecnologia, enfrentando diversos preconceitos, tentando lidar com mil coisas ao mesmo tempo: casa, trabalho, estudos, ou buscando sua primeira oportunidade, saúde, família, ou tendo que cuidar de tudo isso sozinha, entre tantas outras coisas... **Eu quero dizer que você também está transformando o mundo da tecnologia.** Seja você uma mulher que está pensando em dar seus primeiros passos na área, uma mulher que já está atuando como tecnologista, uma mulher com anos e anos de experiência, uma mulher em transição de carreira, não importa. A cada passo que você dá, é um passo que damos todas juntas para mudar o mundo. **E você está transformando a área de tecnologia.**

Vou pegar emprestada algumas palavras aqui do Emicida: "faz essa por nós, te vejo no pódio", onde estaremos juntas, combinado?

Se você quiser se inspirar em outras mulheres diversas ou quiser compartilhar a história de mulheres na tecnologia, aqui está o projeto. Espero que goste!

{% github https://github.com/morgannadev/mulherestecnologia %}

Inclusive, nesse mesmo repositório, tem um arquivo com iniciativas e comunidades para mulheres no mundo todo. Conheça e compartilhe!
Redirect When Not Authenticated in PHP + HTMX
Tags: webdev, php, htmx, devjournal
Published: 2024-03-24 14:20:36

Hello Punk!

Yes, I am again. Using HTMX as an isolated component and creating Hypermedia interactivity with less JavaScript code is my goal. (We not talking about _~~Offline First~~_, That's sound "Uuuuaagggrrrrh!" for me)

HTMX using `xmlhttprequest` when I use `hx-{verbs}` but in another side (the backend) I use PHP so, this function:

```php
function handleAjaxOrRedirect(Response $response, string $path, int $code)
{
    if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') {
        $response->setStatusCode($code);
    } else {
        $response->redirect($path);
    }
    exit();
}
```

Really help me so much (thanks for myself) when I need to make sure is the request is valid / authenticated. Like...

```php
$response = new Response();
if (!isAuthenticate()) {
    handleAjaxOrRedirect($response, '/', 401);
}
```

I use it inside each controller `__constructor`. Yes, That's it!
AWS-DSSE-KMS — Dual side encryption on S3
Published: 2024-03-24 14:11:57


## AWS-DSSE-KMS — Dual side encryption on S3

AWS S3 support dual side encryption key with KMS.Utilizing dual-layer server-side encryption with AWS KMS keys involves applying two layers of encryption to objects during their upload to Amazon S3. Its helps compliance with standards that require multilayer encryption for data.

How to enable DSSE-KMS key on AWS Console.

1. Sign into AWS console and open S3 bucket properties tab.

2. Select Default encryption section and choose to edit.

3. Under encryption type select Dual-Layer server-side encryption with AWS Key Management Service Keys (DSSE-KMS).

4. Under AWS KMS Key we can select Choose from your AWS KMS Keys or AWS KMS Keys in the list.

![](https://cdn-images-1.medium.com/max/2000/1*1xA9BXT2B-Aex-ivy_sqtQ.png)

**How to enable DSSE-KMS key on AWS CLI**

Below AWS CLI command to upload new object into AWS S3 with enable dsse key.

**aws s3api put-object — bucket s3-bucket-name — key object-name — server-side-encryption aws:kms:dsse — ssekms-key-id kms_key-id — body filepath**

![](https://cdn-images-1.medium.com/max/2000/1*pVTtu0ufvzPtpkllnmJOmw.png)

— ssekms-key-id -> specify customer managed aws kms key or it will use aws managed kms key (aws/s3).

**How to restrict all objects uploaded into s3 should be encrypted by DSSE-KMS**Add below s3 bucket policy.

![](https://cdn-images-1.medium.com/max/2000/1*FAZNr__GIp_eswWMVQV7EQ.png)

-> S3 bucket key won’t support for DSSE-KMS.
Consus - code evaluation done right.
Published: 2024-03-24 14:06:45

## My Start

So, about four months ago, one of our seniors (yep, just a regular college student here) introduced us to this new thing called *Compiler* - basically a code judge. They laid down the law saying we could only submit projects to the college if we got certificates showing we knew the basics of a programming language.

I won't bore you with the details, but basically, the questions in these assessments were supposed to be solved using basic programming stuff like if/else statements and string tricks. Sounds simple, right? Well, the real headache was dealing with the code judge itself. It was a mess. Most of us failed multiple times, had to redo the assessments, and the whole process lacked transparency.

Fed up with the system, I decided to take matters into my own hands. I set out on a mission to create something that could do what the current system did, but better. And that's where [Judge0](https://judge0.com/) comes into play.

### The Tools I Used
I stuck with what I knew best - the MERN stack. But instead of MongoDB, I went with MySQL because I had some experience with it.

Instead of manually running code in different languages, we opted for Judge0. It was easy to use, no complicated setups needed, and it supported a bunch of languages. Why? Well, setting up separate servers for each language was risky business in terms of security. Plus, with our tight deadline, we needed something quick and reliable.

I also set up automatic deployment with Vercel for both frontend and backend. To keep costs down, I used Rapid API's pre-hosted Judge0 instance and freedb.tech's MySQL instance.

### Behind the Scenes
I'm no design guru, so I borrowed some ideas from platforms like LeetCode for the interface. When a user clicks Run or Submit, the code gets sent to the backend along with test cases. Public test cases go straight to Judge0, while private ones hang out in our database first.

Judge0 sends back a token to track submissions, stored in our database for private tests and sent to the frontend for real-time updates. Oh, and I threw in some multiple-choice questions for fun, inspired by Kahoot.

When the user finishes the test, answers are submitted, and MySQL triggers kick in to calculate scores based on passed test cases.

### What's Next?
I've got some more features implemented - like adding questions, a supervisor segment for physical tests, and a student dashboard by dragging a few buddies into this project, so maybe they'll have some thoughts too.

You can check out the project [here](https://consus.vercel.app/), but honestly, I'm not completely satisfied with it yet. If I find the time, I might give it another go and see what I can improve.
SpeechSynthesis in <= 256 characters (Web Speech API)
Tags: frontendchallenge, devchallenge, javascript, webdev
Published: 2024-03-24 13:09:03

_This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature._

## Explainer
<!-- Explain a browser API or feature in 256 characters or less. -->
Make texts & UIs more accessible by using [`SpeechSynthesis`](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis): Create a [`new SpeechSynthesisUtterance`](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/SpeechSynthesisUtterance) + given [text](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text), [pitch](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/pitch), [rate](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/rate), [volume](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/volume), [lang](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang), and [voice](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/voice) (vary by OS and browser). Tap into [various events](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance#events). Finally, pass the utterance to [`speechSynthesis.speak`](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/speak) → 🔊


## Additional Context
<!-- Please share any additional context you think the judges should take into consideration as it relates to your One Byte Explainer. -->
> No external tools were used for the above text in any circumstance. 🤞

The `SpeechSynyhesis` is the "output" part of the Web Speech API, where the input counterpart is `SpeechRecognition`. 

Despite its potential in terms of accessibility (people with limited reading skills or generally low literacy), it hasn't been developed in years! Custom voices cannot be loaded, although remote voice loading is generally implemented. 

Alternatives are either closed + commercial or require a server to generate the voice and stream it as audio to the client. It's time for the webdev community to shed some light on this and not let speech synthesis become a walled garden solution.

I also wrote an article about maximising cross-browser compatibility for speech synthesis here on dev.to:

{% embed https://dev.to/jankapunkt/cross-browser-speech-synthesis-the-hard-way-and-the-easy-way-353 %}

<!-- Team Submissions: Please pick one member to publish the submission and credit teammates by listing their DEV usernames directly in the body of the post. -->

<!-- Don't forget to add a cover image to your post (if you want). -->
<small>Cover image by <a href="https://unsplash.com/@smajor15?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Scott Major</a> on <a href="https://unsplash.com/photos/black-and-brown-round-speaker-ZP2iqHtUtyc?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a></small>
  

<!-- Thanks for participating! -->
Artificial Intelligence in Finance
Tags: ai, fintech, machinelearning, deeplearning
Published: 2024-03-24 12:55:49

Artificial Intelligence (AI) is making significant inroads into the finance sector, transforming traditional banking, investment strategies, and financial services. The integration of AI technologies in finance is aimed at enhancing efficiency, accuracy, and customer experience while reducing risk and fraud. Here are some key applications of AI in finance:

#### Fraud Detection and Prevention:
AI algorithms are adept at analyzing transaction patterns in real-time to identify anomalies that could indicate fraudulent activities. By learning from historical fraud data, AI systems can flag unusual transactions much quicker and with greater accuracy than traditional methods, thereby minimizing the risk of financial loss.

#### Algorithmic Trading:
AI and machine learning are used in algorithmic trading to make high-speed trading decisions. These systems can analyze market data at high velocity, identify trading opportunities based on market conditions, and execute trades at optimal times without human intervention, maximizing profits.

#### Personalized Banking Services:
AI-driven chatbots and virtual assistants provide personalized banking services to customers, offering financial advice, answering queries, and even assisting with transactions. These AI tools learn from customer interactions to provide tailored advice based on individual financial habits and goals.

#### Credit Scoring and Risk Assessment:
AI models improve credit scoring by taking into account a wider range of non-traditional data points, including social media activity and mobile phone usage patterns. This allows for more accurate assessments of an applicant's creditworthiness, especially for those with limited credit history.

#### Predictive Analytics in Financial Planning:
Financial institutions leverage AI for predictive analytics to forecast future market trends, customer behavior, and potential financial crises. This enables proactive decision-making, better risk management, and strategic financial planning.

#### Compliance and Regulatory Reporting:
AI helps financial institutions comply with regulatory requirements more efficiently by automating the extraction and analysis of relevant data from various sources. AI systems can monitor transactions in real-time to ensure compliance with anti-money laundering (AML) and Know Your Customer (KYC) regulations, reducing the risk of non-compliance penalties.

The integration of AI in finance not only streamlines operations but also introduces a new level of innovation and competitiveness in the sector. As AI technologies continue to evolve, their potential to transform the financial landscape becomes increasingly significant, promising more secure, efficient, and personalized financial services.
Week 3!
Published: 2024-03-24 12:49:46

Now at week 3! This week is a very important week, we had a change of schedule so we start at 1pm and end at 10pm because we are having our NHO Training. For the first two days, we had our NHO Training, for the next two days we had our excel training, and for the last day of the week, we had our communication training. This week is very important because we get to know the company, its policy, its history, their personal directory, the departments, and etc. It is very important to know this since we are having our internship here and we have to respect all their policy and follow them. After our NHO, excel, and communication training, we will be having our open forum as well as assessment.  
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ni4cx1qx49qtllo48uz0.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p2o2xzhf4ojizyiwaody.jpg)
ما هو لارفيل برييز؟
Tags: laravel, php
Published: 2024-03-24 12:39:36

Laravel Breeze هو مجموعة أدوات ابتدائية بسيطة وخفيفة الوزن لتطبيقات Laravel، توفر تنفيذًا بسيطًا لجميع الميزات التي تحتاجها لبدء التوثيق في مشروع Laravel جديد. Laravel، وهو إطار عمل PHP شهير لتطوير الويب، يشمل عدة خيارات لبنية التوثيق، ويعد Breeze واحدًا من أبسط هذه الخيارات وأكثرها سهولة في الاستخدام.

تم تقديمه من قبل فريق Laravel، يستخدم Breeze Blade، نظام قوالب Laravel الافتراضي، لعرضه، مما يجعله خيارًا رائعًا للمطورين الذين يفضلون العمل مع تطبيقات مُرَكَّبَة على جانب الخادم باستخدام تقنيات Laravel التقليدية. يوفر الهيكل الأساسي لتسجيل الدخول، التسجيل، التحقق من البريد الإلكتروني، إعادة تعيين كلمة المرور، وتأكيد كلمة المرور، جنبًا إلى جنب مع المسارات والتحكمات والاختبارات المقابلة.

بساطة Breeze تكمن في تركيزه على توفير الأساسيات للتوثيق، دون أي تعقيدات أو اعتمادات إضافية. هذا يجعله نقطة انطلاق ممتازة لتعلم ميزات التوثيق في Laravel أو لبناء مشروع لا يتطلب المزيد من الميزات المتقدمة لخيارات التوثيق الأخرى في Laravel، مثل Laravel Jetstream أو Laravel Fortify.

لإعداد Laravel Breeze في مشروع Laravel، عادةً ما تقوم بتشغيل عدة أوامر لتثبيته عبر Composer، مدير الاعتمادات في Laravel، ثم تشغيل الترحيلات لإعداد جداول قاعدة البيانات اللازمة. يقوم هذا الإجراء بإعداد بنية التوثيق، مما يسمح للمطورين بالانتقال بسرعة إلى بناء الجوانب الفريدة من تطبيقاتهم.

لتثبيت Laravel Breeze في مشروع Laravel، يمكنك اتباع الخطوات التالية. هذه الخطوات تفترض أنك قد أنشأت بالفعل مشروع Laravel جديد ولديك Composer مثبتًا على نظامك، حيث يعتبر Composer أداة أساسية لإدارة الاعتمادات في تطبيقات PHP.

[لكيفية التحميل](https://www.t9chnih.com/blog/ma-ho-larfyl-bryyz)
Week 2!
Published: 2024-03-24 12:38:40

 Wow! We are now at week 2. For this week's agenda, my trainer and I continued what we started in week 1, which was to teach me and observed me in doing my first task. Since I am getting used to my first task and I rarely make mistakes or forget the process of the  task, my trainer told me that she would no longer observed me on the next days for my first task. Of course, I was anxious in doing it alone since I was dealing with a lot of data and I don't want to make a mistakes in inserting data in the google sheets, so I made sure that I review the notes I did for my first task. For my second task, we did another report for the month of March with the same process as the last time. For this task, I was still being observed since it was only the second time we did the task. I still have to retrieve reports and use it to update the data from the google sheets they have. 
  Second week is fun and I even got a little bit closer with my co-interns from different school and all the employees inside our room.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kyun2bwsuhbxnqh6zjup.jpg)
Digital marketing for astrologers
Published: 2024-03-24 12:30:41

[Digital marketing for astrologers:](https://astrologermarketing.com/digital-marketing-astrologers-astrology-website/) If you are an astrologer and want to grow your astrology business then you are in the right place. Digital marketing is one of the best ways to grow any business. Now offline marketing is too difficult for astrologers if they promote their services through digital marketing then they get more clients. By promoting business online they gain the trust of customers. Nowadays everyone searches for their problems on the Internet first so if astrologers publish their business online then it's very easy to get more clients. With the help of digital marketing, they can promote business according to niche 
This is one of the best sites that gives digital marketing services to astrologers to promote their business.
Camp Activities: Lego theme
Tags: frontendchallenge, devchallenge, css, javascript
Published: 2024-03-24 12:30:01

_This is a submission for DEV Challenge v24.03.20, Glam Up My Markup: Camp Activities_

## What I Built
I built the Camp Activity Inquiry Form. I decided to make things harder/easier by doing it in CodePen and just using CSS and JS, and not using any packages to styled the select.

I recently saw an episode of Lego Masters USA where they had to build a fantasy summer camp. Since that was in my mind I went with a Lego theme, styling the form to look like it's a Lego brick and adding a couple of Lego brick images.

## Demo
{% codepen https://codepen.io/nicm42/pen/PogmxEB %}

## Journey
The HTML wasn't that exciting and I wanted to pretty it up a bit. I went with primary colours because that's what I associate with Lego, even though it has loads of colours these days. I made the background an off-white, so there's not too much contrast with the text. So it's a dirty white Lego colour!

For the heading I searched Google Fonts for 'lego' and it came up with the Glegoo font, which I thought did sort of resemble Lego. Since it's a serif font it's a bit much for the whole thing, so there I just picked a sans-serif font. As the challenge said you can't alter the HTML, I decide to take that literally and import the fonts rather than paste the HTML into the head.

I used logical properties with the CSS. I mainly just use them for short hands for top & bottom or left & right (like `margin-inline: auto`). But it's possible there will be some RTL things that come up at work, so I need to get better at thinking in logical properties.

I also decided to use CSS Nesting because I'm used to nesting in SCSS. CSS Nesting is not quite ready to use in production code yet and I like taking the opportunity to use new CSS things that I can't use at work yet.

By default, submitting the form refreshes the page, so I stopped it from doing that. Nothing is noted as being required in any way in the HTML, so I would assume that nothing is required. Except submitting a blank form is a bit silly. So I just checked if anything on there had been filled in. If it hasn't it puts up an error message. If it has, then it hides the form and puts up a thank you message.

I had fun with this. It was a nice, little challenge to get myself back into doing fun things outside of work.
Launch of Mamzanzi
Published: 2024-03-24 12:08:41

This is my first time on this platform. I boostrapped the development of [https://mamzanzi.com/](https://mamzanzi.com/), South Africa's number 1 online health and wellness shop.

One of my great challenges building the site is the use of numerous plugins used for different functions.

Is there a way I can cut short these plugins and do everything i.e. the full coding without the use of plugins.

Thanks