teleren/devto huggingface dataset:
Build Jenkins job with Label
Tags: jenkins
Published: 2023-06-06 03:06:08

_While building the Job we might want to run our Job only on specific machines (technically environments) for this we can use labels so that this Project (Job) runs only on the machine which has that label we specified.
In this article, we are going to look how to create a Project(Job) that builds only on the machine that has the Label we specify._

---

## Prerequisite

We should have an Agent(Node) added to our Jenkins Controller. (if you want to setup one checkout my article [here](https://dev.to/logeshvel/adding-new-jenkins-nodeagent-3lij)

## Creating Project

In the Jenkins Dashboard click **New Item**.


![New Item](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2te3ljt2k4atmf443j4l.png)

Enter the name for the New Item.


![create Freestyle Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yiyw97wr0uyjhglrdt4v.png)


Give the description for the Project and select **Restrict where this project can be run** checkbox and enter the Label of the machine where we need to run this Job.


![label - ubuntu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88ped51vuvuzk3kzjmx8.png)

I have an Ubuntu Node added to the Jenkins Controller with the label "**ubuntu**". So, I made this project to run only on that machine by giving that label.
Now scroll down and Add build step


![Add build step](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ou84t8kd0xwlh4m4x83j.png)

I have selected **Execute shell** since I am gonna run this project in the Linux machine(Ubuntu).


![Execute shell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28d45cfh0maczgo8ik2b.png)

**pwd** - prints the current working dir
**uname** - gives the OS of the machine
**echo "Running this Project on ${NODE_NAME}"** - prints the Node name on which this project runs. 
**echo "Lables of this node: ${NODE_LABELS}"** - prints the Labels of that node

NODE_NAME , NODE_LABELS are Jenkins environmental variable.

Click Save. Project is created.


![First project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/32sbk4yai5jvdkrhmxkl.png)

## Build Project

Inside the Project's page click **Build Now** to build the project.
Click on the Build Numbers in the Build History to see the Console Output of that build.


![Console Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pttdqmjjyq18a76d3qee.png)

We have successfully created a Project and restricted that project to run only on the machine that has the Label "ubuntu".

---


Hope you have learned something new here.

Happie Learning :)
Keep Learning!!!
100 Days Coding Challenge - Day 17: FreeCodeCamp JavaScript Algorithms and Data Structures
Tags: javascript, webdev, programming, 100daysofcode
Published: 2023-06-06 03:03:27

## Day 17

Today I did a little of object-oriented programming, not much bc is my brother birthday and also, I had dance class :(

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/esjwnzmvy7l27degry5y.png)
TS - 使用其他語法替代跳出 forEach 迴圈這件事
Tags: typescript
Published: 2023-06-06 02:58:31

<u>**使用其他語法來替代中止 `forEach` 以達成目的**</u>

前篇談到如何中止 `forEach` 迴圈，這篇將會演示如何使用其他語法達到類似結果的做法。而其他語法則是在上篇中記錄基本用法，這篇將不再贅述。

從陣列中檢查是否有符合條件的元素，我們可以使用 `some` 方法來取得檢查結果

```TS
const arr = [1, 2, 3]

const res = arr.some(val => val === 2)
console.log(res)

// output
// true

const res = arr.some(val => val === 5)
console.log(res)

// output
// false
```

或者使用 `every` 檢查陣列中是否有元素不符合條件

```TS
const arr = [18, 20, 26]

const res = arr.every(val => val < 30)
console.log(res)

// output
// true

const res = arr.every(val => val > 20)
console.log(res)

// output
// false
```

如果原本就了解 `some` 和 `every` 方法，上述兩種執行對你來說是小菜一碟

**So, What about nested ? 如何檢查雙陣列是否符合指定條件？**

第一，假設要從兩個陣列中，檢查是否具有任一的相同元素，並且返回布林值。透過 `some` 方法來迭代兩個陣列，每次完成內層迭代時必須返回結果給外層，外層接收值之後會決定是否中斷迭代返回結果，假設內層從不返回任何值給外層 `callback` 函數，那麼外層永遠只會返回 false。

```TS
const arr1 = [1, 2, 3]
const arr2 = [2, 3, 4]

const res1 = arr1.some(v1 => {
    const res2 = arr2.some(v2 => {
        return v1 === v2
    })

    return res2 // 必須返回結果給上層
})
```

倘若檢查條件沒有太複雜，可將程式碼簡化如下

```TS
const res = arr1.some(v1 =>
    arr2.some(v2 =>
        v1 === v2
    )
)
```

第二，從兩個未排序的陣列中，檢查兩陣列是否為相同元素的陣列，所有元素皆相同但位置可以不同，例如 `1,2,3` 和 `2,1,3` 符合條件，兩陣列內都有 1, 2, 3 三個元素，雖然位置擺放不同卻不影響結果。

```TS
const arr1 = [1, 2, 3, 4, 5]
const arr2 = [3, 5, 1, 4, 2]

const res1 = arr1.every(v1 => {
    const res2 = arr2.some(v2 => {
        return v1 === v2
    })

    return res2
})
```

利用 `every` 的特性以及搭配 `some` 方法，當內層有任一元素與外層元素相同時，內層會返回 true 給外層，外層接收到結果後會繼續下一次迭代；若內層迭代在某次返回 false，外層接收到此結果後，every 會直接返回 false 結果並中止所有迭代。

**經過以上的範例後，我們應根據不同的情況去選擇適當的語法使用，以有效地處理商業邏輯。現在，有沒有覺得在 `forEach` 中使用 `try catch` 有點殺雞焉用牛刀？**

---

Thanks for reading the article :tulip: :sunflower: :blossom:

If you like it, please don't hesitate to click heart button :heart:
or follow my [GitHub](https://github.com/FakeStandard) :star:
or buy me a coffee :arrow_down: I'd appreciate it.

[![Buy-me-a-coffee][1]][2]

[1]: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h077sxd0vx1hix4t7lw8.png
[2]: https://www.buymeacoffee.com/FakeStandard
Empower Developers with Website Technology Lookup Tools
Published: 2023-06-06 02:57:52

In the fast-paced world of web development, staying up-to-date with the latest technologies and frameworks is crucial for success. Developers need reliable tools to keep track of the technologies utilized by different websites. That's where website [technology lookup tools](https://www.genelify.com/tools/technology-lookup) come into play. These tools provide developers with valuable information about the technologies used on any given website, including programming languages, content management systems, frameworks, libraries, and more. By leveraging these tools, developers can gain insights into the technology stack of other websites, understand emerging trends, and make informed decisions when it comes to their own development projects.

One of the key benefits of using website technology lookup tools is the ability to discover new tools, frameworks, and libraries that can enhance development processes. By analyzing the technologies used by successful websites or industry leaders, developers can identify innovative tools that can streamline their own development workflows. Additionally, these tools enable developers to gain a deeper understanding of the technologies they encounter, providing them with valuable knowledge and expertise. With the insights gained from website technology lookup tools, developers can make informed choices, optimize their development stack, and deliver high-quality websites and applications that meet the demands of modern digital experiences, you can use website technology lookup tool using [Genelify](https://www.genelify.com)

Genelify
Boost Your Website Using SEO Checker
Published: 2023-06-06 02:55:37

In the highly competitive digital landscape, having a strong online presence is crucial for businesses. Search Engine Optimization (SEO) plays a vital role in driving organic traffic to websites, improving search engine rankings, and increasing visibility. To ensure your website is optimized for maximum performance, an [SEO checker](https://www.genelify.com/tools/seo-site-checker) is an essential tool for developers. An SEO checker is designed to analyze various aspects of your website, such as meta tags, keyword usage, page speed, mobile-friendliness, and more. By leveraging this tool, developers can quickly identify areas that need improvement, fix critical issues, and optimize their website to meet the latest SEO standards.

One of the key advantages of using an [Genelify SEO checker](https://www.genelify.com) is the ability to receive detailed reports and recommendations. These reports provide valuable insights into your website's performance, highlighting areas that require attention. With the information provided, developers can make data-driven decisions and implement SEO strategies to enhance their website's visibility. The recommendations offered by an SEO checker can include optimizing meta tags, improving site speed, fixing broken links, enhancing keyword usage, and much more. By following these suggestions, developers can significantly improve their website's search engine rankings, increase organic traffic, and ultimately achieve better online success.

Genelify
#2: More landscaping & some news
Tags: gamedev, devjournal, unreal
Published: 2023-06-06 02:16:34

I have some good news: I got hired for a full-time position as an AI developer at Uvalle Law Firm, PLLC! While I am not really at liberty to share job specifics, I will try to document what I learn there for future reference. It will be a particularly enlightening role as I have not had a chance to get very deep into AI/NLP yet, and it's definitely something I've been wanting to explore.

Anyway, as for my other updates with the game, I've been working relatively slowly on it considering my other responsibilities, but I managed to import the map into Unreal itself.

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

Above you'll see my rendering in Gaea. I usually develop on a Mac, so this is a Windows 11 VM. As I mentioned before, I had to pull the data from OpenTopography, and while 30m/px is fine as far as resolution goes, I decided to refine it some more via erosion techniques and exported it to a .raw file to import to Unreal.

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

And here's the terrain in Unreal. I've run into a dilemma where the scaling is kinda getting screwed up. I had to experiment with proportional scaling from Gaea, which didn't work, and then doing normalized scaling from Gaea and just manually adjusting the scale in Unreal, but that kinda ruins the realistic scaling that we want since we have to eyeball it.

There's also some issue where the player character cannot exist beyond a z value of 0, and the terrain is automatically low to compensate for sea level. As you can see in the screenshot, with the auto-material package that I bought from the community store, it's all snowy because that was the only way I could get the character to work.

Another issue is that you'll see the player character floating in midair. There is some weird issue with the collision + scaling here not interacting correctly that I will have to address.

Finally, I will be experimenting with nanite to see how it affects performance.

Overall, once these issues are ironed out we should hopefully be able to move on to adding other assets. As I said, it's a war sim so it will be nice to add some tanks or humvees or something. Stay tuned.

Update: Shortly after I posted this I continued to fiddle around with the settings and turns out I can make the kill Z value much lower than -1000, so I set it to -10000 and now the collision is working fine and the coloration of the terrain is fine. Guess that fixed like 3 problems in one, then. Will be trying nanite again; hoping it doesn't crash on me again (it started using >100 GB of VRAM).
Ethernaut - Lvl 7: Force
Tags: tutorial, security, ethereum, smartcontract
Published: 2023-06-06 02:06:37

## The Challenge 🤸🤸‍♂️

Increase the balance of the following contract from zero:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Force {/*

                   MEOW ?
         /\_/\   /
    ____/ o o \
  /~____  =ø= /
 (______)__m_m)

*/}
```
## Increasing the balance 📈

`Force.sol` have neither a `fallback` nor `receive` function to accept ether, so if we send a raw transaction it wil revert:

```solidity
// this will revert
await sendTransacion({from: player, to: contract.address, value: toWei("1")})
```
To force the contract to receive ether we need to implement the `SELFDESTRUCT` opcode. 

`SELFDESTRUCT` performs two task:
1. Irreversibly deletes the bytecode of a contract from the blockchain.
2. Sends the balance of a contract to an address, if the recipient is a contract with no `fallback`, `SELFDESTRUCT` forces the contract to accept the ether.

Go to Remix and create a new file with this contract:
```solidity
contract ForceBalance {
    address payable public to;

    constructor(address _to) {
        to = payable(_to);
    }

    receive() external payable {
        selfdestruct(to);
    }
}
```
Request a new instance of `Force`, grab the address and deploy `ForceBalance` with the instance level address.

In your console send ether to `ForceBalance`:

```solidity
// send a small amount of ether
await sendTransaction({to: FORCE_BALANCE_ADDRESS, from: player, value: "10000"})
```

Wait for the transaction to be mined and check the balance of `Force`:

```solidity
await getBalance(contract.address).then(bal => bal.toString()) // should greater than zero
```

Submit the instance to complete the level.

## Conclusion ☑️

`SELFDESTRUCT` deletes the bytecode of a contract and forces a recipient to accept ether, even if it is a contract with no mechanism to receive ether.

The `SELFDESTRUCT` opcode is currently deprecated and its use in not recommended.

## Further reading 🤖
- [Stack Exchange Ethereum: "selfdestruct" deprecated in Solidity 0.8.18](https://ethereum.stackexchange.com/a/144212/105494)
Useful React links for Interview preparation
Tags: react, interview, links
Published: 2023-06-06 01:57:08

Hey Guys !!

I have listed some of the useful links which will help you to crack React interview.

**React Life cycle**
https://medium.com/swlh/react-lifecycle-hooks-71547ef4e7a8
https://blog.pusher.com/beginners-guide-react-component-lifecycle/
https://www.topcoder.com/thrive/articles/lifecycle-methods-in-react-js


**React Road map for beginners**
https://dev.to/suhailzone/reactjs-roadmap-for-beginners-2021-14en
https://dev.to/digvijayjadhav98/roadmap-for-react-js-2022-4ccn
https://dev.to/dhiwise/advanced-roadmap-for-reactjs-developers-108d


**React Performance**
https://blog.logrocket.com/optimize-react-apps-using-a-multi-layered-structure/
https://javascript.plainenglish.io/react-app-performance-optimization-the-definitive-guide-9b658be3b6e4
https://hackernoon.com/top-9-tips-to-improve-react-performance?source=rss
https://dev.to/asjadanis/optimizing-react-app-performance-16lp
https://medium.com/@khannapranshu33/react-performance-tips-a74f03efe437
https://medium.com/@caglayanyanikoglu/react-performance-improvements-356f81b1904f
https://dev.to/ahmedgmurtaza/react-performance-optimization-usememo-vs-usecallback-2p2a
https://www.paulsblog.dev/advanced-react-ui-components-to-optimize-development-process/
https://medium.com/@antoniocastillom78/simple-ways-to-improve-your-react-app-performance-without-usememo-2502a7260d75
https://blog.bitsrc.io/rendering-images-the-better-way-f0963c25ef04
https://nerdleveltech.com/how-to-be-better-with-performance-optimization-in-react/
https://dzone.com/articles/how-to-improve-reactjs-website-performance
https://nerdleveltech.com/how-to-be-better-in-react-code-reusability-part1/
https://dev.to/devland/how-to-optimize-your-react-apps-performance-1045
https://howtocrackit.com/mastering-react-memo-for-optimal-performance-tips-and-tricks/
The requested URL was not found on this server. Apache/2.4.52 (Ubuntu) Server at ... Port 80
Tags: apache2, php
Published: 2023-06-06 01:53:51

Are you stumbling into that error? So here's something can help you to solve:

You need to enable **Mod_Rewrite** for **apache2**. Run this command:

`sudo a2enmod rewrite` 

And after, restart apache:

`systemctl restart apache2`

It's done! Everything should work again.
Hello World!
Tags: career, news, softwareengineering
Published: 2023-06-06 01:37:41

Hello there y'all!

This is my debut post in here and in pretty much any channel!
I am going through another phase of my career and transitioning back from FTE to Consultant.

While I plan to do Ruby/Rails Consultancy, I am also create a new Saas, blog, do OSS, study, etc...

You can find the article in its permanent link: https://hac-rods.me/posts/2023/let-the-games-begin

I hope y'all enjoy!
And any feedback or comments, are dearly welcome!

./Helio
10 Reasons why you should learn Clojure
Tags: clojure, programming, devjournal, beginners
Published: 2023-06-06 01:31:00

Programming languages I have tried: 

♦️ C
♦️ CPP
♦️ Python
♦️ Go
♦️ Javascript
♦️ Clojure 

Since Clojure, I haven't looked anywhere else. Here are 10 Reasons why you should learn Clojure:


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


## 1. Functional programming: 

Clojure is a functional programming language that encourages immutability and recursion, which are key concepts in data structures and algorithms.


## 2. Immutable by default: 

Immutable data structures are simpler to reason about and debug as they can't be changed once created. This results in fewer bugs and a more predictable codebase.


## 3. One language to rule them all: 

Clojure is a hosted language which is compiled to JVM, JS, or CLR. This means developers can write code in Clojure and have it run on various platforms.


## 4. Concise & Simple Syntax: 

Clojure's simple and expressive syntax makes it easy to understand and implement complex data structures and algorithms.


## 5. Performant: 

Clojure is built on top of the Java Virtual Machine (JVM) and benefits from its performance, making it well-suited for data-intensive tasks.


## 6. Interoperable with Java and JS: 

Clojure can easily interact with other JVM languages, giving you the ability to use popular data structures and algorithms libraries.


## 7. Enables concurrent and parallel programming: 

Clojure's support for concurrent and parallel programming allows you to easily create highly performant and concurrent data structures and algorithms.


## 8. Lisp heritage: 

Clojure is a dialect of Lisp, a family of programming languages known for their simple and powerful data structures and algorithms.


## 9. REPL Driven Development: 

Clojure's REPL workflow is a fun and enjoyable. Immediate feedback loop makes learning and working with data structures and algorithms an enjoyable experience.


## 10. Community: 

Clojure has an active and supportive community that provides a wealth of resources and libraries for learning and implementing data structures and algorithms.



Clojure is the perfect language to expand your brain.


Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more about DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
Learn Python by Building Real-World Projects | Learn Python in 10 Hours
Tags: python, programming, webdev, machinelearning
Published: 2023-06-06 01:11:38

Learn Python by building real-world projects. Learn the fundamental concepts of Python programming and work on a variety of real-world projects. From web scraping to data visualization, you will have the opportunity to apply your new skills in a practical context and gain a deeper understanding of the language.

This course is designed to give you a solid understanding of the Python programming language by diving deep into the language's capabilities through practical, hands-on projects.

We will start by covering the basics of the Python language, such as data types, variables, control structures, and functions. Once you have a solid foundation in these concepts, we will move on to more advanced topics, such as object-oriented programming, file handling, and error handling.

Throughout the course, you will work on several projects, each building upon the skills you have learned in the previous sections. By the end of the course, you will have a portfolio of projects that demonstrate your proficiency in Python and give you a competitive edge in the job market.

This course is perfect for those who are new to programming, looking to learn Python, or just want to gain practical experience with real-world projects. The course is designed to be easy to follow along, with plenty of examples and exercises to practice what you've learned. So whether you're a beginner or an experienced programmer, this course has something for you. Enroll now and start your journey to mastering Python.

What you'll learn

   Essential Python programming concepts, from data types and control structures to functions, classes, and modules.
   How to effectively work with Python's standard library and third-party libraries for tasks such as web scraping, data analysis, and automation.
   Develop proficiency in handling various data formats, including CSV, JSON, and XML, while also learning to work with databases and data storage solutions.
   Explore Python's capabilities in web development and API interaction, creating dynamic websites and consuming data from various sources.
   Delve into data science and machine learning, using Python tools like Pandas, NumPy, and scikit-learn to analyze data and make informed predictions.
   Enhance your Python skills in desktop application development, using frameworks like Tkinter and PyQt to create visually appealing and feature-rich applications
   Gain experience in network programming and cybersecurity, writing Python scripts to automate tasks, monitor networks, and secure systems.
   Gain experience in network programming and cybersecurity, writing Python scripts to automate tasks, monitor networks, and secure systems.
   Discover best practices for writing efficient, maintainable, and scalable Python code in diverse real-world contexts.
   Develop a diverse portfolio of Python projects, showcasing your expertise and problem-solving abilities to potential employers or clients.

{% embed https://www.youtube.com/watch?v=fiMkMXhxEqw %}
Lagoon at DrupalCon Pittsburgh
Tags: event, community, conference, drupal
Published: 2023-06-06 00:39:50

If you're at DrupalCon Pittsburgh this week, make sure to say hello! We'll be at the amazee.io booth. 

On Tuesday, we have two talks and a BoF:

**Michael Schmid, Head of Technology and Co-founder**
Lightning Talk: DevOps is dead. Let's learn about Platform Engineering!
Tuesday, June 6, 2023 - 11:15 AM to 11:30 AM EDT
Expo Hall

**Alanna Burke, Community Manager, Developer Advocate**
Protecting your work-life balance on a global 24/7 team
Tuesday, June 6, 2023 - 3:00 PM AM to 3:50 PM EDT
Room 306-307

Let's Doc About It! 
Tuesday, June 6, 2023 - 4 PM
Room 328 Table 1

And of course, Tuesday Night is LagoonCon! Make sure you register if you haven't already - space is limited!

Read more details here: https://www.amazee.io/events/drupalcon-pittsburgh-2023
New types of jobs: Twitch and better YouTube
Published: 2023-06-06 17:36:57

---
title: New types of jobs: Twitch and better YouTube
published: true
date: 2023-06-06 00:00:00 UTC
tags: 
canonical_url: https://blog.brainstory.ai/new-job-type-twitch/
---

## Why Twitch?

From the start, Contenda roots were deeply tied with Twitch. Our first product ever was a retention strategy for content creators. We even helped [Ludwig break a Guinness World Record](https://en.wikipedia.org/wiki/Ludwig%27s_subathon) for most subscribers in a month on Twitch. During Covid quarantines, our founders found community and time together through Twitch streams.

Today our audience mainly identifies as developer advocates; and they use Twitch to do live builds, coworking streams, and chat with their dev communities. This type of longform content is meant to be casual and personal, which makes it hard to repurpose. Imagine sending a 3-4 hour VOD to an editor and telling them to make a 500 word blog post! Well now _we’re that editor_. Make more without doing more. With this change to now process Twitch videos, we’ve also modified how YouTube videos are submitted. Now, you can simply grab your YouTube URL without having to find the video ID.

## How does it work?

1. Login to your Contenda account
2. Paste a Youtube or Twitch URL link
3. Select Blog or Tutorial
<video controls width="500" height="400">
  <source src="https://contenda.co/blogimages/Job_Submission.mp4" type="video/mp4">

BOOM! It’s that easy. Send us your Twitch VOD’s today!