teleren/devto huggingface dataset:
RPCE is moving Vite support to @crxjs/vite-plugin
Tags: javascript, webdev
Published: 2022-04-29 16:28:10

### tldr;

Since RPCE is no longer a Rollup plugin, it's getting a new name: `@crxjs/vite-plugin`. 

If you are using `rollup-plugin-chrome-extension` with Vite, you can migrate your existing project using this codemod:

```sh
npx @crxjs/migrate
```

If you're already using `@crxjs/vite-plugin`, you don't need to read this article.

## RPCE is growing up

There's still a lot to do in terms of features and robustness, but the initial feature set is complete:
 
- HMR for React and Vue in extension pages and content scripts
- No-config dynamic content scripts
- Vite-style static asset imports in content scripts

Thank you to every developer who took the time to test Vite support in RPCE and create an issue. Building Chrome Extensions isn't easy! Your time and patience are vital in building a better DX for Chrome Extensions.

## RPCE gets a new name

My original plan was to make an actual Rollup plugin that supported Vite and Rollup. Unfortunately, that turned out to be a monumental task. Every feature and use case increases the complexity of a project, and RPCE was no exception. I finally had to compromise and remove Rollup support to progress towards the Vite-style experience we wanted.

That leaves us with a small problem. `rollup-plugin-chrome-extension` isn't a Rollup plugin, so we're taking the opportunity to rebrand to `@crxjs/vite-plugin`.

## Migration instructions

I've published a codemod to make it easy to migrate. Execute this package in your project root folder:

```sh
npx @crxjs/migrate
```

The script will ask if you want to remove `rollup-plugin-chrome-extension`, then it will install `@crxjs/vite-plugin` and replace the import name in your Vite config.

![codemod gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a22h0d3w2sr8erq24tny.gif)

OFC, you can do this yourself:

```sh
npm rm rollup-plugin-chrome-extension
npm i -D @crxjs/vite-plugin
```

```javascript
// vite.config.js

-- import { chromeExtension } from 'rollup-plugin-chrome-extension'
++ import { crx } from '@crxjs/vite-plugin'
import manifest from './manifest.json'

export default {
--  plugins: [chromeExtension({ manifest })]
++  plugins: [crx({ manifest })]
}
```

The plugin API options will remain the same. The export `crx` is just an alias for `chromeExtension`. You can import either `chromeExtension` or `crx`, but I will use `crx` in future examples for brevity.

## Contributing

Thanks for giving RPCE a try while it was still in beta! In the coming months, you can look forward to better docs, better Vue support, and even Svelte support.

If this plugin is valuable to you or your business, please consider [sponsoring me on GitHub](https://github.com/sponsors/jacksteamdev). Chrome Extensions are an evolving and poorly understood space in the web development world, and I'd like to continue improving your developer experience. Your contributions and sponsorship will go a long way to making this happen.

Here's our new logo!

![crxjs logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wqsrjhydv2uhb9res1mg.jpeg)
Cloning a Repository
Published: 2022-04-29 16:13:35


What Cloning a Repository does, is it helps provide the opportunity to download a source file and work on it locally. This helps make changes that could be effected in the original. Call it, **The Experiment😊.**


---


![the experiment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jw6yiabyxe69wdtn20qo.jpeg)

---

So it begins with,

**Step 1: Selecting a Repository**

Finding the repo is a step🤷

![Previous Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aihzr6ard6ccez4qdsvs.jpg)

---

**Step 2: Green ~~pill~~ button** 

Click on the drop-down menu on green 💚 code button.

![Green button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60h72paiaz5iaptpz9s7.jpg)

---

**Step 2: The Link**

Copy the link using the copy icon. (you're copying the GitHub link.😐)


![Copy Link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18lyg5npvi3h7zkp2j01.jpg)

---
**Step 3: The Code editor, Terminal and other stories**

In a series sub-steps;
*sub-step 1* Open your code editor

*sub-step 2* open a new file, or new folder, or recent project. 

*sub-step 3* Open the terminal

![VSCODE](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxzh48h3ebdzv00boe14.jpg)

---
**Step 4: The Cloning**

At the terminal, you'll want to change the directory (especially when you're in another directory.

A directorial sub-step😶

1. Cd directory

2. git clone repository link

and the cloning begins...

![cloning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8v8qqduag65cvprjmqv.jpg)

---
**Step 5: The Cloning continues😂😶**

If we look closely we can see our cloned folder highlighted in green text💚

![cloned files](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xu3l91tqed3tecixqxw8.jpg)

---
**Step 5: The Cloning confirmed**

😂😂 It's here though. 

![confirmation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tq7w5l8g0tn39jen77e5.jpg)

**Step Celebration**


![Naruto's Clone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jt8cj0qi7bq8978xfp3m.gif)
Amazing, right?🤭😂😂

Until next time. Bye. See you soon.
How to make surveys efficient (attention: possibility of winning free MacBook)
Published: 2022-04-29 16:03:04

Most of the time I do not fill in surveys as I feel the companies do not take it seriously or I don't like the company. However, some of the companies are chaning. 

For example, in the survey from JetBrains (IntelliJ creator + a ton of other tools) you can both provide a community-affecting feedback and win a MacBook (+other prizes :) )

Please follow the survey link, if you are interested https://surveys.jetbrains.com/s3/developer-ecosystem-survey-2022-sh?pcode=315902162342278315
Negative interactions are infrequent but highly visible, with consequences for project activity
Tags: opensource, github, luos
Published: 2022-04-29 15:53:37

**Negative interactions are infrequent but highly visible, with consequences for project activity**

1. Address problematic behavior swiftly, politely, and publicly, to send a signal to potential contributors that such behavior isn’t typical or tolerated. 
2. Negative experiences have real consequences for project health.
3. Give people tools to protect themselves.

This survey was initiated by Github in 2017, but many issues are still relevant in 2022.

We are an open-source project; please feel free to comment if you have any tips for improving documentation.

Source: opensourcesurvey
Why you should learn go?
Tags: go, programming, beginners, laravel
Published: 2022-04-29 00:04:38

## Intro

Its 2022, 5 years since I started my first Laravel application, and I never wanted to look to anything else, to embrace the framework and learn it intimately.

The beginning of this year, I made a little research in the programming languages and tried to figure out another programming language to learn.

Right of the bad, I did see some comparisons and saw a difference in old vs new programming languages, and my heart instantly fell in love with new programming languages.

## The newer programming languages
So in the landscape of more than a thousands choice, I have limited my choices to:

Dart (Flutters' language)
Swift (Apple snob?)
Elixir (Atom model)
Golang (yeah)

Most hardwares that existed when C or PHP was created, are not only obsolete but also different, particularly multi threaded processors.
Therefor the languages too had to make some changes, through updates, patches, new versions.
But when it comes to this new language, they are built from the ground up to consume and embrace the hardware of today.

## In my research I come across 

- StackOverFlow surveys 
- JetBrains surveys
- Tiobe index
- PYPL
- HackerRank report
- Hired reportd
- Github Octoverse

## Extra
As an extra, I did scroll through some benchmarking frameworks.



## Buttom line

Golang is among best programming languages to learn in 2022
{% embed https://www.youtube.com/watch?v=ny-1SPBrPBY %}.
Zabbix Proxy and Low Disk Space
Tags: zabbix
Published: 2022-04-29 15:44:17

I recently had one of my proxy servers run at 99% disk space. The proxy server is using mysql and because its proxy its pulling metrics -> the metrics get sucked off from the main server and then those records on the proxy get removed. My mysql had binary logs turned on... so the .bin files found in `/var/lib/mysql` was filling up all the space, so I edited the `/etc/mysql/mysql.conf.d/mysqld.conf` file to remove bin logging, it is not needed for this database and then purged the old bin files.

`PURGE BINARY LOGS BEFORE '2022-04-29 00:00:00';`

I am now only using 22% of my disk space. Which is mostly the OS. :D
You have a chance to win amazing prizes 🎁(MacBook Pro💻 16 & etc)
Tags: news, discuss, career, programming
Published: 2022-04-29 15:41:38

Hello friends. You have a chance to win amazing prizes 🎁

**Participation will enter you into a raffle for a chance to win one of the following prizes:**

   - MacBook Pro 16
   - Geforce RTX 3080 Ti graphics card
   - PlayStation 5 or Xbox Series X
   - $300 Amazon gift card
   - JetBrains All Products Pack or JetBrains Academy subscription

But you should join **Participate in the Developer Ecosystem Survey 2022! 🎉**

##  Survey Link :✨

- [Click me Link 👆](https://surveys.jetbrains.com/s3/developer-ecosystem-survey-2022-sh?pcode=302511102487702436)

- https://surveys.jetbrains.com/s3/developer-ecosystem-survey-2022-sh?pcode=302511102487702436

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3mmwst0iskfbv5bnvcg.gif)
บันทึก: การย้าย database และ laravel storage ไปเครื่องใหม่
Tags: laravel, mysql, database
Published: 2022-04-29 15:34:24

### กำหนด
`192.0.0.1` เป็นเครื่องเก่า `192.0.0.2` เป็นเครื่องใหม่ ทั้งสองเครื่องเป็น Ubuntu server ใช้ database เป็น MySQL และ web app เป็น Laravel ที่รันอยู่บน vesta 

#### STEP 1
Export database จากเป็นเครื่องเก่า
```sh
$ mysqldump admin_database > admin_database.sql
```

#### STEP 2
บีบอัน storge ในกรณีนี้หลาย directory ก็ระบุ path ไป
```sh
$ tar -czvf storge.tar.gz storage/app storage/excel/exports public/uploads
```

#### STEP 3
ส่ง file ไปยังเครื่องใหม่ ผ่าน ftp protocol โดยใช้ curl วิธีนี้จะทำให้เห็น progress ว่าส่ง file ไปถึงไหนแล้ว
```sh
$ curl -T admin_database.sql ftp://192.0.0.2 --user <username>:<password>

$ curl -T storge.tar.gz ftp://192.0.0.2 --user <username>:<password>
```
วิธีนี้ต้องลง ftp และเปิด port ftp ที่เครื่องใหม่ก่อน อ่านวิธีนั้นที่นี่ [install-ftp-server-on-ubuntu](https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd)

#### STEP 4
Import Database ไปยังเครื่องใหม่
```sh
$ mysql admin_database < admin_database.sql
```

#### STEP 5
ย้าย file `storge.tar.gz` ไปยัง web path และ untar file 
```sh
$ mv storge.tar.gz /home/admin/web/domain_name/public_html
$ cd /home/admin/web/domain_name/public_html
$ tar -xvf storge.tar.gz
```

### Reference
- [How to tar a file in Linux using command line](https://www.cyberciti.biz/faq/how-to-tar-a-file-in-linux-using-command-line/)
- [How To Add a User and Grant Root Privileges on Ubuntu 18.04](https://www.liquidweb.com/kb/add-user-grant-root-privileges-ubuntu-18-04/)
#Drone – Moorebot Scout, an amazing drone 🚙, and more AI and IoT events
Tags: englishpost, drone, event
Published: 2022-04-29 18:36:06

---
title: #Drone – Moorebot Scout, an amazing drone 🚙, and more AI and IoT events
published: true
date: 2022-04-29 15:33:28 UTC
tags: EnglishPost,Drone,EnglishPost,Event
canonical_url: 
---

Hi !

Next week I’ll be back for some super fun Azure Iot sessions:

- [TinyML 🧠 and Azure IoT with Edge Impulse and Wio Terminal](https://www.meetup.com/Microsoft-Reactor-Toronto/events/285104158/)
- [Ask The Expert: From Padawan to Jedi in Azure IoT](https://www.meetup.com/Microsoft-Reactor-Toronto/events/285421079/)

And hey, I also have a new gadget to improve my AI and IoT skills:

![Moorebot Scout](https://brunocapuano.files.wordpress.com/2022/04/moorebot-scout.jpg?w=925)

**MooreBot Scout** from the [Moorebot](https://www.moorebot.com/) team.

This is the official Scout description

_Scout is a home security robot for intelligent monitoring. Equipped with many advanced sensors and AI algorithms, Scout is an ideal assistant for home monitoring with no blind spot. Its capabilities include object recognition, voice control via Amazon Alexa, and monocular SLAM (Simultaneous Localization and Mapping)._

- _FHD camera with night vision_
- _4WD Mecanum Omni-directional wheels_
- _WiFi-enabled IoT mode, connected worldwide, encrypted data with high security_
- _Voice control with Alexa and Google_
- _Video streaming to Alexa or Google screen devices_

And hey, may main focus will check the complete project. Scout is an open-source project. In example: Amazon Alexa and Google Home are already integrated and users can access them from our Ios or Android App. I’m looking forward to check / create additional SDKs !

Finally, here you can see Scout in action !

<iframe width="750" height="422" src="https://www.youtube.com/embed/d_KicmXQJms?version=3&amp;rel=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;fs=1&amp;hl=en&amp;autohide=2&amp;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation"></iframe>

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *
Create persistent env variable
Tags: linux, ubuntu, env, bash
Published: 2022-04-29 15:26:20

To create an env variable and make it persisting, we need to edit .bash_profile file. The ~/.bash_profile file is a configuration file for configuring user environments.
Open terminal and run the following command to edit in nano. **.bash_profile**.
```
nano ~/.bash_profile
```

Then enter your environment variable and export as bellow
```
export CLIENTID="mysecretclientidvalue"
```
Save the file by pressing `ctrl+o` and `enter`.

Logout and login again to your ubuntu computer.
To check the env value has been persisted or not by entering this command:
```
echo $CLIENTID
```
This will return the value of the env persisted variable.
Back4app Co-Founders coming together for the very FIRST TIME!
Tags: lowcode, techwebinar, founderslive, parse
Published: 2022-04-29 15:25:57

#### Back4app Co-Founders coming together for the very FIRST TIME!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aedhzwlycppwr6szm2nq.png)
We are thrilled to announce a live discussion with our founders, for the very FIRST time. That's right! Back4app Co-Founders- Alysson Melo and Davi Macedo are coming together to have a live discussion on the future of low-code with the latest Parse 5.0 version!
Register here to become an attendee: https://bit.ly/3EX3sVj
Python Cheat Sheet Part - 1
Tags: python, codenewbie, cheatsheet, beginners
Published: 2022-04-29 15:21:16

**Basics**
Basic syntax from the python programming language

**Showing Output To User**
The print function is used to display or print output as follows

```
print("Content that you wanna print on screen")
```
**Taking Input From the User**
The input function is used to take input from the user as follows:

```
var = input("Enter your name: ")
```
**Empty List**
This method allows you to create an empty list

```
my_list = []
```

**Empty Dictionary**
By putting two curly braces, you can create a blank dictionary

```
my_dict = {}
```
**range Function**
range function returns a sequence of numbers, eg, numbers starting from 0 to n-1 for range(0, n)

```
range(int_value)
```
**Comments**
Comments are used to make the code more understandable for programmers, and they are not executed by compiler or interpreter.

**Single line comment**

```
# This is a single line comment
```
**Multi-line comment**

```
'''This is a
multi-line
comment'''
```

**Escape Sequence**
An escape sequence is a sequence of characters; it doesn't represent itself (but is translated into another character) when used inside string literal or character. Some of the escape sequence characters are as follows:

**Newline**
Newline Character

```
\n
```
**Backslash**
It adds a backslash

```
\\
```
**Single Quote**
It adds a single quotation mark

```
\'
```
**Tab**
It gives a tab space

```
\t
```
**Backspace**
It adds a backspace

```
\b
```
**Octal value**
It represents the value of an octal number

```
\ooo
```
**Hex value**
It represents the value of a hex number

```
\xhh
```
**Carriage Return**
Carriage return or \r will just work as you have shifted your cursor to the beginning of the string or line.

```
\r
```
[Top Websites to learn Python](https://dev.to/sandeepk27/top-websites-to-learn-python-for-free-1j1l)

[How to install python in windows 10](https://dev.to/sandeepk27/how-to-install-python-310-2dik)

[Best IDE's for Python](https://dev.to/sandeepk27/best-ides-for-python-362k)
8 things I've learned while building a Micro SaaS in 8 days
Tags: saas, webdev, startup
Published: 2022-04-29 15:19:11

**1. Don't overcomplicate**

I know it's obvious, but a lot of founders do this mistake. Before even starting development make a backlog of all of the features you want to include. 

Then reduce it to get the minimal salable version.

And then start development.



**2. Use as many no-code solutions as possible**

This can save a ton of time and money. 

You don't need a fully automated rocket ship at the start.
A boat with oars can do the job. 

You can scale it later.


**3. Think about the next steps**

When I tried to build my first startup, my mistake was to not think about what will be after the launch.

I thought users will magically appear and pay me.  

Build a plan with direct steps of what you can do to make 1, 10, and 100 sales.


**4. Start marketing ASAP**

Even before you start development. 

In case you are playing long-term (you should) start doing content marketing.  

Don't know how? Find a person who can do it for you. It's worth it.


**5. Plan your budget**

You can't say how fast you'll make money so it's better to understand how much you can spend until you start earning.


**6. Plan your exit**

It's a good technique to set clear goals.

Let's say you want to scale to $50k ARR and then sell it.

Now you have a clear goal and can build a plan based on this goal.


**7. Set deadlines**

Very sobering tactic. Set short and achievable goals in short periods. 

It helps to stay involved and rejoice in small victories.

8 days in my case was very dense.


**8. Build in public**

It's just fun. As a bonus, you can find your audience.

If not it will help you not to quit and reach your deadlines.

Public promises are hard to keep, but it's easy to get along with yourself.


P.S.
I'm writing [PROOFS](https://proofs.beehiiv.com) — a newsletter about Marketing for Developers. Sharing simple steps you can follow to build your product. Join [here](https://proofs.beehiiv.com).
Example showing usage of LD_PRELOAD environment variable in UNIX
Tags: bash, c, linux, shell
Published: 2022-04-29 15:16:00

# LD_PRELOAD

We can use `LD_PRELOAD` environment variable to set a location to fetch shared libraries. By setting this variable, we can overwrite the existing functions and make the standard command work differently, the way we want it to.

The linker links the libraries in the path provided by `LD_PRELOAD` for compiling the main file. Once a function is linked, when other instance of same function shows up, older location is ignored and the newer location is used.

For example, let us try to overwrite the `puts` function present in `stdio.h` file.


![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iw5zfp53dlycod8xfxvl.png)

Consider a file `main.c`, with following content:

```C
  #include <stdio.h>

  int theFunction(const char *s)
  {
      return puts(s);
  }

  int main (int argc, char** argv) {
      theFunction("Hello, this is traditional work flow.");
      printf("%s: puts location: %p\n", __FILE__, puts);
  }
```

Compiling and running the `main.c` file gives following output with location of `puts` as `0x7f877af52ef0`.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hair6f3orm93iar6cmu3.png)

Create another file, `unmain.c` as follows:

```C
  #include <stdio.h>

  int puts(const char *__s)
  {
      return printf("New puts, hackerman alert!\n");
  }
```

Now, create a shared library of this `unmain.c` file with command:

```bash
  gcc -fPIC unmain.c -shared -o unmain.so
```

Update the `LD_PRELOAD` with the location of the shared library, `unmain.so`:

```bash
  export LD_PRELOAD="$PWD/unmain.so"
```

And then again run the first compiled `main.c` file's executable `main.o` to see that the location of the `puts` has been updated. For my case, new location has been set to `0x7f6003f5d119`.

```bash
  ./main.o
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uesy6k6uuvya8361mdb1.png)

To remove the shared library, use `unset` to unset value of
`LD_PRELOAD`.

```bash
  unset LD_PRELOAD
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8qw6a6e9hisi5gu3xhq2.png)


Same example to contribute on Github: https://github.com/chhajedji/ld-preload
9 Reasons Why Linux is Better for Programmers in 2022
Tags: linux, programming, codenewbie, opensource
Published: 2022-04-29 15:10:49

Are you a programmer?

Do you want to switch to Linux for programming & looking if it's actually developer friendly or not?

Then, this article will end up all your doubts about Linux & programming.

> Sponsored by: [signalgarage.com](https://www.signalgarage.com/auto-repair-shop-st-paul/mercedes-repair-st-paul/)

## Why Linux is better for programming?
There are many reasons why [Linux](https://www.linux.org/) is considered to be a better operating system for programmers.

First, Linux is a free and open-source operating system, which means that anyone can view and modify the source code.

This makes it easy for programmers to contribute to the development of the operating system.

Additionally, Linux is very stable and typically does not require as much maintenance as other operating systems[.](https://www.example.com/?tLZ7G0-f710ab)

Finally, Linux provides a wide variety of programming tools and applications that can be used to develop software.

One of the main reasons why Linux is better for programmers is because it is a free and open-source operating system. This means that anyone can view and modify the source code.

This makes it easy for programmers to contribute to the development of the operating system. Additionally, Linux is very stable and typically does not require as much maintenance as other operating systems.

Finally, Linux provides a wide variety of [programming tools](https://www.pluralsight.com/blog/software-development/linux-open-source-development-tools) and applications that can be used to develop software.

[Read the full article](https://www.gadgetsgadder.com/2022/04/linux-for-programmers.html)