teleren/devto huggingface dataset:
The SteamOS Konsole
Tags: steamos, linux, beginners
Published: 2022-10-17 06:46:40

## SteamOS
In 2013 a linux based operating system developed by the software company Valve was created. This operating system was used by one of Valve's first hardware ventures the Steam Machine to give it a more console interface, this was valves first venture into the gaming computer space, but would not be the last. 

In 2021 the Steam Deck was announced and up for reservation with the new steamOS 3.0, with this operating system came a variety of user friendly design features to make the steam deck one of the best portable gaming computers on the market. It also came with a terminal that we will be using in this dev post.

## Enabling The SSH server
With the steam deck comes a built in SSH server. the only thing needed to be done is quick and easy steps to set up your password.
So to start go into the desktop mode by going through.

Power > Switch to Desktop

Then search for konsole on the home button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/chzd7t3lowagx3gxyfr5.PNG)
To set up the password input the following.

```
(deck@steamdeck ~)$ passwd
```
the terminal will then ask for a password that you must input twice, keep in mind you wont see the characters on screen.

Then initiate the SSH with,

```
(deck@steamdeck ~)$ sudo systemctl start sshd
```
this will start the SSH at systemctl. to stop the SSH replace start in the command with stop. Now with putty or a Linux terminal you can connect to the SSH server!

## Commands for the console
But that is just the tip of the iceberg. since steamOS is a Linux based operating system, all Linux/cli commands work out of the box! So lets take a look at just some basics to get you navigating the konsole.


- ls | This command will return the names of the files in your current path
```
 (deck@steamdeck ~)$ ls

Applications  Documents  Games  Pictures  Templates 
Desktop  Downloads  Emulation  Music  Public  Videos

```

- cd | This command will change the path your currently in

```
(deck@steamdeck ~)$ cd Emulation/
(deck@steamdeck Emulation)$ ls

bios  hdpacks  roms  saves  storage  tools

```

- cat | this command will read the file specified

```
(deck@steamdeck ~)$ cd Desktop/
(deck@steamdeck Desktop)$ cat Dev-blog
linux commands (:

```
These are all just very basic commands so I definitely recommend learning more, here are [40 basic](https://www.hostinger.com/tutorials/linux-commands) ones that you can test out right now!

## conclusion

The Steam Deck is a incredibly powerful machine and I cant wait for the continued support from valve to add even more value to this operating system. With the steam deck already being somewhat available for desktop pc's I'm excited to see where this software goes. I hope that you learned something from this dev post and continue doing great things!

## SOURCES I USED AND YOU SHOULD TOO
{% embed https://shendrick.net/Gaming/2022/05/30/sshonsteamdeck.html %}

{% embed https://www.hostinger.com/tutorials/linux-commands %}

{% embed https://itsfoss.com/steamos/ %}
Installing ffmpeg in repl.it
Tags: replit, programming, tutorial, productivity
Published: 2022-10-17 07:15:22

You can download `i686` of `ffmpeg` compressed file from this [link](https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz).

After downloading it, extract it, then upload the `ffmpeg` file inside to your [repl.it](https://replit.com/) project.

> You can also use the below `shell` approach to download and unzip `ffmpeg` binaries on your repl.
> 
> Firstly download `ffmpeg` binaries using `wget`.
> ```bash
> wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz
> ```
> And then extract the archive.
> ```bash
> tar -xf ffmpeg-release-i686-static.tar.xz
> ```

And then allow the files to read & write files on the server.

```bash
chmod +777 ./ffmpeg-release-i686-static
```

**And that's all, now you are ready to go.**

Try using

```bash
ffmpeg [command]
```

into the shell.
Namkeens | Buy Quality Namkeens Online | Home Delivery Available
Tags: namkeens, buynamkeensonline
Published: 2022-10-17 07:14:28

The main goal of snacking is to spread out little food servings between meals. Snacking more frequently between meals may help you control your hunger and regulate your blood sugar. Additionally, snacking can assist you in increasing your intake of nutrient-dense foods like fruits and vegetables, which supports a balanced diet. Between-meal snacks also aid in maintaining weight, reducing fatigue, and improving general health.

[Namkeens](https://bigmishra.com/product-category/namkeens/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qsg6edwtyebv6v456v7v.png))
Healthy Snacking three to four hours prior to dinner helps prevent overeating at that meal. Snacking keeps you energized until dinner and manages digestive issues like bloating and acid reflux. Even if there are numerous evening snack recipes or namkeen snack recipes, bigmishra.com makes it simple to order fresh and healthy snacks.
NAMKEENS

Various Nuts
In general, nuts are a great source of nutrition and offer the appropriate ratio of fiber, healthy fats, and protein. They are satisfying when consumed in moderation and have several health benefits in addition to being nutritious. You can pick from a variety of nuts, including Brazil nuts, almonds, hazelnuts, cashews, pistachios, and pine nuts, to mention a few.
Minimal adaptive carousel slider
Tags: carousel, css, flex
Published: 2022-10-17 07:05:06

---
title: Minimal adaptive carousel slider 
published: true
description: Very simple slider with minimal js
tags: carousel, css, flex
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
Lately I needed to implement a carousel slider for website, none of the sliders that I've founded suited design that I needed so I've created another one.

Key idea of this slider that it has very little JS and work independently from other slider on the page

All JS is basically two functions for Next and Previous buttons:
```
const nextSlide = (event) => {
  const slider = event.parentNode.children[1];
  slider.append(slider.children[0]);
}
const prevSlide = (event) => {
  const slider = event.parentNode.children[1];
  slider.prepend(slider.children[slider.children.length - 1])
}
```
As you might see from code it depends on layout and moves slides right in DOM Node.
Pretty simple, don't you think?

Also it uses media-query in order to react to screen width:
```
.item {
  flex: 1 0 25%;
  min-height: 200px;
  text-align: center;
  height: auto;
}

@media (max-width: 1024px) {
  .item {
    flex: 1 0 33%;
  }
}
@media (max-width: 768px) {
  .item {
    flex: 1 0 50%;
  }
}

@media (max-width: 576px) {
  .item {
    flex: 1 0 100%;
  }
}
```
Example you might find in following codepen:
{% codepen https://codepen.io/gleb-svechnikov/pen/QWrPGQg %}
The RX-500
Tags: unity3d, showdev
Published: 2022-10-17 07:04:14

Imagine discovering a device, a handheld about the size of your standard iPhone, at a first glance it appears to be a game device of some kind, along with the device you discover a manual, its not super thick, but it has weight to it...you decide to turn the device on, you flip the switch and you hear the sound of the internal hard drives spinning up and the screen comes to life, the monochrome mini-CRT glows a familiar dark green as words start to pour over the screen some of it is understandable even for the layman however most of it appears to be random information that is unknown to the user.

As you explore the device you see that it appears to be some kind of company device perhaps issued to employees of a company called mouseteck

The manual seems to be a developers manual for writing software for the device as well information about how it was designed, including schematics and concepts used by developers to hot load software directly onto the device.

What will you do with such a device? explore it? 
exploit it? 
write software for it? 

Who designed it? 
What is mouseteck? 

the adventure begins for the developer at heart, for beginners or advanced software engineers, the RX-500 is a black box of untold power and magick to explore, break or develop for.
Delivery Acceleration: Enabling Features
Tags: productivity, devops, programming, softwaredevelopment
Published: 2022-10-17 06:51:12

Now that we know where our code lives, we need to make sure our users get access to the features. For this, we need to get our code to the environment we want to deploy to, and control the rollout (if you are not a big bang release fan).

## Blue/Green Deployment: Getting to prod with 0 downtime

What is this?, The concept is simple, we have a set of machines (ex. blue) where we currently have our app running, and we want to deploy. The intent is to create a new set of machines (ex. green) where our new version of the code will run. We would like to validate as much as possible (ex. automated e2e tests) that this new version is up to par with the previous one before moving the traffic and destroy the previous version.

You can see the process in the next graph:

![](https://www.kanekotic.com/img/blue_green.jpeg)

With this, we are trying to achieve a 0 downtime while deploying a new version of our code. This is critical for teams that practice continuous deployment, as you want to avoid having systems down as you deploy multiple times a day.

## Enabling feature access to users

there are multiple ways to enable access to users, in between them:

### Big Bang Releases

This is the plug and pray solution. Pushing the code and expecting it to work as it's enabled for all users. This is a very dangerous strategy as your blast radius is all your users.

### Canary Releases

This is a practice that comes from the mining industry, The idea was the next one:

> If a canary is in the same place where humans are inside the mine, when there is a problem with the breathable air it will be the first one to perish.

If we translate this to software, the idea is to have deployed the changes only to one or a few servers. With this, we can monitor this canary instances and act if any issue happens, we reduce the blast radius of issues to only the users who go through that server.

![](https://www.kanekotic.com/img/canary.jpeg)

This affect the next DORA 4 metrics:

* ✔️ **Change Failure Rate**

This approach provides us a way to reduce the blast radius from a big bang release. Nevertheless, it does not help us to prevent or act faster upon a bug in our code. 

### Feature Flag Releases

To improve upon the canary release strategy, we can move towards feature flags.

Feature Flags are hiding our code behind a 'flag' this can help decide if the code is enabled or disabled, as in the next image.

![](https://www.kanekotic.com/img/toggles.jpeg)

There are a multitude of services, libraries & SDKs that allow you to create flags in your code. They help by:

*  Decouple activation of features from the release pipeline.
* Solving incidents in a matter of seconds.
* Do a controlled rollout. For example:
  * Enable only for team.
  * Enable for X% of the traffic.
  * Enable for users in a specific country.

This affect the next DORA 4 metrics:

* ✔️ **Deployment frequency**
* ✔️ **Mean Time To Recovery**
* ✔️ **Change Failure Rate**
Absolute Imports: Vite TypeScript 2022
Published: 2022-10-17 06:48:22

Hello. Everyone, I was trying to configure absolute import with Vite and TypeScript and I lost one day trying to configure it. I tried every Stackoverflow solution but non of them worked. So I decided to share with everyone this simple solution.


## Step 1 - vite.config.ts
To configure absolute imports in vite we need to edit config file. Here is config file.

```javascript
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [react()],
  build: {
    // Here you define your build directory
    outDir: "./server/dist/",
  },
  // Here is config for absolute imports
  resolve: {
    alias: {
      // You can configure this in any way you like it
      // Below is my example
      "@components": "./src/components/",
      "@hooks": "./src/hooks/",
      "@utils": "./src/utils/",
    },
  },
});
```

## Step 2 - tsconfig.json
This is tricky part, not because it is hard to configure, but because it is very import to have * (wildcard) after defined path.
```javascript
{
  "compilerOptions": {
    "baseUrl": ".",
    "target": "ESNext",
    "useDefineForClassFields": true,
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": true,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    // To configure import you need to add paths config
    "paths": {
      // ⭐️ It is very important to put /* in both key and value config
      "@components/*": ["./src/components/*"],
      "@utils/*": ["./src/utils/*"],
      "@hooks/*": ["./src/hooks/*"]
    }
  },
  "include": ["src"],
}
```
**Valid config**
```javascript
"paths": {
      "@components/*": ["./src/components/*"],
      "@utils/*": ["./src/utils/*"],
      "@hooks/*": ["./src/hooks/*"]
    }
```
**Invalid config**
```javascript
"paths": {
      "@components": ["./src/components"],
      "@utils": ["./src/utils"],
      "@hooks": ["./src/hooks"]
    }
```

## Still have problem?
If you use VS Code try to restart TS server by pressing `CMD+SHIFT+P` and type `TypeScript Restart TS Server`.
Nuxt 3, Apollo GraphQL, TailwindCSS Crash Course
Tags: javascript, tailwindcss, graphql, tutorial
Published: 2022-10-17 06:43:27

Last week I tried my best in my first recorded live coding session on my YouTube channel. In it, I have built a very simple website that is powered by Rick and Morty API (the GraphQL one).

I really enjoyed the experience of building such app live and will definitely do more of this!

## Description

In this crash course I have used Nuxt 3, Nuxt Apollo, Nuxt Tailwind and Nuxt Image modules. They all deliver a great Developer Experience by being very simple to configure. By default, Nuxt Tailwind does not require any configuration what so ever. Similarly to Nuxt Image (the only configuration that was needed was used because I needed to add domains in order to process and optimize images from another domain). If you like such easy to use modules for Nuxt 3, I can highly recommend you to try out the Nuxt Content as well :)

Enjoy!

{% youtube 1NEOQ2uVHXo %}

## Links

Github repository -> https://github.com/Baroshem/nuxt-apollo-tailwind

Deployed app -> http://nuxt-apollo-tailwind.vercel.app/

Rick and Morty API -> https://rickandmortyapi.com/

Nuxt 3 Docs -> https://v3.nuxtjs.org/

Nuxt Image -> https://v1.image.nuxtjs.org/

Nuxt Apollo -> https://apollo.nuxtjs.org/

Nuxt Tailwind -> https://tailwindcss.nuxtjs.org/

## Summary

Let me know what other technologies you would like me to try next so that I can make a video and build some funny app  out of it ;)
Save file using file get put contents Laravel9
Tags: file, laravel, php, bulkimport
Published: 2022-10-17 06:39:54


```php
$url_arr = parse_url("https://dev14.ivantechnology.in/oxfordonlinebookstore/public/uploads/product_images/product_a.jpg");
$link_to_arr = explode('/', $url_arr['path']);
$img_name = end($link_to_arr);
$link_to_arr = explode('.', $img_name);
$img_name = end($link_to_arr);
$f_name = 'blk_imp_'.Carbon::now()->timestamp.'.'.$img_name;
$lnk = config()->get('img_pth_initial').'uploads/product_images/'.$f_name;
file_put_contents( $lnk ,file_get_contents('https://dev14.ivantechnology.in/oxfordonlinebookstore/public/uploads/product_images/product_a.jpg'));
```
Fluxactive Complete Reviews:It Solving 100% Prostate Problem!
Published: 2022-10-17 06:39:13

 It was remarkable craftsmanship. This is the occasion to throw funds at this system. I have to get a piece of the pie. Even so, "Win some, lose some." This has been proven several times over. This would be very satisfying if you don't know how. 

https://www.outlookindia.com/outlook-spotlight/fluxactive-complete-prostate-health-supplement-flux-active-ingredients-price-and-shocking-30-days-report-news-210557 
https://www.facebook.com/people/Super-Health-Solution/100083284573472/ 
https://www.tumblr.com/fluxactivecompletebuysworld 
https://fluxactivecomplete334979896.wordpress.com/
Making the menu work - part 10
Tags: javascript, webdev, beginners, nextjs
Published: 2022-10-17 06:12:42

So far, we have used a static menu in our header. This static menu doesn't do much expect for the visual representation.

Let's change that and make it work. We'll also tackle setting the active state on each page.

If you are new to this series, you can start using the code from this [GitHub branch](https://github.com/rebelchris/next-portfolio/tree/part-9).

## Dynamic menu loading

As you can see in our `components/header.js` file, our menu is plain HTML at the moment.

Let's first change it so it can dynamically loop over each element. This will help us later, so we don't have to repeat the code as much.

First, start by creating a plain array.

```js
const routes = ['Blog', 'Work', 'Contact'];
```

Now we can adjust the code inside the `ul` element to loop over this array and render the items for us.

```js
<ul className='flex gap-6 font-medium'>
  {routes.map((route) => {
    return (
      <li key={route}>
        <Link href={`${route.toLowerCase()}`}>{route}</Link>
      </li>
    );
  })}
</ul>
```

Do note this is technically still the same code. However, it makes it more manageable to add classes and business logic to it.

If you now run your app, you can navigate to the work and blog pages. (The contact page doesn't exist, so it throws an error)

## Active menu items

Now that we can use our menu, there is no indication of which menu item is active.

Let's change the active menu item to the red color we use everywhere for buttons.

First, we'll have to import the Next.js router as we need to access the current route.

```js
import { useRouter } from 'next/router';

export default function Header() {
  const router = useRouter();
}
```

Then we can add a className on our `li` element to check if the current routes pathname matches the looped element.
If it's the case, we will turn the item red.

```js
<li className={`hover:underline ${router.pathname === `/${route.toLowerCase()}` && 'text-red-400'}`}>
```

I also added a generic class always to show an underline on hover.

And now, if we re-run our page and visit the work page, it should be highlighted in red!

![Next.js active menu item](https://cdn.hashnode.com/res/hashnode/image/upload/v1665121915642/7afMrhqI6.png)

If you want to see the complete code example, use this [GitHub branch](https://github.com/rebelchris/next-portfolio/tree/part-10)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
My open source LiveUSB OpenBSD project
Published: 2022-10-17 06:34:54

## My LiveUSB OpenBSD project beginning

It began around 10 or 12 years ago. Not sure when.

I created a web page to share my personal invention. Something I need for my own use.

Now look at the stats.



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

And there are 3 variants.

-XFCE
-Gnome
-Minimal

The download stats show each one winning a different month.

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

## Here are some screenshots


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

## Download a variant

[Download a variant](https://liveusb-openbsd.sourceforge.io
)

## Get in touch with me

[Twitter](https://twitter.com/intent/follow?screen_name=girish1729) is best in case you need help.
schedule a fixed job through scheduler
Published: 2022-10-17 06:18:23

```
--UPDATE job for a command
MERGE INTO SCHCONFIG  USING (SELECT 1 FROM dual)
ON (SCHCONFIG.STOREENT_ID = 0 and SCHCONFIG.SCCPATHINFO = '<_command_name_>' AND SCHCONFIG.SCCQUERY = '<paramName>=<paramValue>')
WHEN NOT matched THEN
INSERT (SCCJOBREFNUM,SCCHOST,MEMBER_ID,STOREENT_ID,SCCRECDELAY,SCCRECATT,SCCPATHINFO,SCCQUERY, SCCSTART,SCCINTERVAL,SCCPRIORITY,SCCSEQUENCE,SCCACTIVE,SCCAPPTYPE,INTERFACENAME,OPTCOUNTER) VALUES ((select Max(sccjobrefnum)+1 FROM schconfig),null, -1000,0, 0,0,'<_command_name_>','<paramName>=<paramValue>', CURRENT_TIMESTAMP, 86400, 1,0,'I',default,'<_command_name_>',0)
WHEN matched THEN
UPDATE SET SCHCONFIG.SCCACTIVE  = 'I';
```
How to run select query using JPA
Published: 2022-10-17 06:08:26

```
import java.util.List;
import javax.persistence.Query;
import com.ibm.commerce.user.objects.MemberGroupAccessBean;
public class MemberGroupDao extends MemberGroupAccessBean {
	public String getGrpIdByName(String mbrGrpName) {
		String queryName = "SELECT m.MBRGRP_ID FROM MBRGRP m WHERE m.MBRGRPNAME=?";
		Query query = this.getEntityManager().createNativeQuery(queryName);
		query.setParameter(1, mbrGrpName);
		return String.valueOf(query.getSingleResult());
	}
}
```