teleren/devto huggingface dataset:
Seven Ways To Trick Your Brain Into Working
Published: 2022-11-11 06:29:14

While building a bootstrapped startup, I realized early on that the whole heuristic of measuring a startup comes down to the habits that I have constructed that can repeat on a day to day basis consistently for months and years.

I have already written that in the case of Proxies API, my SAAS startup, the two main habits that have made it successful were.

a) Make small, consistent improvements to the product every single day.

b) Write (blog, make videos) every single day.

Now, this is a big ask. I have been able to maintain a streak for months now. So in this marathon, you don’t always feel it. Here are some hacks I have used to get my brain back into perspective that lead to the success of habit-building, which in turn leads to the success of the startup.

1. Have an impersonal, clear goal. I/we need to get x to y in x days/months under these constraints/conditions. The only rule here is that the goal should not be personal. Personal goals are ones that have a feeling of vendetta like a Gollum would create. They are created in mind, and you don’t get a sense that they are natural.

**Personal vs. Natural Goals**

2. **Have a work backward excel sheet**: Life is long. We eat three times, need to go to the toilet ten times, clean up, meet friends and family, power off for 6 hours, and then there are social media, there is Trump, and North Korea is attacking us. In all this, it is difficult to remember what it takes to get to that long term goal. What do we have to do this again? What should be the minimum calls I need to do to get my target number of clients? How many words should I write to keep on track for my goal of having a decent content base to attract SEO and other inbound traffic again? We can’t recalculate it every day. Best to have it in a ‘working backward’ sheet that can be tweaked based on what we learn from reality.

3. **The brain needs reminding**: Again, in a marathon with a hundred distractions, it is easy to forget the daily targets, the exact strategies we had researched and decided on early in the planning phase. I find that reading my goals and my strategies every day reminds my brain before it becomes vague.

4. **Remind yourself first thing in the morning**. Ideally, before checking the phone, definitely before any social media or emails. Your goals don’t get overshadowed by concern for how the world is about to end. Someone tweeted something because your neighbor posted a picture from their vacation.

5. **Use the 2-minute rule** to get a ton of small tasks done very quickly and promptly.

6. **Do a brain dump**. My brain will get overwhelmed because of all the choices of actions, tactics, growth hacks, and strategies out there. I use the brain dump every two weeks at least to overcome this and get moving again.

7. **Make it inevitable**. I approach everything with a sense of wanting to make the result inevitable, so instead of doing the bare minimum, I tend to do the overwhelming maximum, and also I make it almost a part of destiny by setting up my environment. More about this technique that I learned from Eben Pagan.
WN45: What is the best piece of content you found?
Tags: webdev, todayilearned, discuss, angular
Published: 2022-11-11 05:38:22

Another week has passed, and here we want to get the best pieces of content you found during the week!

It really can be anything:

- videos
- posts
- tweets
- books
- motivation
- etc.

Share anything that added value to your journey and could add value to other people's journey.

So, what is the best piece of content you found this week?

Last week I proposed his youtube channel [PedroTech](https://www.youtube.com/c/PedroTechnologies).

This week I'll share excellent Angular resources!
How To Use Toastr Notification In Laravel 9
Tags: laravel, laravel9, toastrnotification, jquery
Published: 2022-11-11 05:30:00

In this article, we will see how to use toastr notification in laravel 9. Using toastr.js you can display a success message, warning message, and error with the help of a session in laravel 9. 

So, in this article, we will learn about the laravel 9 toastr notifications example and how to add custom toastr notification messages in laravel 9.

There are many types of notifications available to display different messages in laravel 9 or PHP. 

Display messages using bootstrap modal, simple pop-up notifications using jquery, display notifications using flash messages, and toastr message notifications. 

Also, you can customize as per your requirements like a progress bar, close button, and the timing of notification showing.

So, let's see the toastr notification in the laravel 9 example.
Android vs iOS Development: Which One is Best?
Tags: android, ios, mobile, beginners
Published: 2022-11-11 05:23:28

By 2023, mobile apps are expected to generate at least $935 billion in revenue globally.

Entrepreneurs who focus on one platform at the beginning of their business have found success.

The most popular choice for startups is iOS, followed by Android. Depending on your circumstances, you may need to develop for Android first, or sometimes both platforms at once.

According to Statista, In August 2022, Android continued to hold the top spot in terms of mobile operating systems globally, dominating the market with a close to 70% share, while iOS held a share of around 28%.

So, which platform or mobile operating system should you choose? Read on to find out!

## Global Market Share: Android and iOS

According to Statcounter, Android’s Global Market Share: 

- Android: 71.5%
- iOS: 27.8% 

However, in the US the market share looks like this: 

- Android: 45.25%
- iOS: 54.42% 

## Android Vs iOS Development: Things to Care About Before Developing an App

Before you start developing an app following are the key points you need to take into account:
1) Target Audience 🎯
2) The Cost and Time of Development ⏳
3) App Development Budget 💰
4) Publishing Process ✅
5) Monetization of App 📱

## How to Choose a Reliable App Development Team for Building your App?
Now that you have read an entire article and are planning to build an app on Android, iOS, or Cross-platform, whatever platform you choose, deciding which app development company is reliable and professional is daunting.
 
Here are a few key points you should look into when choosing a reliable app development company for your project:
 

- Find a specialized company
- Review their portfolio
- Talk to their experts
- Discuss their development process
- Look into the project management tools they utilize
- Check for the support they provide
- Finalize the development timeline and estimate
- Kickstart your mobile app development project
 
Ready to build an app for your business, let’s connect with our mobile app development experts and discuss the project in detail. As a top mobile app development service provider, our expert team will help you navigate your app development challenges and devise a roadmap with a timeline and cost estimate.
 
You can reach us by filling out a form on our Contact Us page.  Get a cost estimate with a development timeline for your next mobile app development project.
 
Read detailed comparison here: https://bit.ly/3NY4zsq
How to insert element at any position in Slice Golang
Tags: go
Published: 2022-11-11 05:09:01

```
func Insert(array []int, element int, i int) []int {
	return append(array[:i], append([]int{element}, array[i:]...)...)
}
func main() {
	a := []int{10, 20, 30, 40}
	a = Insert(a, 30, len(a))
	fmt.Println(a)
}
```
Adding Unit Testing to OpenSSG
Tags: junit, java, opensource, staticsitegenerator
Published: 2022-11-11 03:59:02

I had felt the need to package my *OpenSSG* like *node.js* modules. I should have done packaging at the beginning of the project due to lack of my Java knowledge. I had delayed to find a way to package my app, but I tried to use `Gradle`. There are other ways to package Java command line app. I decided `Gradle` because one of repos that I found uses `Gradle`. 

```sh
❯ gradle test                                                                                     ─╯

BUILD SUCCESSFUL in 723ms
4 actionable tasks: 3 executed, 1 up-to-date
```
*I can run the test quickly with Gradle now*


I chose `JUnit` for my unit testing since it's the most popular Java testing framework. So I believe that learning `JUnit` will be great asset for me. And I had a bit of exposure from writing unit tests for `Crowdin CLI` project before. I know writing good test requires a lot of thinking and skills, however, `JUnit` assertion methods are less and simpler than Javascript assertions. 

I think writing unit tests is another important step to review my code to improve the logic and split the functions whenever necessary for better readability and easier modification. Since I did some refactoring work to split my code into much smaller chunks, writing unit test is not much difficult. But I found some errors while writing tests. One of the errors was in `getUrl()`. `getUrl()` is a recursive function that each child node calls parent node to complete file path. I realized that the root node is not add its data. So the link in sidebar menu has never been correct. And it didn't even add file extension after returning file path. And I updated `DomNode` copy constructor as per `SpotBugs` suggestion to deep copy the object. I had a doubt that it shouldn't be a deep copy in this case, and my unit test proves that I shouldn't have done that. And I also found that `setParent()` did not add the child to its parent. So the child knows the parent, the parent didn't. 

There are many bugs and edge cases while writing my tests, but I leave them for now as I need a major update to my argument validation logic as its complexity is too high right now. Moreover, it's almost impossible to read the logic, even myself. And I have some errors that are not handled properly. What's good about unit test, when I make a change, it can find things that break from my change. So I can prevent another bugs from my change. I had some test writing experiences in a co-op and open source projects. I couldn't understand why we write simple tests all over. Test didn't seem to do important work. But now I know the meaning of meme that the guy was disappointed by the co-worker who procrastinates writing unit tests. Especially, it's more important when the code base is large that hundreds of developers are working on. Unit test makes developers find the breaks early enough. And release process much faster with robust testing.
Content & Tooling Team Status Update
Tags: puppet, content, updates
Published: 2022-11-28 22:30:43

---
title: Content & Tooling Team Status Update
published: true
date: 2022-11-11 00:00:00 UTC
tags: puppet, content, updates
canonical_url: https://puppetlabs.github.io/content-and-tooling-team/blog/updates/2022-11-11-status-update/
---

Hello hello!

I’m sure you’ve all been as busy as us preparing for the end of Q4.

To quote [Gavin](https://github.com/GSPatton):

![](https://puppetlabs.github.io/content-and-tooling-team/images/gavin_slack_quote.png)

That means it’s holiday season now right?

I’m starting to get excited about 2023. As a team, we’ve achieved some great things this year. While not all visible, we’ve been laying the foundations for the next generation of content and developer tooling.

Hopefully, we will see work begin on the next iteration of [Puppet.Dsc](https://github.com/puppetlabs/Puppet.Dsc), bigger conversations around what is next for [PDK](https://github.com/puppetlabs/pdk) and focus on the quality of supported content.

## Puppet Approved

Just a reminder that the Puppet Approved modules process is running again. This is a chance for your module to become `Approved` on the forge. More information on this can be found [here](https://puppetlabs.github.io/content-and-tooling-team/blog/posts/2022-10-28-module-approval-process/).

That’s me for this week! Speak to you all soon!

## Community Contributions

We’d like to thank the following people in the Puppet Community for their contributions over this past week:

- [`puppetlabs-java#534`](https://github.com/puppetlabs/puppetlabs-java/pull/534): “Update package naming to differentiate between minor versions”, thanks to [sd-z](https://github.com/sd-z)

- [`puppetlabs-kubernetes#587`](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/587): “add new parameter containerd\_sandbox\_image”, thanks to [BaronMsk](https://github.com/BaronMsk)

- [`Puppet.Dsc#230`](https://github.com/puppetlabs/Puppet.Dsc/pull/230): “Adding case insensitive enum values”, thanks to [nickgw](https://github.com/nickgw)

- [`pdk#1189`](https://github.com/puppetlabs/pdk/pull/1189): “Adding more to description of puppet-syntax”, thanks to [davidsandilands](https://github.com/davidsandilands)

- [`pdk-templates#482`](https://github.com/puppetlabs/pdk-templates/pull/482): “Enhance class\_spec.rb file”, thanks to [bastelfreak](https://github.com/bastelfreak)
How to deploy React Apps On Netlify in Just Second's
Tags: netlify, react, deploy, webdev
Published: 2022-11-11 04:27:15

**A**t Netlify we use React in production and are familiar with the challenges in deploying it to production as well. Up until today, React has had no opinions on what to use with tooling, which has made deploying a unique problem to each project.

Today Facebook announced their opinated boiler-plate for getting React projects started. This is great news, since the ecosystem around getting React projects started has been in a state of Flux (see what I did there?).


**Steps to deploying your React app**
Now you can get a React project up and running with a few commands, and in less than 30 seconds you can have it deployed with Netlify. Here's how:

**Step 1: Install or create**

Open your terminal and enter the following:

```
npm install -g create-react-app
create-react-app hello-world
cd hello-world
npm run build

npm install netlify-cli -g
netlify deploy
```

Or deploy a create-react-app site with Netlify Functions support with just 1 click:


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

**Step 2: Choose a new project**

If you are using the netlify CLI, follow command line prompts and choose yes for new project and ./build as your deploy folder and voila you have a production React app!

If that was too hard to follow, here is a gif of me doing it:


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

You can also link to a GitHub repo for continuous deployment for specified branches and will grant you our nifty Deploy Preview feature.

Happy Hacking :)

**Step 3: Redirect and rewrite rules**

If you choose to use something for routing (like React Router for example), you will need to set up a [redirect and rewrite](https://www.netlify.com/docs/redirects) rule for the single page app.

That redirect rule would look like this:

```
/*    /index.html   200
```

This redirect rule above will serve the index.html instead of giving a 404 no matter what URL the browser requests.

You can add redirect rules to the _redirects file or to your netlify.toml config file. [For more information on redirects on Netlify checkout the docs.](https://www.netlify.com/docs/redirects)

[netlify](
https://www.netlify.com/blog/2016/07/22/deploy-react-apps-in-less-than-30-seconds/)
What if DEV became the new Twitter-like platform for developers?
Tags: discuss
Published: 2022-11-11 04:14:40

Just playing a "what-if" game. 

Do you think if Dev tweaked its content publishing model it might bring folks back in droves to Dev.to?

This is my personal opinion but as Dev audience has grown, the quality of posts have worsened, if Dev were just to extend headings to be the length of twitter posts with body articles being optional and more inline chat, could you imagine that?
Doing the mongodb hackathon
Tags: atlashackathon, javascript, webdev
Published: 2022-11-11 03:58:19

I recently logged into dev.to and saw on the front homepage how they were holding the atlas hackathon. Since I missed out on the redis one, I was excited that they were using mongodb as a database, since I already have pretty good experience with it.

# What am I going to make
I had a couple ideas but eventually settled on one. It's going to be called exploitcb and it's simple purpose is to be a forum website for people to discuss proxies and hacking into school/enterprise chromebooks. It's going to be a simple forum website with posts, users, etc.

[Code](https://github.com/yeetsquad747/exploitcb)
AWS NAT GATEWAT
Tags: aws, devops, tutorial, cloud
Published: 2022-11-11 03:22:10

## AWS NAT Gateway - Your Definitive Guide

AWS NAT Gateway is an important topic to understand regardless of your experience with AWS or any cloud provider. Any basic architecture is likely to use at least one NAT gateway.

Learn More:
[AWS NAT Gateway](https://www.bitslovers.com/aws-nat-gateway/)
Run your studio in Solsta!
Tags: devops, gamedev, productivity, testing
Published: 2022-11-11 03:21:31

Whether your studio is focused on a single game or has many projects in development you can access all your builds through Solsta. 
 https://solsta.io


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iylmrt23dhdvwx5a8qod.gif)
A Personal Challenge
Tags: writing, ramblings, watercooler
Published: 2022-11-11 02:49:47

[![Word Count - 0](https://img.shields.io/badge/Word_Count-0-00AC47?style=for-the-badge&logo=Google+Keep&logoColor=ffffff)](https://)

So, I know I have been posting a lot but, I have really been inspired by [this](https://dev.to/adiatiayu/collective-nanowrimo-lets-write-together-350) post.

I love writing. It's only in the last few years that I have figured this out. I have always wanted to write something lengthy. Maybe not a novel or anything but, maybe a series of short stories? But, I am overly critical of my writing so I have never completely finished a project.

So, I have this wild idea that I want to try and do a week long writing series where I write 1 blog post a day (more if I have time) and make it a series. The post won't have a theme really. I'll just set down and write whatever comes to mind. It'll all just be free form and organic. We'll see what happens.

I don't normally have a process to my writing. I usually get an idea or I have something I want to talk about and I set down and write a rough draft and just expand and edit on that until it's complete and then post it. With this challenge, I won't really have time to do that because I'LL need to have each post done before midnight each night.

About the only thing I will be doing for each post is I will be using a lot of the same tags. More than likely [writing](https://dev.to/t/writing), [watercooler](https://dev.to/t/watercooler), and [ramblings](https://dev.to/t/ramblings). Other than that, it'll just be free form writing. Whatever comes out is what comes out.

This should be a fun challenge and I look forward to starting it.


![signature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/897pksu9xxqyd0qs8uil.png)
Need advice about Video messaging library
Tags: video, javascript, webdev
Published: 2022-11-11 02:43:33

Hello,

I would like to democratize video messages. I am convinced that we will see that everywhere in the future years.

So I would like to develop an opensource web-based SDK to enable screen recording, camera, and microphone (like Loom). Before I spent months developing it, I wondered if the community was interested in having this? Or it's the kind of thing you build yourself since it's not that complicated?

What do you think? Would that be helpful?
Thank you for your time!
Html Help
Published: 2022-11-11 02:41:34

hey guys im kinda a noob at coding

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

so i have this custom new tab page setup (using chrome extensions) and i was wondering if you guys you help me with a question i have. So i was planning to add a button under the input bar (search google)called brave or smth,and want it to be able to take the value of the input bar and open it in brave instead of chrome (just like search.brave.com).
![some of the code of the form input](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ivpe0jf6x0z5qq47pbg.png)
I only want to do this bc i want to use too different search engines some time lol idk why.

Please help, i was thinking maybe something in js like document.getelementbyid.....(.value) idk not the best, pretty new so if you guys know it would be helpful


Thanks,
jscreator/jeremiah lol
Adding tests to my SSG
Published: 2022-11-11 02:24:17

Hi everyone,

This week I added some testing tools to my [SSG](https://github.com/NeilAn99/nan1-ssg). The project now uses [Jest](https://jestjs.io/) for testing. I chose to use Jest because it is a very popular testing framework for JavaScript. I contemplated using [Mocha](https://mochajs.org/), but after doing some research, decided Jest was easier to use out of the box. Installing Jest was easy. All I had to do was install it using npm: `npm install --save-dev jest`.

Writing the test cases on the other hand was more difficult. A lot of my tests didn't work as expected and I spent a lot of time figuring out how to use different types of matchers. I also had to change some of my existing code to handle some cases correctly. For example, if a function that handled text files was given a markdown file, then that function should throw an error or reject.

I learned a lot about testing. Even though I struggled a lot with writing tests, I can see the benefits of using tests, especially when you're working in a shared repository and you have to ensure that the code works.