teleren/devto huggingface dataset:
Day 98: Retouch styles
Published: 2022-07-16 21:42:55

Hi!
it's insane when you go back to some of your code to realize you can have the exact same design or even better and actually remove some css styles that you never needed. today focused on cleaning some of the styles to have consistency across the app but I removed many unnecessary lines of code. I think some comes with experience after working on the codebase for a long time or going back to the codebase with a flesh mind or a broader perspective 

Tomorrow I want to learn about Express and some of node basics there is a course that i found that covers node and express basics and that's the one that I plan to follow tomorrow 
see you at day 99

Signing off...
How To Enable "running Scripts" On Your System
Tags: tutorial, programming
Published: 2022-07-16 21:31:48

Have you ever been in a situation whereby you're unable to perform specific tasks on your source code editor? For instance, in trying to activate a virtual environment on your editor, you come across an error that says "the command cannot be loaded on your system because running scripts is disabled on your system". We'll take a look at how to solve this in this article.[To know more](https://oyedeletioluwani.hashnode.dev/how-to-enable-running-scripts-on-your-system)
How do you track your progress?
Tags: discuss, management
Published: 2022-07-16 20:20:37

Hi! I fill kinda stuck when I think of what I know and what I don't know (amount of different fields, terms, technologies, etc. in IT is just HUGE).

I want to know, if I'm not the only one with such problem and maybe get some advice or feedback on how you manage that. I'd be grateful if you answer following questions:

1. Do you have problems with describing/visualizing your knowledge/skills?
2. Do you need monitor and plan you growth?
3. If you do something about it, what you do? What instruments do you use?

If you have such problem as a Team Lead with your team I'm also very interested in your feedback!
Youtube User Finder
Tags: youtube, php, webdev, github
Published: 2022-07-16 19:31:52

**About**
You can find channels according to the words you type and collect e-mail addresses for business/advertisement from them.
**Why**
Imagine that you have a product in your hand and let's assume that this product is added to the meals.
You want to advertise this to someone who has a youtube channel, but you have difficulty choosing the youtube channel (contact emails or it is difficult to visit all channels)
that's exactly what YUF does.
When you write words like food hamburger ear fastfood in scan.txt and run them, it will write you the e-mails of the channels related to them.

Github Link [https://github.com/suphiyasin/Youtube-User-Finder](https://github.com/suphiyasin/Youtube-User-Finder)
What is Snapchat Spotlight and how can I make money from my Snaps?
Published: 2022-07-16 18:40:45


Snapchat Spotlight is a new feature on Snapchat that lets you earn money by sharing Snaps with the app. When you submit a Snap, your friends see it and might be interested in purchasing something from the store associated with that Spot. If one of your friends buys an item from the store, you’ll get credit for contributing to the sale – just like any other purchase!

## You must know the [best hashtags for Snapchat Spotlight](https://professional-writer0.blogspot.com/2022/07/the-best-hashtags-for-snapchats-new.html)

Snapchat is a messaging app that has recently seen a surge in popularity. It is available on most devices, including iPhone, Android, and Windows Phone. Snapchat allows users to send photos and videos that disappear after a set amount of time. Snaps can be anything from a picture of yourself to a complete video. This app is marketed as a privacy-conscious alternative to more popular messaging apps, like Facebook Messenger and WhatsApp.

There are many benefits to using Snapchat. One of the main benefits is that Snaps are anonymous. This means that your friends and family cannot see your Snaps unless you choose to share them with them. This is an especially beneficial feature if you are worried about your online image. Another benefit of Snapchat is that Snaps are quick. They can be sent and received within seconds. This makes them ideal for when you want to communicate with someone quickly, without having to spend a lot of time on the phone.

To make money from your Snaps, you need to find an ad campaign that is designed specifically for Snapchat. There are many different ways to make money from your Snaps. You can sell your Snaps to advertisers, create branded Snaps for your business, or partner with a marketing companies to create Snaps for your brand. There are many tips for taking better Snaps and making more money. Sometimes the best way to make money from your Snaps is to simply ask. There are many agencies that specialize in creating Snaps for brands. If you are interested in starting a Snapchat account and making money, speak to your nearest marketing agency.

Snapchat is a great way to communicate with friends and family discreetly. It is a fast and easy way to send messages, and many businesses have created branded Snaps for their clients. If you are interested in making money from your Snaps, talk to a marketing agency to find out the best way to do this.
Minimalistic Kubernetes apps with Microk8s
Tags: kubernetes, kubectl, cloud
Published: 2022-07-16 18:23:22

When I first started to learn Kubernetes, I tries to figured out how to start quickly and with minimal efforts for bootstrap. At that time I did not find guides how to use K8s locally on own server or in VPS and not in SAAS.

So, the options to use K8s in simple way are:

- Install K8s modules (kubectl, apis, proxy, etc.) manually
- Minikube
- Kind
- Kubeadm
- Microk8s

Official guide of K8s tools options - https://kubernetes.io/docs/tasks/tools/

All options are good and have nice tooling, but today I will describe using microk8s (https://microk8s.io/). For me it was the simplest way to bootstrap the environment with app running in K8s.

## Installation
I will describe use of K8s in Ubuntu OS, but it is easy to use it in most other OS you like.

The simplest way is to use SNAP:

1. Install microk8s
`$ sudo snap install microk8s --classic --channel=1.24`

2. Configure permissions:

```bash
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
```
3. Check for successful installation:
`microk8s status --wait-ready`

## Addons
Microk8s has a nice ecosystem of addons that help to minimize manual configuration of APIs. Full list of add-ons: 
https://microk8s.io/docs/addons#heading--list 

We will use:
- `microk8s enable dns` - for communication with outer world
- `microk8s enable dashboard` - for use of UI

That's it!

You can use usual kubectl commands:

`microk8s kubectl get all`
`microk8s kubcectl get pods`

Also, you can check, start and stop service:
- microk8s stop
- microk8s start
- microk8s status

Full list of commands: https://microk8s.io/docs/command-reference

Further I will write how to deploy Spring, Go or other apps in microk8s and VPS.

Thank you for reading!
I’ve Launched My First Web Development Mastery Product on Gumroad
Tags: javascript, webdev, programming, beginners
Published: 2022-07-16 18:12:54

Hello there, everyone. I’ve been learning and developing websites for a few years now.

It is not achieved with the aid of WordPress or any no-code platform. I work as a web developer professionally.

It was a difficult journey. I have to locate and learn from Google or YouTube, I am frequently annoyed, I have to find some really cool resources, and I have made some of my biggest blunders.

And you’re not required to.

I’ve even interned, worked at a startup, started multiple side hustles, written web development-related content (viral content), and even worked as a freelancer.

Yes, I made money online. And now I want to help you get started on your web development adventure, therefore I’ve designed a whole solution that may assist you.

Don’t worry, you’ll acquire all you’ll ever need on your web development journey. You can also ask me any questions you have.

Yes, I have built [a great product](https://nitinfab.gumroad.com/l/web-development-mastery) in which you will learn practically everything you need to know in your web development path.

And I am confident that you will not be disappointed after purchasing.

Let me tell you what you’ll get:

* A comprehensive Front-end development guide, as well as a roadmap
* A complete Back-end development guide, as well as a roadmap
* 80+ free resources to learn Web development
* Tried and tested new side hustles for web developers (does not include freelancing, YouTube video creation, or anything else you may be familiar with)
* Best Web development tools for daily use
* Best design to code platforms to ease your Web development career
* Worst mistakes to avoid as a junior Web developer
* Web development as a career option?
* And a lot more.

Isn’t it cool? And all of this at a reasonable cost.

So [buy it now](https://nitinfab.gumroad.com/l/web-development-mastery).

That’s it — thanks.
Second article in the Profiles in Software series
Tags: beginners, programming, codenewbie, career
Published: 2022-07-16 18:12:28

I published the second article in the series I've started for [Profiles in Software](https://newsletter.attainable.engineer/p/profiles-in-software). I really enjoyed my time with Kelsey Hightower. 

{% embed https://newsletter.attainable.engineer/p/no-territorial-boundaries?r=1grfum&s=w&utm_campaign=post&utm_medium=web %}
Hosting Javascript Code Online for free
Tags: javascript, hosting, upload, programming
Published: 2022-07-16 18:04:03

## What is Javascript?

Javascript is a high-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oivrjujblt4yppfosalz.jpeg)

Alongside HTML and CSS, JavaScript is one of the three core technologies of the World Wide Web. JavaScript enables interactive web pages and thus is an essential part of web applications. 

The vast majority of websites use it, and all major web browsers have a dedicated JavaScript engine to execute it.

As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative (including object-oriented and prototype-based) programming styles. 

It has an API for working with text, arrays, dates, regular expressions, and the DOM, but the language itself does not include any I/O, such as networking, storage, or graphics facilities, relying for these upon the host environment in which it is embedded.

Initially only implemented client-side in web browsers, JavaScript engines are now embedded in many other types of host software, including server-side in web servers and databases, and in non-web programs such as word processors and PDF software, and in runtime environments that make JavaScript available for writing mobile and desktop applications, including desktop widgets.

## Where to host Javascript for free?

There are many places to host Javascript for free. One of the most easiest include:

[StaticSave ](https://staticsave.com/)is a free web-based hosting service for JavaScript code. It offers a number of features, including:

- A simple, easy-to-use interface
- Paste hosting is made easy
- You can host CSS, Javascript, TXT, JSON, XML.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gxqhhdqudw5aldprdqy.png)
 
## Benefits of hosting Javascript on StaticSave

There are many benefits to hosting your JavaScript code on StaticSave, including:

- Free hosting: StaticSave offers free hosting for your JavaScript code. This means you can get started without having to worry about costs.

- Easy to use: StaticSave is designed to be easy to use, with a simple, straightforward interface. This makes it ideal for beginners.

- Flexible: StaticSave offers a range of hosting options, so you can choose the one that best suits your needs.

Also Read: [Why JavaScript is Important for Web Developers?](https://staticsave.com/blog/importance-of-javascript-in-web-development)
Save S3 backup storage
Published: 2022-07-16 17:50:05

## **Save S3 backup storage**

As per [my previous post](https://dev.to/prabinpps/automatic-db-backup-to-s3-using-aws-cli-4ek),we were able to backup our database to the AWS S3 automatically. We also saw automatic database backup & sync to the S3 bucket. 

Now let us save the **$$$** by saving storage in S3 bucket.

As we have already backed up the database to the S3 bucket, the backup tasks can be run anytime via cronjob. We will run the script twice a day to backup our database & sync to S3 bucket.

Twice a day backup may cause unmetered storage utilization & hence unmetered cost. That is why we will have a life cycle rule for our labuser1 bucket that removes any files after 30 days. 


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

The rules can be modified as per our requirements.

**Conclusion**
 We sync the database file (any file can be synced) to S3 bucket & created the life cycle rule to delete the files after 30 days of expiry.
Container Engine Vs Container Runtime
Tags: containers, containerd, runc, crio
Published: 2022-07-16 17:23:41

During the last few days, I have been working on comparing container engines. I wanted to study separately popular container engines in order to highlight the vulnerabilities related to each product. To make an unbiased judgement and to have a very clear perspective, I went through a myriad of articles that are published online. I remarked something strange. Even some well-experienced technical writers can be confused about the difference between a "Container Engine" and a "Container Runtime". I remarked that many use these two terms as synonyms, which is not the case.

### Container Runtime
Let's bring it this way: 
The container runtime can be considered the core component of a container engine. It is the beating heart that enables and initiates containerization. In other terms, without the container runtime, the container engine cannot communicate with the operating system and the containerization process will never be launched. Thus, the container will be never brought to life. The container runtime is a low-level element that handles all the tasks related to running the containerization process. It mounts the container and clones system calls to communicate with the kernel of the operating system on which you intend to run the containers. Cloning system calls mean creating new processes in a way similar to fork() system call ) that host the containerization mission.
We can specify two types of Container Runtimes:
**CRI-Compliant Container Runtime:** 
are those who support CRI (Container Runtime Interface ) . CRI is the API that Kubernetes uses to manage container runtimes. How Kubernetes should communicate with a container runtime is outlined in the CRI API. Consequently, CRI is an interface that can be used with any supported runtime, whereas containerd and Cri-O are the specialized container runtime.

**OCI-Compliant Container Runtime:**
 Are runtimes that obey the OCI standard.  OCI is a framework for specifying how container images are organized.OCI images can be run on any container runtime that supports OCI since they have a standard format such as runC.

### Container Engine

On the other side, container engines are software programs that handle user inputs, including those from the command line interfaces (CLI), fetches images, and executes the container. To fulfil some of its functionalities, a container engine uses container runtime. In other words, the architecture container engine contains a container runtime along with other elements for networking, orchestration capabilities , etc.
Some container runtime such as Containerd can be viewed as no more than low-level container engines with the most basic functionalities.

### Illustration:

Here is a figure that illustrates how container engines work through a simplified example.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcqbgzjnp6aw3zcivz9p.PNG)
Future of CSS: color-mix function 🎨
Tags: css, webdev
Published: 2022-07-16 17:15:00

I always love to delve into the new and wonderful things coming to the web, today I'm going to look at the [`color-mix`](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix) function which, at the time of writing, is not in any stable browser but has arrived in firefox behind a flag.

## What does `color-mix` do?
The `color-mix` function allows you to mix colours (who'd have thought?) those colours can be named colours, hex colours or any sort of colour really. This is very exciting because it allows us to add some `SCSS` like functionality such as `lighten`, `darken` or even `adjust-color`'s alpha.

## Why are there colour spaces
[Colour spaces](https://en.wikipedia.org/wiki/Color_space) are a whole other thing. A colour space is a way to mathematically define a set of colours. Using different colour spaces allows you to represent different colours. Naturally this means mixing colours in different colour spaces creates different results.

This is a video from Surma, while at Google, that explores colour spaces in more detail than I can.
{% embed https://www.youtube.com/watch?v=cGyLHxn16pE %}

## Practical examples
I've thrown together a very quick example of some of the things you can do. As I mentioned earlier none of this code can run in a stable browser without flags so I've uploaded an image of the result too.

The examples I've done are, 

- tomato darkening by mixing with black,
- teal lightening by mixing with white 
- purple becoming less opaque by mixing with transparent _(technically a colour it seems)_
- red mixing to green

{% jsfiddle https://jsfiddle.net/link2twenty/paewdtk6/ css html result %}

![color-mix example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7i9q6yedtgek3osq66x.png)

## Fin

There we go, that's it for now. It's so cool to see little functions like this coming to css making it more powerful, maybe one day we won't need css pre processor's at all, especially with [css nesting](https://www.w3.org/TR/css-nesting-1/) being talked about. Very exciting.

Thanks so much for reading. If you'd like to connect with me outside of Dev here are my [twitter](https://twitter.com/Link2Twenty) and [linkedin](https://www.linkedin.com/in/andrew-bone-ba241b179/) come say hi 😊.
Count Palindrome Sub-Strings of a String GeeksForGeeks
Tags: dp, java, algorithms
Published: 2022-07-16 16:49:03

Given a string, the task is to count all palindromic sub-strings present in it. Length of palindrome sub-string must be greater than or equal to 2. 

**Example**

```Input
N = 5
str = "abaab"
Output
3
Explanation:
All palindrome substring are : "aba" , "aa" , "baab"
```
**Solution**
```java

class Solution
{
    public int CountPS(String S, int N)
    {
        int count =0;
        //we will use 2d matrix for it 
        // as in the below for loops two things are changing that we have 
        //keep in track starting index and ending index of the string 
        int dp[][] = new int[N][N];
        for(int row[]: dp) Arrays.fill(row,-1);
        for(int i =0;i<N;i++){
            for(int j =i+1;j<N;j++){
                if(isPalindrome(S,i,j,dp)==1) count++;
            }
        }
        return count;
    }
    public int isPalindrome(String s, int i ,int j,int dp[][]){
        if(i>j) return 1;
        if(dp[i][j]!=-1) return dp[i][j];
        
        if(s.charAt(i)!=s.charAt(j)) return 0;
        return dp[i][j] = isPalindrome(s,i+1,j-1,dp);
        
    }
}
```
Mac Battery Fully Charged Notification
Tags: sideprojects, bash, showdev
Published: 2022-07-16 16:15:43

I kept on forgetting my mac was charging and most of the time the battery would be at 100% for a few hours before I realize it. 

So created a small script that will notify you when your mac is fully charged.

https://gdi3d.github.io/osx-mac-notify-battery-fully-charge/
SvelteKit: How to make code-based router, instead of file-based router [July 2022]
Published: 2022-07-16 16:09:32

## This is an old article. See [newer instruction](https://dev.to/maxcore/sveltekit-easy-code-based-router-for-enterprise-instead-of-file-based-router-for-home-pages-february-2023-2fk)
Hello dudes.
Just wanted to share how do I route SvelteKit in JS.

In `node_modules/@sveltejs/kit/dist/chunks/sync.js:471` there is an iteration over some `units` object that was constructed based on `.svelte` files in `routes/` folder in order to construct some final a little bit more complex `routes` object, that will actually serve routes:
```js
Array.from(units.values())
    .sort(compare)
    .forEach((unit) => {
        ...
        routes.push({...})
        ...
```
`console.log(units.values())` will give us something like:
```js
[Map Iterator] {
  {
    id: '',
    pattern: /^\/$/,
    segments: [],
    page: { a: [Array], b: [Array] },
    endpoint: undefined
  },
  {
    id: '[id]',
    pattern: /^\/([^/]+?)\/?$/,
    segments: [ [Array] ],
    page: { a: [Array], b: [Array] },
    endpoint: undefined
  }
}
```
So, the goal is to create our custom `units` somewhere, let's say `urls` and make SvelteKit iterate of it instead of `units` object.

**So, what literally has to be done:**

0) First, we have to check, that `__layout.svelte` at least with `<slot/>` tag inside, and `__error.svelte` already exist in our `routes/` folder.
1) Create `src/urls.js`with our routes, let's say — to `home.svelte` with '/' and `article.svelte` mapped by any string in browser's url:
```js
const l = 'src/routes/__layout.svelte';
const b = ['src/routes/__error.svelte'];

const urls = [
    {pattern: /^\/$/, id: '', page: {a: [l, 'src/routes/home.svelte'], b }},
    {pattern: /^\/([^/]+?)\/?$/, id: '[id]', page: {a: [l, 'src/routes/article.svelte'], b }},
]

export default urls;
```
2) In `svelte.config.js`:
```js
import urls from './src/urls.js'; // <— add this

const config = {
  urls, // <— add this
  kit: {
    adapter: adapter()
  }
};
```
3) In `node_modules/@sveltejs/kit/dist/chunks/sync.js`:
```js
- Array.from(units.values())
-    .sort(compare)
+ Array.from(config.urls.values())
```

## IV. Install `patch-package`, so this changes will be automatically applied in future without manual hacks:
```
> npm i patch-package
> npx patch-package @sveltejs/kit
```
`package.json`:
```js
{
  ...
  "scripts": {
    ...
    "postinstall": "patch-package" // <— add this
```

That's all!
Realtime HTML Editor
Tags: html
Published: 2022-07-16 16:05:44

Realtime HTML Editor is free, secure, and simple. Using real time HTML editor you can edit code directly in browser with live preview. 

## What is html editor?

An HTML editor is a program for editing HTML, the markup of a web page. Although the HTML markup in a web page can be controlled with any text editor, specialized HTML editors can offer convenience and added functionality

## How to use real time html editor?

Follow the steps given below to use real time html editor:

1. Open [Real time html editor](https://goonlinetools.com/realtime-html-editor/)
2. Type or paste html code or [click here](https://goonlinetools.com/realtime-html-editor/?p=t#11kauv9un60i0d390ogc8gvg) to try demo code.

That's it now you can see live preview. When you change code preview update instantly. You can adjust preview width and height according to your needs.