teleren/devto huggingface dataset:
Solved: "Your browser is managed by your organization" - Linux
Tags: browser, chrome, policies, mozilla
Published: 2021-02-24 20:49:55

According to [ https://support.google.com/chrome/a/answer/9844476?hl=en#zippy=%2Clinux ] If you have Microsoft® Windows®, Apple® macOS®, or Linux® devices that are no longer being used in your organization, you might decide to repurpose and distribute them for personal use. Or, some users might purchase a second-hand Windows or macOS device, where Chrome Browser was previously managed by an administrator in a school, company, or other groups. If devices are not properly reset, Chrome Browser might still be managed by an administrator.

To remove this on Linux, in my own case I used Fedora 32 - **navigate to `/etc/opt/chrome/policies/`** and delete the files inside the policies directory.

Aww! Wait a minute, you couldn't delete that, right? Yes, you can't use the conventional way of deleting files to do that.

Okay, for us to delete the files/folders, right-click inside the `policies` folder and select `open in Terminal`

Yes! You got it, now login as an administrator using ```terminal 
 sudo su
``` and type in your password.

Wait, let's confirm you're in the right directory, type `ls` for us to be sure the files/folder we want to delete is actually what is listed or showing.

Confirmed! Okay now type ```terminal
 rm -rf <file(s)_or_folder_name> 
``` where **rm -rf : Force deletion of current folder and sub folders** in my own case it's **`rm -rf managed`**

OMG! It has deleted... wow

Now, let's open the Chrome browser, awesome! The **"Your browser is managed by your organization"** is no longer there.

You just did it!

Please like and share if this helped.



You can also [![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nw78dydwftsjxtybbe51.png)](https://www.buymeacoffee.com/umekalu) if you want.
My Moodle Tips #2
Tags: moodle, cache, php, lms
Published: 2021-02-25 14:08:31

If your Moodle starts consuming too much inodes available on a server, be sure to **purge caches** periodically.

Go to **Site administration** > **Development** > **Purge caches**, then click on **Purge all caches**.

It will relieve some spaces for you, especially if your resources are limited.
8 Tips on how to improve your day as a developer.
Tags: codenewbie, productivity, webdev
Published: 2021-02-25 15:19:22

Hi, this is Leonardo.

I'm a simple human that tries to improve day by day, step by step. If it’s your first time here you can read who I am in this blog post <mark>[“Who am I”](https://www.leonardotononi.com/blog/nice-to-meet-you)</mark>, <strong>otherwise skip this part.</strong>

### What is this post about?     

Eight simple tips on how to structure your work day and your free time and why it matters.

### What can you do?    

1. <strong>Don’t over plan</strong>, thinking small and simple is the key to success. For example, trying to accomplish from 3 to 5 important tasks is enough. <strong>You are not running a sprint, it’s a marathon.</strong>

2. Only plan the week ahead of you, long term plans are not good because it’s hard to stick to them. Again, you are not running a sprint, it’s a marathon.

3. Choose something rewarding to do, but remember it is better to <strong>privilege healthy activities.</strong>

    > Exercise, interestingly, also helps new neurons survive. Exercise is by far, more effective than any drug on the market today to help you learn better. It benefits all of your vital organisms, not just your brain.

4. Try to stay focused when working, it's better to spend less time concentrating while <strong>ensuring quality</strong>, than spending longer and more distracted hours working. Remember that every time you are distracted from your main task, it costs you more effort to return to the previous focused state.

5. It is better to <strong>avoid your smartphone</strong> while working / studying. I suggest using your phone time like a reward after ‘x’ time spent focusing. Also try to put your mobile phone in ‘do not disturb’ mode, it helps.

6. <strong>Be clear with yourself</strong> with what you expect and want from your day. My suggestion is to write it down, and it doesn't matter if it’s on a paper or on a display, it’s useful to vacuum your mind from distractions.

    > At the moment I’m using a minimal calendar app that keeps out noise that other calendar apps have, it’s called [Teux Deux](https://teuxdeux.com/).

7. <strong>Sleep is an important</strong> part of your learning and memory process. Sleep has also been shown to make a remarkable difference in your ability to figure out difficult problems and to understand what you're trying to learn.

8. As always, drink more water.

### Conclusion. 

What is key is that you need to prioritize and organize what matters to you, and then try to stick to your goals or, at least, <strong>try to follow a kind of plan.</strong>

Sometimes it could become too hard to follow, but this is also normal, don’t worry and don’t be stressed about it.

I'm new to this kind of blog post stuff, and I'm not an English native speaker, therefore I'm trying to keep everything simple.

If you think I can improve this post I would be happy to see a comment from you on Twitter.

Thanks a lot and see you around 🙃.
Things I learned while using React Query - Part 1
Tags: react, reactquery
Published: 2021-02-26 09:23:13

I've been using [React Query](https://react-query.tanstack.com/) in real world applications for over 8 months now, and I want to share with you some of the things I found useful to know when using it. This is the first part of a blog series.

### React Query is a light caching layer

React Query is a caching layer that improves the developer experience and the user experience. The cache lives in memory, within your application, which means there is NO server or browser caching involved.

One of the most common mistakes when starting with React Query is to treat it like a traditional cache. Many developers are taken by surprise when they see the background refetch of the data. They expect to have only the initial network request and then to have the data served (only) from the cache.

But this is not the case.

React Query uses the [stale-while-revalidate caching strategy](https://tools.ietf.org/html/rfc5861#section-3) in the attempt of keeping the user as up to date as possible with the server data without affecting the user experience.

### Understand the different states of a query and the differences between them

In the documentation or in any other resource on React Query you will see many references to the different states in which a query can be.

These are: fresh, fetching, stale and inactive. Understanding why a query is in a certain state and when it will transition to a new state is crucial if you want to be proficient with React Query. They are the backbone of this library.

![React Query States Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4upms7qtsr003wk4itg1.png)

As you can see in the above diagram, the staleTime and cacheTime play a crucial role in deciding the state of the query. Make sure you understand when to use staleTime and when to use cacheTime. I like how [@TkDodo](https://twitter.com/TkDodo) describes the differences between the two.

> staleTime = the duration until a query transitions from fresh to stale

> cacheTime = the duration until inactive queries will be removed from the cache

### Use the built-in dev tools to visualize the states of your queries

React Query ships with built-in dev tools. They can be extremely useful when learning the library.

Having a graphical representation of the different states in which a certain query is in will make it easier to understand them

![React Query Dev Tools](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nykkmlz04cp2lggxi9h1.png)

### Know the important defaults

Be aware of the [important defaults](https://react-query.tanstack.com/guides/important-defaults) and throughly understand them to make learning and debugging easier.
Poll backend endpoint in Vanilla js
Tags: javascript, polling
Published: 2021-02-26 14:50:25

---
title: Poll backend endpoint in Vanilla js
published: true
description: 
tags: js,polling
//cover_image: https://direct_url_to_image.jpg
---

## Senario

You need to poll for status of an task until completed. Once it is completed you need to run some js code.

## Code

```js
// lib/poll.js
export const timeout = n => new Promise(resolve => setTimeout(resolve, n))

/*
  @fn: (any) => any Function to be executed
  @condition: (res) => Boolean Function to test if we can stop polling
  @maxTries: number Max number of calls allowed before rejection of promise
  @gap: number Minimum time (in ms) between two polls
*/
export const poll = async (fn, condition, maxTries, gap) => {
  while(maxTries--) {
    await timeout(gap)
    const result = await fn()
    if (condition(result)) return result
  }

  throw new Error('Poll Timeout')
}
```

## Usage
```js
const fetchStatus = () => this.$axios.get(`/orders/23222/status`)

poll(fetchStatus, ({status}) => status != 'PENDING', 30, 1000)
  .then(result => console.log(result)) // success!!
  .catch(err => { ... }) // either Timeout or XHR failed with error

```
Cheatsheet Collections
Published: 2021-02-28 07:34:14

It's been a few years now, working with various techs throughout my career and It took me a lot of googling effort to find a proper syntax whenever needed. In order to simplify this, I created a few cheatsheets that can help you(might be). Have a look and utilize if needed.    

*PS: Editing and Addition will be In-Progress Mode*

* *[CronTab](https://github.com/supersaiyane/Cheatsheet-Crontab)*
* *[Go](https://github.com/supersaiyane/Cheatsheet-GO)*
* *[AsciiDoc](https://github.com/supersaiyane/Cheatsheet-Asciidoc)*
* *[OpenShift](https://github.com/supersaiyane/Cheatsheet-OpenShift)*
* *[Nano](https://github.com/supersaiyane/Cheatsheet-Nano)*
* *[Git](https://github.com/supersaiyane/Cheatsheet-Git)*
* *[Nginx](https://github.com/supersaiyane/Cheatsheet-nginx)*
* *[Kubernetes](https://github.com/supersaiyane/Cheatsheet-Kubernetes)*
* *[Linux](https://github.com/supersaiyane/Cheatsheet-Linux)*
* *[Python](https://github.com/supersaiyane/Cheatsheet-Python)*
* *[Markdown](https://github.com/supersaiyane/Cheatsheet-Markdown)*
* *[VIM](https://github.com/supersaiyane/Cheatsheet-Vim)*
* *[Docker](https://github.com/supersaiyane/Cheatsheet-Docker)*
* *[Chef](https://github.com/supersaiyane/Cheatsheet-Chef)*
* *[Helm](https://github.com/supersaiyane/Cheatsheet-Helm)*
* *[Emoji](https://github.com/supersaiyane/Cheatsheet-Emoji)*
What are the Feature Driven Development Process?
Tags: beginners, testing, tutorial, dev
Published: 2021-03-01 06:21:47

Feature Driven Development Process is consist of five-phase, those are:
**1. Develop an Overall Model.**
**2. Build a Features List.**
**3. Plan By Feature.**
**4. Design By Feature.**
**5. Build By Feature.**
![Random 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/914v4oyg18zeisb103ng.png)
 

*Process 1: Develop an Overall Model:*
Make a **modeling group**. Build a **high-level object model** by walking around the domain. **Keep a log** of your thoughts.
The goal is for team members to establish a strong **understanding of the problem domain** and lay a solid foundation.

*Process 2: Build a Features List:*
All features are grouped into three levels: **Domain Subject Area, Business Activity, Features.**

*Process 3: Plan By Feature:*
**Make an initial schedule**: Developed at the level of individual characteristics based on prioritizing based on business value.
Consider the following factors: **dependencies, difficulty, and risks.**
**Assign duties to members of the team:** Identify the Class Owners, Chief programmers should be assigned feature sets.

*Process 4: Design By Feature:*
Create **Featured Teams**. Members of the teamwork **together on the entire low-level analysis and design**.
Certain features may necessitate the involvement of domain experts. To support their changes, **teams must update the model artifact.**

*Process 5: Build By Feature:*
**Implement** the feature that **you've planned**. **Unit-level and feature-level testing**.
Inspections of the building code are required. **Integrate with the standard build process.**
Underrated Articles on Dev.to from Last Week
Tags: top7, webdev, bestofdev, meta
Published: 2021-03-02 12:39:10

Hello! I'm back with another installment of underrated articles from last week! 

Let's check them out 🔥 -

## 1. Pass data from the frontend to backend

Sebastian writes a detailed yet simple guide, for passing data from the frontend 👩‍🌾 to the backend 🏌️‍♂️ 

{% link https://dev.to/gbudjeakp/how-to-connect-your-client-side-to-your-server-side-using-node-and-express-2i71 %}

## 2. Contribute to open source

It is a great post for beginners 🐶, who want to contribute to open-source projects 🌎

Shahed highlights the importance of basic points, that'll help everyone who is considering contributing.
{% link https://dev.to/shahednasser/tips-for-beginners-to-open-source-2m0e %}

## 3. SSR with React

In this article, we will be looking at how to build an SSR application using React 😱. Pros and cons are also mentioned in this article 😉.
{% link https://dev.to/asayerio_techblog/server-side-rendering-ssr-with-react-2oa6 %}

## 4. Develop software design skills

Kevin describes how he developed his software design skills that enabled him to level up from a junior developer 😊 to a senior developer 😍, tech lead 🤩, and ultimately software entrepreneur 😉 and CTO 😎 
{% link https://dev.to/kgilpin/how-to-level-up-your-software-design-skills-4ead %}

## 5. Overlay Icon on an image using CSS

Sanchitasr wrote steps to overlay the components on the image🎨. This is a great post to make us understand how the overlaying of icons works in CSS🎪.
{% link https://dev.to/sanchithasr/how-to-overlay-icons-on-top-of-images-with-css-1kb9 %}

*That's all for this week! These were our personal favorite underrated posts from last week, and we hope you liked them. Tell us about your favorite posts that went underrated in the comments below!* ❤️
RASA - Messaging channels - Twilio
Tags: rasa, chatbot, nlp, ai
Published: 2021-08-05 07:41:24

Messaging channels are interfaces such as Facebook Messenger, live chat window on a website, smart speaker etc.

Rasa uses pre-built connectors for a variety of messaging channels. You can also create your own custom connector.

In this article, we will connect our chatbot to the Twilio. We will be then able to communicate with the chatbot via SMS (text messages). 

Our assistant is running locally on our PC. To make it available to external services, we will use [ngrok](https://ngrok.com/download). This tool simulates hosting our assistant on a server by creating a tunnel URL.
Download ngrok and make it available on `PATH`.

Create a [Twilio](https://www.twilio.com/try-twilio) account, if you don't have one already.
Then, create a new project.
After you have created the project, go to Console Dashboard.
Click *Get a trial phone number* and choose a phone number.

On the **Console Dashboard** – from the **Project Info** section – copy **Account SID**, **Auth token** and **Phone number** and add it to `credentials.yml` in the following format:
```yml
twilio:
  account_sid: "<your account sid>"
  auth_token: "<your auth token>"
  twilio_number: "<your twilio number>"
```

Run the rasa server: `rasa run`.
In a new terminal window, run the actions server: `rasa run actions`.
In a new terminal window, run ngrok: `ngrok http 5005`.
Ngrok is listening on port 5005 since this is where the rasa server is running.

Copy the https version of the tunnel URL that was generated by ngrok and go to Twilio **Phone Numbers** page. Click on your assigned phone number in **Active Numbers**.
In **Messaging** section, put inside the **A message comes in** webhook input box the https URL from ngrok followed by `/webhooks/twilio/webhook` and save.

![Twilio setup webhook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xl3kxolxp67745ohcbon.png)

Send a text message to that Twilio phone number and the chatbot will reply!

You can connect as many messaging channels as you want.

To learn more about Twilio channel connector, visit the [documentation](https://rasa.com/docs/rasa/connectors/twilio).

You can learn more about messaging channels in the [documentation](https://rasa.com/docs/rasa/messaging-and-voice-channels).

Repository for this tutorial:
{% github petr7555/rasa-dev-tutorial no-readme %}

You can checkout the state of the repository at the end of this tutorial by running:
```bash
git clone --branch 19-messaging-channels git@github.com:petr7555/rasa-dev-tutorial.git
```
Encyclopedia of Applied in Information Technology
Tags: tutorial
Published: 2021-03-02 00:56:58

Whatever you do in science research, you have to clear understand the roots and focus on the basic knowledge. And here are some useful websites for programming learners
## [OSChina](https://www.oschina.net/project)
{% embed https://github.com/topics %}
{% embed https://gitee.com/explore %}
{% embed https://stackoverflow.com/tags %}
Insights on the Impact of COVID19 on Software Development
Published: 2021-03-02 09:35:41

Hi Dev Community! Hope you all are doing good


I know its hard to take out few minutes for someone else .. But I request you all to please spare some time and participate in my research survey about the impact of COVID19 on software developemnt..

https://forms.gle/2K3NK4Gk5baHZ3Xb8

Your valuable participation will add a huge value to my research ..I will be very obliged for your 5 minutes 

Regards
Zoia Ismail Khan
COMSATS University Islamabad Pakistan
External Dependencies
Tags: architecture
Published: 2021-03-02 10:38:40

What is the most difficult stuff to manage in software? I would say external dependencies.

🏗 As soon as we connect to an external system. Being a database, a queue, or an API, we get a dependency that we must maintain for the system's life.

🤔 If the dependency change, we are forced to change our software because we don't have control.

🎓 Worse still, if we blend the dependency with our business code. Then we are in for a world of pain.

Don't be that guy. Do it right instead.

✔ Use interfaces to services in your business logic

✔ Make a bridge towards external services, so changes are contained.

✔ Use ports and adapters style architecture to protect your code.
Daily Developer Jokes - Tuesday, Mar 2, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-03-02 13:00:16

---
title: "Daily Developer Jokes - Tuesday, Mar 2, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Tuesday%2C%20Mar%202%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259a186412.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q___: Why do developers use mechanical keyboards?

___A___: To strongly type their code.
 -->
Create simple animated bar chart in React
Tags: react, javascript, webdev, css
Published: 2021-03-02 19:38:11

###Did you know you don't need much to build an animated bar chart? 
In this article, I will try to explain how to get such an effect with React. 📊

__Before we start__, I would highly recommend you to check out __runnable example__ for the solution on our website:
[Create simple animated bar chart in React](https://dirask.com/posts/1GB6Ej)

Final effect of the post:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cd1gqqn94yky0r3di0c0.png)

The main idea is to create individual bars that are described from 0 to 100%. The bars are arranged sequentially next to each other in a chart, using an example data set
based on the cosine function.

Each change of the dataset describing the chart causes a smooth re-rendering (this happens due to a simple style called `transition`).

The whole effect is achieved with a few lines, most of the effect is actually styles. 🎨

Practical example:
```jsx
import React from 'react';
import ReactDOM from 'react-dom';

// ---------------------------------

const containerStyle = {
  	padding: '0 1px',
  	background: '#ffffff',
  	flex: '1'
};

const spaceStyle = {
  	background: '#ffffff',
  	transition: '0.3s'
};

const barStyle = {
  	background: '#00cc00',
  	transition: '0.3s'
};

const Bar = ({value}) => {
  	return (
      <div style={containerStyle}>
        <div style={{...spaceStyle, height: `${100 - value}%`}} />
        <div style={{...barStyle, height: `${value}%`}} />
      </div>
    );
};

const chartStyle = {
  	width: '400px',
  	height: '300px',
	display: 'flex',
  	overflow: 'hidden'
};

const Chart = ({data}) => {
	return (
      <div style={chartStyle}>
        {data.map((value, index) => <Bar key={index} value={value} />)}
      </div>
    );
};

// ---------------------------------

const calculateData = (xOffset) => {
	const data = [ ];
    for (var x = 0; x < 3.1415; x += 0.1) {
        const y = Math.cos(x + xOffset) + 1;
        data.push(50 * y);
    }
  	return data;
};

const App = () => {
    const [data, setData] = React.useState(() => calculateData(0));
  	const xOffsets = [0, 0.7853, 1.5707, 2.3559, 3.1415];
    return (
      <div>
        <Chart data={data} />
        <br />
        <div>
          <span>xOffset: </span>
          {xOffsets.map(xOffset => {
              const handleClick = () => setData(calculateData(xOffset));
              return (
                <button key={xOffset} onClick={handleClick}>{xOffset}</button>
              );
          })}
        </div>
      </div>
    );
};

export default App;
```
You can run this example [here](https://dirask.com/posts/1GB6Ej)

What do you think about such a chart? Do you think it would be possible to construct a simple library for different types of charts?

Let me know in the comments! 😊
_____________
## Write to us! ✉
If you have any problem to solve or questions that no one can answer related to a React or JavaScript topic, or you're looking for a mentoring write to us on [dirask.com -> Questions](https://dirask.com/questions)