teleren/devto huggingface dataset:
My awl - SHELL - Variables
Published: 2024-03-03 05:19:47


## **Variables** 

1. why we need ? A place in the memory in which the value is stored and can be used when you want.
2. Its like an address
3. Define the variable ? Where you want to store the value ? Defining the address --> **_variable_name=value_**
4. You can store number & string value.
5. **_variable_name_** -> No special character is allowed. only "_"
6. If you are storing string values , it needs to be in "".
7. How to retrieve ? **_$variable_name_**

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

**Local Variable** : It can be overridden.
**Env Variable** : which is available inside the script and also in parent shell.i.e Terminal = Parent Shell , _**every time you run a script it creates a child shell --> You need to remember this.**_ --> **EXPORT**

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

If the variable is created in parent shell , all the child shell can receive it or access it. Those are called Env Variables.

If the variable created in child it wont be available in parent shell.

## **Special Variables**

> <u>**Command Line Arguments :**</u>

- **$0** name of the script.
- Take max of 9 values.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r31lya2gu8b6bg56k65v.png)
- **$ ** followed by something --> it will print something. that's the literal meaning.
- There is a concept called " NEGATION" --> you are forcing the linux not to consider the $. Eg., **\$0** --> Hello Linux DONT CONSIDER AS $ and print , you just ignore or negate it.

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

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

**$# **--> Total no of arguments used.
**$@** --> Display all the arguments.

**$?** --> Exit status of the previous command.

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

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

**$$** --> Process ID of the current shell

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

**shift** --> arguments gets shifted each time.
How to build a modern Svelte apps using Routify and Django ?
Published: 2024-03-03 05:17:05

[Svelte](https://svelte.io) is a frontend framework for JavaScript that makes it easy to build web apps with ease.

[Routify](https://routify.dev) is a framework that adds support for SSR (Server-Side Rendering) to a Svelte project.

[Django](https://djangoproject.com) is a framework for the Python language, allowing the construction of full-stack apps.

I was working on a project that ran on Django, and up until now, I used static files to build my pages and vanilla JavaScript to animate elements on my page.

The issue I encountered was that the Django server had to process/generate the complete HTML code of my page before displaying it, sometimes causing the page to take longer to load.

In the end, I started some research to find a way to streamline my workflow. An API was built on the Django database to be used by other services throughout the project.

The API was set up. Now, to consume it, there was no possibility of running an infrastructure on Netlify/Vercel because the project had to use files internal to the enterprise.

Ultimately, I discovered [Inertia.js](https://inertiajs.com/) who was used most to run ReactJS into server app ( Laravel/Django/Ruby ) without the need to run it as separate frontend.

In the background, it was [django_vite](https://github.com/MrBin99/django-vite) who were doing most of the work.

My focus was on how to build a spa/ssr app to consume the API more easily.

So, the first step was to install [django_vite](https://github.com/MrBin99/django-vite) and then configure it. I'll share my `vite.config.js` used to run Svelte.

You can find below the configuration used in routify, django to make everything works great. 

Make sure to install Routify and in django enable a wildcard path so any request coming from your spa/ssr app is not detected as 404 page. 

Follow this post : [https://stackoverflow.com/questions/64883415/django-catching-all-urls-under-a-specific-name](https://stackoverflow.com/questions/64883415/django-catching-all-urls-under-a-specific-name)

After configuring it properly, make sure to run Vite in another window during development so that the files can be properly seen by the Django server.

Once you are ready for production, run the following commands in this order:

```bash
npm run build

python manage.py collectstatic 

```


Find the configuration files ( vite.config.js|settings.py ) here  : [https://gist.github.com/manutheblacker/b58f13d12476f0dae742be2a2a50e019](https://gist.github.com/manutheblacker/b58f13d12476f0dae742be2a2a50e019)
CSS Tools for Enhanced Web Design
Tags: css, learning, webdev, beginners
Published: 2024-03-03 05:16:00

## Elevate Your CSS Game with These Essential Tools

In the vast ocean of web development, CSS tools stand out as lifesavers for developers and designers alike. These tools simplify the process of styling, allowing for more creativity and efficiency. Here's a curated list of CSS tools that you should definitely check out:

### 1. [10015.io CSS Tools](https://10015.io/css-tools)

This comprehensive suite offers a variety of CSS tools to solve different design challenges. From gradient generators to shadow creators, 10015.io provides an easy-to-use interface for all your CSS needs.

### 2. [Glassmorphism Generator](https://hype4.academy/tools/glassmorphism-generator)

Dive into the trend of glassmorphism with this intuitive generator. It helps create a frosted-glass effect for your UI elements, giving them a modern and stylish look.

### 3. [Shadows by Brumm.af](https://shadows.brumm.af/)

Elevate your design with sophisticated shadows. This tool allows for the creation of multi-layered shadows, adding depth and realism to your elements.

### 4. [CSS Scan](https://getcssscan.com/)

CSS Scan streamlines the process of copying CSS from any website instantly. It's a powerful tool for learning from others' designs and quickly implementing similar styles.

### 5. [Hamburgers by Jon Suh](https://jonsuh.com/hamburgers/)

Hamburgers is a collection of tasty CSS-animated hamburger icons. These are perfect for menus and navigation bars, adding a touch of animation and interactivity to your site.

### 6. [Easing Gradients by Larsenwork](https://larsenwork.com/easing-gradients/)

Say goodbye to harsh, linear gradients. This tool lets you create gradients that ease smoothly, making for more natural transitions between colors.

### 7. [Neumorphism.io](https://neumorphism.io/#e0e0e0)

Neumorphism.io focuses on the neumorphic design trend, offering a generator to create soft, inset, and extruded effects for your UI elements.

### 8. [CSS Buttons](https://cssbuttons.app/)

An extensive library of ready-to-use CSS buttons. Customize them to fit your site's design or get inspired to create your own.

### 9. [CSS Glow Generator](https://cssbud.com/css-generator/css-glow-generator/)

Add a touch of light to your web elements with the CSS Glow Generator. Perfect for highlighting or creating neon effects.

### 10. [Animista](https://animista.net/play/basic/rotate-90)

Animista is a playground for CSS animations. Experiment with a wide range of animations, from basic rotations to complex sequences, and easily implement them in your projects.

---

These tools are just the tip of the iceberg when it comes to CSS resources available online. Each offers unique features that can help make your designs stand out. Happy designing!

Explore my Gatsby theme, Clay! If you find it useful, please give it a star ⭐️ your support means a lot.

[Demo Site](https://clay-theme.netlify.app/)
[Personal Site](https://travislord.xyz/)

{% embed https://github.com/lilxyzz/clay-theme %}
21 Days of DevOps Interview -Day 6 — What strategies would you employ to optimize the performance of your Jenkins pipeline?
Tags: jenkins, devops, cicd, pipeline
Published: 2024-03-03 05:11:05


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mvb3dtx54kmvl6l4yth.jpg)

Based on the above question, you could ask the interviewer:
✅ Can you specify which aspects of the Jenkins pipeline are most critical to optimize, such as build times, resource allocation, or dependency management?

The design factors for optimizing Jenkins Pipeline performance and reducing build times would include:
1️⃣ Parallel Execution:
Leverage parallel execution in Jenkins pipelines. This means designing the pipeline to allow multiple stages or steps to run concurrently rather than sequentially, significantly reducing total execution time for independent tasks.
2️⃣ Agent and Workspace Efficiency:
Focus on optimizing agent and workspace efficiency. This involves configuring pipelines to use lightweight executors, like Docker agents, and implementing practices to reuse workspaces effectively, which minimizes setup and teardown times.
3️⃣ Optimize Build Environment:
Ensure the build environment is optimized. This includes selecting high-performance hardware, minimizing network latency, particularly in distributed setups, and choosing efficient build tools and compilers.
4️⃣ Efficient Retrieval Methods for Source Code:
To minimize checkout times, implement efficient source code retrieval methods, such as local shallow cloning and caching repositories, reducing the time spent fetching code from remote sources.
5️⃣ Artifact Management:
Effective artifact management is another key area. Utilize artifact repositories and optimize artifact storage and retrieval strategies, such as uploading only deltas or employing parallel downloads.
6️⃣ Pipeline Caching:
Incorporate pipeline caching to avoid redoing work. By caching dependencies or build outputs at certain stages, the pipeline can reuse previously computed results, which is especially beneficial for dependency-heavy builds.
7️⃣ Use of Plugins and Tools:
Utilizing Jenkins plugins and external tools effectively is crucial. Employ plugins like Pipeline Utility Steps and Timestamper to optimize performance and manage the pipeline more efficiently.
8️⃣ Review and Refine Regularly:
Believe in continuous improvement. Regularly reviewing build times and performance metrics helps identify bottlenecks, allowing for the ongoing refinement of pipelines.

Interviewer expectation:
1️⃣ Show that you understand the core concepts of Jenkins Pipeline and CI/CD processes.
2️⃣ Explain how each point contributes to the optimization and efficiency of the pipeline.
3️⃣ Provide examples from your experiences applying these strategies to solve real-world problems. If you haven’t had direct experience, discuss how you would implement these strategies in a hypothetical scenario.

📚 If you’re interested in more in-depth explanation of these topics, please check out my new book “Cracking the DevOps Interview”

https://pratimuniyal.gumroad.com/l/cracking-the-devops-interview
Building a Smart Home: A Developer's Guide
Published: 2024-03-03 04:48:12

The concept of a smart home has become increasingly popular in recent years, as technology has advanced and made it possible to automate many aspects of our home environment. For developers, the smart home presents a unique opportunity to create innovative solutions that can improve our lives and make our homes more efficient and convenient.

In this article, we will explore some of the key technologies that are used in smart homes, and we will discuss how developers can get involved in building the future of home automation.

1. Internet of Things (IoT)

The Internet of Things (IoT) is a fundamental concept in smart homes. IoT devices are essentially physical objects that are embedded with sensors and actuators, which allow them to connect to the internet and collect or exchange data. In a smart home, IoT devices can be used to control a wide range of things, such as lights, thermostats, security systems, and appliances.

2. Home Automation Protocols

There are a number of different home automation protocols that are used to communicate between IoT devices and smart home hubs. Some of the most popular protocols include Zigbee, Z-Wave, and Wi-Fi. Developers who are interested in building smart home devices will need to choose a protocol that is compatible with the devices they want to work with.

3. Cloud Computing

Cloud computing plays an important role in many smart home systems. Cloud-based platforms can be used to store data from IoT devices, as well as to provide remote access and control of smart home devices. Developers can leverage cloud computing platforms to develop and deploy smart home applications that can be accessed from anywhere in the world.

4. Security Considerations

Security is a major concern when it comes to smart homes. Developers need to be mindful of the security risks associated with IoT devices and smart home systems, and they need to take steps to mitigate these risks. This includes using strong encryption, implementing secure authentication protocols, and keeping software up to date.

When it comes to ensuring the security of your smart home, CoastMaid's [house cleaning services in Gold Coast](https://coastmaid.com.au) offer peace of mind. While developers focus on mitigating risks associated with IoT devices and smart home systems, our meticulous cleaning ensures your home remains a safe and comfortable haven.

Getting Started with Smart Home Development

There are a number of resources available to help developers get started with smart home development. Many of the major chip manufacturers and cloud platforms offer development kits and tools that can be used to create smart home devices and applications. Additionally, there are a number of online communities and forums where developers can connect and share knowledge.

Building a smart home can be a challenging but rewarding task. By understanding the key technologies involved and by following best practices for security, developers can create innovative solutions that can improve our lives and make our homes more efficient and convenient.
Top Finding
Published: 2024-03-03 02:25:31

> Type: Puzzle and leisure
>View: 2d
> Fun point: judge the rhythm of the ball’s landing point and keep climbing up


![First level](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64wskpa3lvfp3zd6ewzf.png)


> Time: 2019
> Personal Responsibilities:
> This game is independently developed by me, and all planning and art procedures are completed by me independently.


> When this game was produced, it was inspired by Ball Drop and Flyp Bird. The idea at that time was to make a reverse upward jumping game, using different platforms in the air to complete extreme jumps.

### Module division:
**1. Core gameplay**


![First level](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omuvlu8yibjhmelvje1b.png)



Players only use one finger to operate. After pressing and holding the screen, the position of the ball will slide left and right with the finger, and the ball will bounce continuously in the vertical plane with the same height. Players only need to judge the timing of jumping. When the height of the ball is higher than the flat surface, slide the finger to let the ball reach the flat surface, and the ball can jump onto the flat surface. Finally reaching the final end block is a victory.



![Level 34](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kwkgng0hfwyj9oeuwza.png)



- There are 3 crowns in each level. If you get them all, it means you have passed the level perfectly.



![Level 65](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6wfu529gbvrfmw0oqnr.png)


- There are 3 crowns in each level. If you get them all, it means you have passed the level perfectly. Different colored platforms in the game represent different functional mechanisms. For example, blocks with cracks can only jump once after being stepped on, and they disappear after jumping once.

**2. Level**

In the game, I made my own level editor and manually edited more than a hundred levels.

**3. Collection system**


![Collection system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9a009pegqnv6b4puvwx.png)


There will be many collection items in different places in the level. If you touch them, the collection will be successful. You can
Query the acquired collection items on the collection interface.
Unveiling the Magic of Postman: A Tech Adventure at APIs 101
Tags: aips101, postman, postmanstudent, learning
Published: 2024-03-03 04:06:33

Introduction:
Embarking on the journey of APIs 101 with Antara Roy and Bran Livingston was nothing short of a tech revelation. The event opened my eyes to the wonders of Postman, a tool that goes beyond its surface, transforming into a magical wand for testers. In this blog, I'm thrilled to share the tech gems I gathered and demystify the world of APIs in simple layman's terms.

Postman: More Than Just a Tool
Postman was unveiled as a digital translator, simplifying the complex world of APIs – the essential connectors between different pieces of software. Described as a magical wand for testers, Postman simplifies the testing process, making it an indispensable asset in the tech world.

Cracking the Request-Response Code
Ever wondered how we communicate with APIs? Postman broke it down into a simple analogy – a request-response pattern, much like ordering a pizza. Your request is akin to placing an order, and the API's response is the delivery guy arriving with your favorite pizza. It's a straightforward and relatable concept that removes the mystery behind API communication.

Interacting with APIs: A Digital Conversation
Postman compared interacting with APIs to having a chat. We pose questions (make requests), and the API responds – a digital conversation facilitated by Postman, our friendly chat interface. This analogy paints a picture of simplicity and accessibility in the often-intimidating realm of APIs.

Cooking Up a Request: The Fun Part!
Postman made crafting a request as easy as making a sandwich. With three key ingredients – the URL (the bread), the method (toasting or grilling), and the headers (toppings) – we can create a perfect request-sandwich. This analogy adds a touch of fun to the process, making it relatable and easy to grasp.

Building Our Own Requests: Becoming API Chefs
Postman empowered us to become API chefs, guiding us through the step-by-step process of building our own requests. Just like crafting a personalized pizza order with all the toppings we love, customizing our requests became a creative and enjoyable endeavor.

Essentials of Requests: Retrieve and Update Data
For those curious about fetching or changing data using APIs, Postman provided essential insights. Retrieving data was likened to reading a book (GET request), while updating data resembled editing a document (PUT request). Postman's simple tools proved to be powerful instruments for these actions, reinforcing the idea that mastering APIs can be uncomplicated.

In Conclusion:
In essence, APIs are digital buddies, and Postman emerges as the ultimate co-worker in this tech adventure. As someone who had little knowledge about Postman before the session, I now feel like a tech superhero – armed with newfound knowledge and a powerful tool in my tech arsenal. APIs 101 with Postman has made learning uncomplicated and incredibly rewarding.
Criando seu primeiro aplicativo React Native do zero: Um guia passo a passo
Tags: reactnative, javascript, mobile, beginners
Published: 2024-03-03 03:23:46

O React Native é uma plataforma poderosa para criar aplicativos móveis multiplataforma usando JavaScript. Este guia irá te levar da instalação do React Native à criação de um aplicativo funcional, passo a passo.

**Passo 1: Ambiente**

Você terá que ter instalado estas ferramentas em seu sistema:

- **Node.js**.  Basta acessar o link https://nodejs.org/en/, realizar o download e seguir os passos da instalação.
<br />
- **Git**.  Basta acessar o link https://git-scm.com/download/win, realizar o download e seguir os passos da instalação.
<br />
- **Um editor de código** como Visual Studio Code, Sublime Text ou Atom.
<br />
- **Expo Go**. Para testar o app no seu celular você precisa instalar o aplicativo Expo GO nele.

**Passo 2: Criação do projeto**

Navegue até o diretório em que queira os projetos salvos em seu sistema. Abra o bash do git:

![git bash](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bk3sdgasj0p4h3vjg3el.png)

Digite o seguinte comando:

```
npx create-expo-app testeApp
```


![git bash](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p35mwj4tikpv8uzh08yw.png)

Com isso o seu app react-native estará criado. Vá para a pasta e abra ele no seu editor, no meu caso estou usando o visual studio code.


![vs code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tty50sdzknpy2ydv3g9.png)

Abra o terminal e digite:

```
expo start
```


![terminal vs code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7b7bawyw2s9d8cjsx2v.png)

Após executar este comando será gerado o Qr Code para ser lido com o app do Expo Go baixado no seu celular.


![qr code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b64c3grrx1r4flrftufx.png)

Agora com o seu celular e o app Expo Go aberto, na tela inicial terá uma opção chamada Scan Qr Code.


![scan qr code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9lmsej0qzbtf7a5qhhh.png)

Que você vai usar para escanear o qr gerado. Depois de escaneado irá abrir a tela inicial do seu app.


![home app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w36kl6lbkuwg9k698s8a.png)

**Hello World**
Agora vá para o vs code e edite o arquivo inicial do seu app.


![inicial](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18pg8hp168en10offuds.png)

Faça seu primeiro hello world em um aplicativo.


![hello world](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l27kilvcyejmfd4mtpgy.png)

se o app está rodando no seu celular é só salvar o arquivo que ele já atualiza no app.


![first hello world](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcmk0wzyot37ophbwegr.png)

Pronto agora você já pode começar a desenvolver seus próprios aplicativos, espero ter ajudado. Muito obrigado por ler até aqui e até a próxima.