teleren/devto huggingface dataset:
Cron with Lando
Tags: docker, lando, cron
Published: 2020-02-27 12:43:29

---
title: Cron with Lando
published: true
description: Get cron scheduled tasks running in a Lando local dev environment.
tags: docker, lando, cron
---

**Update Feb 28, 2020:** It turns out that cron runs within it's own limited environment. See below for more details.

In Laravel, we want the following cron configuration to fire the framework's scheduler. Place this in a file somewhere within your project code base. I went with `resources/config/cron.txt`.

```
* * * * * php /app/artisan schedule:run
```

> **Note:** The cron daemon was designed in such a way that it does NOT execute commands within your normal shell environment. That means your $PATH will not match your container's, and your php.ini memory limit may not be set. That said, we need to supply the full path from within the Lando container to `php`. Typically, this will be `/usr/local/bin/php`. In that case, use the following:

```
* * * * * /usr/local/bin/php -d memory_limit=-1 /app/artisan schedule:run
```

Next, we need to get cron installed. You'll want to perform this as root during build.

```
    build_as_root:
      - apt-get update -y
      - apt-get install cron -y
```

Now, we're ready to fire the cron service. Because cron services all users in a system, it must be started with root priviliges.

```
    run_as_root:
      - service cron start
```

Here we are, born to be kings; we're the princes of the the universe.

Oh, sorry, off on a tangent. Okay, we can now store our cron config with crontab.

```
    run:
      - crontab /app/resources/config/cron.txt
```

Put this altogether, and you will have arrived.

```
name: my-project
recipe: laravel
config:
  webroot: public
services:
  appserver:
    build_as_root:
      - apt-get update -y
      - apt-get install cron -y
    run_as_root:
      - service cron start
    run:
      - crontab /app/resources/config/cron.txt
```

Check that things have gone as planned.

```
$ lando ssh
www-data@ba70770a45a1:/app$ service cron status
[ ok ] cron is running.
www-data@ba70770a45a1:/app$ crontab -l
* * * * * php /app/artisan schedule:run
www-data@ba70770a45a1:/app$ 
```

Enjoy.
Using `styled-components` to Style Someone Else's Component
Tags: react, javascript, microfrontends, draftjs
Published: 2020-02-27 12:25:55

## Introduction

In writing micro front-ends (MFEs), I've made heavy use of [styled-components](https://styled-components.com/) to easily scope my CSS to just the single MFE that I'm working on to help avoid style collisions with both other MFEs on the same page as well as the legacy applications that integrate the apps that I'm writing.

This went swimmingly for both my custom components in my component library as well as the components my team chose as a base ([bootstrap-styled](https://bootstrap-styled.github.io/v4/)).

## Styling Someone Else's Component

But when it came time to start using third-party components that shipped their own CSS along with their components, I became worried.

Thankfully, `styled-components` handles this situation gracefully. You simply need to be able to pass a `className` prop to the component you are trying to target. And if that specific component does not accept that prop, you can get around that by creating a higher-order component that just has a wrapping div with the `className` passed to it.

### This is exactly what I had to do with [Draft.js](https://draftjs.org/):

{% gist https://gist.github.com/thatzacdavis/6ed354f46f54369c556b6a429bc0e8be %}

With that `className` prop, `styled-components` was able to do its magic and make my `Draft.js` instance look exactly how I needed to without leaking any styles to the rest of the page by creating CSS rules that only took effect within the context of the randomly generated class name that `styled-components` gave that wrapper div.

### So, CSS like this placed into a `styled-component` definition:

{% gist https://gist.github.com/thatzacdavis/88a77bdc8339fe0365bd2dc5901a9e4c %}

...still produced a normal-looking rich-text area that was micro front-end ready. Allowing me to not worry about the importing the CSS file from `Draft.js`.

This strategy works for any component that has known class names that you can target, making it a viable solution for most third-party components out there.
Code is a means, not a goal because software engineers solve business problems
Tags: software, engineering
Published: 2020-02-27 11:58:22

---
title: Code is a means, not a goal because software engineers solve business problems
published: true
description: Let's be honest. Few care about the intricacies of programming outside the developer community. What people crave, though, are solutions, regardless of the implementation details.
tags: #software #engineering 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/z92y661etcowkr3n2xi1.png
---

> [Extract from Best Practices: recommendations based on clean coding principles for teams working on TypeScript/JavaScript web application](https://thekarel.gitbook.io/best-practices/)

There are many reasons to write software: for fun, for learning, as a hobby, often as a job. But first and foremost, engineers should satisfy business needs.

When it comes to decisions about technology or processes, the fundamental question then should be: how will this move the project towards the ultimate goal - delivering a solution?

This type of thinking can prevent technology choices that are motivated only by curiosity (also known as "CV Driven Development") or the imitation of others.

> What people crave are solutions, regardless of the implementation details.

Create a minimal end to end journey as soon as possible. Treat it like a skeleton and add the "meat" later. A working draft brings clarity by serving as a roadmap towards essential goals. Knowing where to go helps avoid getting bogged down in details (over-engineering), leaving no time for crucial features (under-engineering).

Code is a means, not a goal. Writing more doesn't necessarily help. Adding code is not always the answer - keep the priorities in mind.

Clients expect software systems to work for an extended period and also to evolve as requirements change. So we can't be too myopic. But today has priority over the uncertain future - more on this soon.

Interested in delivering solid applications quicker? Continue reading my [Best Practices here](https://thekarel.gitbook.io/best-practices/).
Learn to Build & Scale Your Remote Team: Running Remote Conference 2020
Tags: soshacerunningremoteevents
Published: 2020-02-27 12:22:15

---
title: Learn to Build & Scale Your Remote Team: Running Remote Conference 2020
published: true
date: 2020-02-27 11:53:51 UTC
tags: Soshace RunningRemote Events
canonical_url: https://blog.soshace.com/learn-to-build-scale-your-remote-team-running-remote-conference-2020/
---

 

![](https://soshace-12d3e.kxcdn.com/wp-content/uploads/rcl-uploads/articles/2020/02/7435883.jpg)

Learn to Build & Scale Your Remote Team: [Running Remote Conference 2020](https://runningremote.com/?utm_source=soshace)

20-21 April 2020, Etter-Harbin Alumni center, Austin, USA

If you are serious about managing remote teams, this event is for you. Running Remote is carefully curated to teach you next-level, actionable strategies and tactics you can utilize the very next day to manage and grow your distributed team.

Running Remote’s  mission is to provide the education and tools that founders & professionals need to succeed in the future of work. This is a gathering of leaders who will share everything they’ve learnt running a remote-first organisation.

Running Remote 2019 had 26 speakers, 20 sponsors, 80 partners and 413 attendees from 46 countries. 57% of attendees were CEO’s/Founders/VP’s coming primarily from SaaS, consulting, web & app dev, and e-commerce.

In a post-event survey, 54% said that conference exceeded their expectations, and three out of four would recommend it to their friends and colleagues. Since 2018 the number of attendees has grown twice. When polled 75% of the attendees said they’d  like to come back.

2020 lineup is still being finalized, but it already looks amazing:

- **Wade Foster,** CEO of Zapier, a workflow automation tool used by over four million of people;
- **John Eckman** , CEO of 10up, a distributed digital agency with 175 remote workers;
- **Sally Thornton,** Founder of Forshay;
- **Andy Tryba** , CEO of Crossover & Sococo;
- **Andreas Klinger,** the Head of Remote at AngelList, the leading platform for startups;
- **Sara Sutton,** CEO of FLexJobs, an award-winning, innovative remote career web platform, and the winner of a Young Global Leader nomination by the World Economic Forum in 2014;
- **Rachel Russell** , Flexible Work Lead at Microsoft;
- **Matthew Kepnes** , Founder of Nomadicmatt.com, one of the pioneers of the digital nomad movement;
- **Lori McLeese** , the Global Head of HR at Automatic Inc. with over 900 team members in 70 countries;
- **Dan Martell,** Founder of SaasAcademy, the leading coach of high-performing SaaS founders;
- **Tara Vasdani** , the Founder of Remote Law Canada, nominated for Canadian Lawyer’s Top 25 Most Influential Lawyers in 2018 and 2019;
- **Morgan Legge,** Director of Operations at Convert.com, a website personalization service that is based on Holacracy framework;

Get Discounted Ticket today only at $799!

The post [Learn to Build & Scale Your Remote Team: Running Remote Conference 2020](https://blog.soshace.com/learn-to-build-scale-your-remote-team-running-remote-conference-2020/) appeared first on [Soshace](https://blog.soshace.com).
The Real Cost Of Hiring & Keeping Poor Performers
Published: 2020-02-27 11:48:24

Apparently, the toughest decisions are the ones that are related to people. Hire, fire, promote, or reward, all these four tasks are the toughest. Once made, they cannot be undone. 
Forget bad hires, we are saying any hire who is less than an A type is costing you. 

**Pro Tip:** Keep analysing your employees every six months to take better hiring, firing, rewarding and promoting decisions.

Lower productivity, not being regular, no initiative- they are all the typical indications of a low performer. Other than the financial repurcussions the real cost that you are missing on is something else. The bad hire is a question on your abilities and the power of decision-making. 

This starts impacting your top employees as well. Highly passionate and engaged, they, in the end, are also humans who lead by example. But the poor and incompetent performers drive even the top ones away. When top performers stop feeling motivated enough, they start looking for other job opportunities. Worst case scenario, your competitor gets to harness the skills and knowledge of your top performer. HR software in India and on time [attendance management software] (https://hrone.cloud/attendance-management-software/) are helping employers improve such scenarios by helping them in decision-making. 

However, apart from using HR software in India, here are some other things that only a human eye can scan better. Here are some of the ways to spot that top performer at the time of hiring.

● **Innate talent:** Some candidates already have the qualities and talent in them while some are struggling to fit themselves in it. Identify the talented ones and hire them. 
● **Curious:** When a candidate is a keen and quick learner, he is more adept to new environment, technology. These are the kind of candidates that you should prefer the most. 
● **Devoted:** More than experience, what should matter the most is the devotion, hunger that a candidate has for his work. Look for the same. 
● **Confident:** Whether you are hiring for a managerial position or an executive one, confidence is another great trait every hire must possess. 

If you have hired great people, it becomes your responsibility to give them the treatment they deserve and keep them happy. 

● **Teach:** The top performers always have a quest for knowledge. So, teach them, organise workshops etc, so that they can learn more. 
● **Lead:** It is very important for top performers to be lead by the best. Someone who is incapable of leading them really makes them frown. 
● **Reward:** What you may feel is a reward may not make the employees feel rewarded. So, analyse. Some may value recognition, some may find a promotion or a trip more rewarding. You can use [HR software in India](https://hrone.cloud/hr-software/) to communicate and appreciate the employee and his accomplishments. 
● **Give credit:** Some managers are very sly, they try to snatch the credit of their subordinates. Spot such managers and replace them with someone who knows how to lead and treat the top performers.
Question About useEffect && setTimout
Tags: react, help
Published: 2020-02-27 11:48:08

Hey, 
each time i am resetting the counter to 3 ( on the second useEffect )
somehow the last useEffect is still running, so i get infinity timeouts calls.
*Clearing the timeout on the first useEffect fixes the proble, was wondering why its cauesing Infinity calls tho
Thanks for the help, srry for the bad english :)
```javascript
const [counter, setCounter]  = useState(15)
 useEffect(() => {
  const timer = setTimeout(() => setCounter(counter - 1, 1000)
}, [counter])
useEffect(() => {
 if (counter === 0) {
  setCounter(3)
 }
}, [counter])

```
POSTGRESQL GİRİŞ
Published: 2020-02-27 11:42:51

# POSTGRESQL'E GİRİŞ

İnternet üzerinde karşılaştığınız rehberlerde genellikle  'postgres' varsayılan Postgresql kullanıcısıdır.Bu sebeple linux postgres kullanıcısı ile veritabanındaki postgres kullanıcısına  bağlanabilmemiz için parola gerekmez.
İlk yol olarak;
```sh
$ sudo su - postgres 
```
Komutu ile postgres kullanıcısına geçiş yapabiliriz bazen sudodan kaynaklı hatalar alabiliriz o durumlar için
```sh
$ su -postgres 
```
Komutunu  denemenizi öneririm.

 
```sh
posgtres@linux5:$  
```
Karşımıza  yukarıdaki gibi bir çıktı geldiğinde başarılı olduğumuzu anlayabiliriz.
daha sonra , aşağıdaki komutu kullanrak  istemciye geçebiliriz.
```sh
$ psql 
```

Aşağıdaki gibi  bir komut çıktısı geldiğinde doğru bir şekilde istemciye geçiş yapabildiğimizi anlayabiliriz.
```sh
postgres=#_ 
```
İkinci bir yol olarak;
Aşağıdaki komut ile de direkt olarak postgres kullanıcısı ile postgresql kabuğuna  bağlanabiliriz.
```sh
$ sudo -u postgres psql 
```
# Varsayılan Parolanın Değiştirilmesi
Aşağıdaki komutları  çalıştırarak postgres kullanıcısının parolasını değiştirebiliriz. Güvenlik açısından bu adımı uygulamamızı öneriyorlar.
İlk yol olarak interaktif kabuk ile bağlanıldığında ,
```sh
ALTER USER postgres PASSWORD 'parola'; 
```
Aşağıdaki komut çıktısı ile karşılaşıyorsak parola değişiminde  başarılı olmuşuz anlamına gelmektedir.
```sh
ALTER ROLE 
```

İkinci bir yol olarak tek satırda çalıştırmak istersekte ,
```sh
PGPASSWORD='parolanız' psql -c "ALTER USER postgres PASSWORD 'parola'" -h localhost -U postgres"
```

Son olarak psql istemcisinden çıkabilmek için 
```sh
'\q' 
```
Komutunu kullanmalıyız.

# POSTGRESQL KULLANICI OLUŞTURMA:
Postgresql de kullanıcı oluşturmanında yine  birden fazla yolu bulunuyor.
İlk olarak postgres kullanıcısında iken 
```sh
createuser 'kullanıcıAdı'
```
Komutunu kullanarak oluşturabiliriz.

Ayrıca interaktif kabuk ile bağlanıldığında ,
Client içerisinde iken
```sh
CREATE ROLE 'kullanıcıAdı';
```
İle kullanıcı oluşturabiliriz.( Client içerisinde  komutların sonuna ';' konulması gerekiyor.)
```sh
CREATE ROLE 
```
Yukarıdaki komut çıktısını  gördüğümüzde kullanıcıyı başarılı bir şekilde oluşturduğumuzu anlayabiliriz.
Son olarakta 
Tek satırda çalıştırmak istersekte ,
```sh
PGPASSWORD='parolanız' psql -c "CREATE ROLE 'kullanıcıAdı'" -h localhost -U postgres" 
```
Komutunu yazarakta  kullanıcı oluşturabiliriz
Kotlin becomes the 2nd most popular language on the JVM
Published: 2020-02-27 10:46:36

This post is a part of our annual JVM ecosystem report! This report presents the results of the largest annual survey on the JVM ecosystem, showing results from the survey gathering over 2000 responses in the second half of 2019. 
You can read the [full report](https://snyk.io/blog/jvm-ecosystem-report-2020/) on our website or download the nice and shiny pdf version.

## What is the main JVM language you use for your main application?
While the variety of JVM languages grew over the last couple of years, the large majority of JVM users — nearly 9 out of 10 — still use Java as their main language.

One of the reasons we see this consistently large percentage over the years, is the fact that Java
is constantly changing. Many of the language constructs and paradigms that other JVM languages have been using to differentiate themselves from Java, have been introduced and implemented in Java, such as local type inference, and lambdas, to name just a couple. The new Java release cycle also makes these new features available to developers earlier than before.

However, despite the strong preference for Java, the use of other JVM languages grew as well. Particularly Kotlin, a language developed by JetBrains, gained a lot of popularity over the last couple of years. In fact, Kotlin grew from 2.4%, according to last year’s report, to an impressive 5.5%.

![image11](https://snyk.io/wp-content/uploads/11.png)

The growth of Kotlin adoption, among JVM users, is not surprising considering how seamlessly it integrates with Java. Not to mention that, the adoption of Kotlin in frameworks like Spring Boot made it easier to create production-grade systems

It is important to note that, the innovations Kotlin tries to achieve flow back into the development of Java. Newer Java versions try to integrate concepts that are popular and loved in languages like Kotlin. It is interesting to see how this influences the future adoption of different JVM languages.

## Do you write or maintain any Java applications? For those who don’t use Java in their main application, do they use it at all?
Not every JVM developer uses Java as their main language. Based on the responses to the previous question, JVM developers who predominantly use other languages in their application, account for 13%. Out of this group of developers, the majority (70%) still uses Java in some capacity, during their regular work.

This means that 96% of overall respondents use Java, either as their main language or to a smaller extent, in their application. Only 4% of respondents run applications on the JVM that entirely use alternative JVM languages.

![image12](https://snyk.io/wp-content/uploads/12.png)

Read the complete [JVM Ecosystem report 2020](https://snyk.io/blog/jvm-ecosystem-report-2020/)
The Top Node.js HTTP Libraries in 2020
Tags: node, http, library, top
Published: 2020-02-27 10:44:58

---
title: The Top Node.js HTTP Libraries in 2020
published: true
description: Which AJAX and request libraries should you use in your Node.js application in 2020? Here's a list of the most popular and reasons to choose, or avoid, each.
tags: node, http, library, top
cover_image: https://blog.bearer.sh/content/images/size/w1000/2020/01/node-packages.png
canonical_url: https://blog.bearer.sh/top-node-request-libraries/
---

Out of the box, Node.js offers the `http` library for making requests, but it isn't particularly user friendly and requires some customization before it can be easily used. As a result, a large ecosystem of third-party libraries have emerged to make AJAX and HTTP requests easier.

Some offer cross-platform (browser and Node.js) support, while others focus on bundle size or developer experience. With some many options, how do you choose?

To help make your decisions on picking a library a little easier we've assembled a list of the top Node.js HTTP request modules, along with implementation details and feature rundowns.

⭐️ [Read on...](https://blog.bearer.sh/top-node-request-libraries/?utm_source=dev&utm_medium=crosspost&utm_campaign=top_node_http_lib)
How I feel reactJs project after JavaScript.
Tags: react, javascript
Published: 2020-02-27 10:43:39

Hello folk,
I started just basic html when it was last month of 2018 and keep learning.
After 1-2 month I think html is just skeleton of web page and than I started css, than I feel little bit of comfortable to interact the web page and the design.
That time I have design some web page and feel proud to design more and more. Than again, I see my web page not have behavior and I am useless this too things than I research more and more, after research I started to learn javascript than I feel programming what can do and how those programming can be interact.
After learning javascript basic and found a lot of programming and lot of tools of webpage and there library, frameworks. Also understand the tools and way to make the webpage like others business and portfolio etc pages.
I have seen many people doing great jobs and great life of coding using js library and frameworks than I think that I have to learn reactJs and this is now my position to learning from internet with cheap Computer and poor internet connection at my home. my first reactJS project that I feel very tough without proper understand of html, css, js but I feel little bit of easy to do though it's tough for newbie because everything of javascript and jsx, webpage and multiple folder , packages etc. But, when I think about reactJs, it's not only reactJs but also I have to know about other library which is related of reactJS for example, react-router, react-redux, npm using to find any pack , for UI like material UI etc.
Hope, Lord will give me more patient and inspiration to learn more and doing more project.
Here is my first ReactJS project below. 
<a href="https://nikhilroy2.github.io/ReactJs-Project-1/"> https://nikhilroy2.github.io/ReactJs-Project-1/</a>
Thanks all.
Make your `console.life` easy !
Tags: javascript, vscode, productivity
Published: 2020-02-27 10:33:20

---
title: Make your `console.life` easy !
published: true
description: code readability improvement
tags: javascript,vscode,productivity
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/vhr2lqtajf5cp6w68six.png 
---

Using [Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments) and a [VSCcode snippet](https://code.visualstudio.com/docs/editor/userdefinedsnippets) we can achieve this :

![clg](https://dev-to-uploads.s3.amazonaws.com/i/ydbcjdkxwqlop8pm9pyw.gif)

`VSCode Snippet`:

```json
	"Console.log()": {
		"prefix": "clg",
		"body": [
		  "console.log('$0') // !DEBUG"
		],
		"description": "Console method log()"
	}
```
What we have now is a [clg + enter] autocomplete with a red colorized debug comment that highlights your debugings :)

- easy to use and configure
- no more time consuming looking for lost `console.log` in your code
- code readability improvement

Be proud !
Tailwind UI here to help speed up your UI development
Tags: tailwindcss, css, webdev, productivity
Published: 2020-02-27 09:30:32

Just want to share this lovely resource to every Tailwind css fans here, please check the cool Tailwind UI from: 

https://tailwindui.com/

Simply saying, it provides different kinds of pre-built html components templates styled with Tailwind css utilities.

![Tailwind UI screenshot](https://dev-to-uploads.s3.amazonaws.com/i/kau67aggo3e7on305e1g.png)

Though you can have full access to all the components only after subscribing and not all the designed components are available now, you can still have a good lesson by learning how the creators of Tailwind CSS implemented the components with Tailwind CSS.

![preview components screenshot](https://dev-to-uploads.s3.amazonaws.com/i/boiahp31a74wu70rmch4.png)

Last but not least, Tailwind CSS just added utilities to support CSS grid, transform and transition in its latest released version. Try it and you will love it! 

Learn more about Tailwind CSS at: https://tailwindcss.com/