teleren/devto huggingface dataset:
Keep Your Fork In Sync: Understanding git remote upstream
Tags: beginners, tutorial, git
Published: 2023-12-06 09:25:20

When you fork a repository on GitHub to contribute to an open-source project or keep a copy for your work, it's important to be able to sync your local fork with updates made in the original repository. That's where adding a remote upstream comes in handy.

In this post, I'll explain what git remote upstream is, why it's useful, and provide examples of how to set it up and use it to keep your fork in sync.

## What is a remote upstream?

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

By default, when you fork a repository your local clone will only have a remote called origin configured, which points to your forked repository on GitHub. While the origin allows you to push/pull with your fork, it doesn't connect you back to the source project repository.

That's where adding an `upstream` remote comes in. `upstream` allows you to fetch changes made in the original repository without pushing any updates back. It serves as a read-only path to the source project.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/paeuoidk5kzg9zaavdwf.png)
[source](https://stackoverflow.com/questions/31747072/will-remote-url-for-fetch-and-push-be-different)

## Setting up remote upstream

To set up an upstream remote on your local fork, you need to get the clone URL of the original repository:

```cmd
git remote add upstream https://github.com/ORIGINAL_OWNER/REPOSITORY.git
git remote set-url --push upstream DISABLE  # so that you don't push back to the original repo
```

You can verify it was added correctly with `git remote -v`:

```
origin	https://github.com/<your_username>/<repository>.git (fetch)
origin	https://github.com/<your_username>/<repository>.git (push)
upstream	https://github.com/ORIGINAL_OWNER/REPOSITORY.git (fetch) 
upstream	https://github.com/ORIGINAL_OWNER/REPOSITORY.git (push)
```

## Using remote upstream

Now you have two remotes configured:

- origin points to your fork
- upstream points to the original repo

To sync changes from upstream to your local fork, you can `fetch` and `merge` the upstream branch

```
# Fetch the latest changes 
git fetch upstream

# Merge upstream changes into your active branch
git merge upstream/main
```

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

This will bring any commit made from the original repo into your local fork, allowing you to work seamlessly with the latest updates.

And with that, you now have a shortcut configured to easily keep your fork in sync with the original project source! Let me know if any part needs more explanation.
Astro 4.0 🚀, Dev Toolbar & SDK Updates
Tags: webdev, astro, devtools
Published: 2023-12-06 09:22:36

Massive Congratulations to our friends at [Astro](https://astro.build/) who just realized the latest version, 4.0 🥳

The release includes some cool new features, among other things, a [Dev Toolbar](https://docs.astro.build/en/reference/dev-overlay-plugin-reference/). Think DevTools, but especially for Astro Devs 😏 This little toolbar enables you to inspect islands, run audits for accessibility and performance, and so much more. The best part about it? It's customizable 🎉

![Astro Dev Toolbar on Storyblok example project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcndx3j39rufpka7ed6d.png)

So you can probably guess what happened, of course, we had to try it and add a version to the @storyblok/astro SDK. Currently, when you enable the Dev Toolbar feature, you will now have an additional Storyblok tab, which links useful resources. 

![Storyblok tab in the Astro Dev Toolbar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghaeupx8xr5rtmdykk22.png)

We are working at full speed to add more functionality for you. What do you think? Is the Astro Dev Toolbar useful?
Develop a Minimalistic Process for Development Teams to Innovate
Tags: startup, productivity
Published: 2023-12-06 09:20:12

I just finished reading ["Continuous Discovery Habits: Discover Products That Create Customer Value and Business Value."](https://www.goodreads.com/book/show/58046715-continuous-discovery-habits?ref=rae_0) The book combines [Impact Mapping](https://www.impactmapping.org/), Customer Interview, and [LDJ](https://go.ajsmart.com/ldj) to create a process that can be used to develop innovative products.

![fun and colourful image denoting ideation and brand strategy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fe0bpvocn92rsukz87i.png)

In 2024, I aim to create a simple process that even inexperienced startup founders can easily follow to achieve consistent results despite uncertainties.

**Here's how I imagine the approach will work:**

- Use **Impact Mapping** to prioritize business goals by aligning customer behaviors with stakeholders.
- Organize interview cycles, track insights/opportunities, and analyze prototype results with **Continuous Discovery** to understand customer needs.
- Use **LDJ** to prioritize assumptions, experiment with tests, and ideate solutions that satisfy both business and customers.
- Use **User Story Mapping**, [ShapeUp](https://basecamp.com/shapeup), and exercises from [Design Sprint](https://www.ajsmart.com/how-to-design-sprint) to create a Minimum Viable Feature (MVF) and deliver value.
- Conducting **retrospectives** to improve the process and identify what matters for the team is vital.

---

**Paul Keen** is an Open Source Contributor and a Chief Technology Officer at [JetThoughts](https://www.jetthoughts.com). Follow him on [LinkedIn](https://www.linkedin.com/in/paul-keen/) or [GitHub](https://github.com/pftg).

If you enjoyed this story, we recommend reading our [latest tech stories](https://jtway.co/latest) and [trending tech stories](https://jtway.co/trending).
What is the difference between ransomware and ransomware-as-a-service?
Tags: siems
Published: 2023-12-06 09:16:17

Ransomware-as-a-service is inspired by software as a service where a ransomware operator can benefit from selling ransomware to multiple affiliates in the dark web. Learn more about Ransomware-as-a-service (RaaS) here.
**[Ransomware-as-a-Service](https://sharkstriker.com/guide/everything-you-should-know-about-ransomware-as-a-service/)** (RaaS) is a type of cybercrime business model where individuals or groups create and distribute ransomware, making it available for others to use in exchange for a percentage of the ransom payments. In this model, the developers of the ransomware, known as the "affiliates" or "operators," can use the RaaS platform to easily deploy and manage ransomware attacks without having to develop the malicious software themselves.

Here's how the RaaS model typically works:

Development: The creators of the ransomware design and develop the malicious software.
tsParticles 3.0.1 Released
Tags: typescript, showdev, javascript, webdev
Published: 2023-12-06 09:15:31

## tsParticles 3.0.1 Changelog

### Bug Fixes

- Fixed bug when using particles groups

--

## Social links

- [Discord](https://discord.gg/hACwv45Hme)
- [Slack](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI)
- [WhatsApp](https://chat.whatsapp.com/KQyHc9UEbRc2qlqNQR2J5c)
- [Telegram](https://t.me/tsparticles)
- [Reddit](https://www.reddit.com/r/tsParticles/)

---

{% github matteobruni/tsparticles %}
Self-hosted monitoring tool using Docker Uptime Kuma
Tags: docker, monitoring, uptime
Published: 2023-12-06 09:08:21

Imagine you're a web developer or you work in a web agency and you'd like to keep an eye on the sites you've developed for your clients, free of charge. Are these sites online now, or are they down?

This work is carried out by site monitoring platforms. Could you install one on your computer? Of course!

There are tons of self-hosted monitoring tools; one of them is Uptime Kuma. You can play with the demo website here: https://demo.uptime.kuma.pet:27000/. Just create an admin account (for free) and you're ready to add your first websites.

As read in the official documentation, you can easily start it using the command below.

```bash
docker run -d --restart=always -p 3001:3001 -v ${PWD}:/app/data --name uptime-kuma louislam/uptime-kuma:1
```

![Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dudehdr8rn8o9y2wb4n7.png)

The -v ${PWD}:/app/data flag is important if you want to keep track of the sites you'll add to the dashboard (i.e. if you restart the tool). If you wish, only, play once with the interface first, you can omit it so nothing will be written on the disk.

In the setting page, site by site, you can define a lot of actions like what the monitoring tool should do when the site is down. For instance, send you a notification on Mattermost or an email or ...

![Notification through Mattermost](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e8pefc2crvyt9bfwdecl.png)

On top of configuration items site by site, you'll also find in the Profile -> Settings page, a large number of global settings like the choice of the language's interface (French is available).
This or that?
Tags: webdev, javascript, github, opensource
Published: 2023-12-06 09:07:49

Have you ever ended up in a situation where you have many images of something but hard to choose the perfect one?

Like, if we have two images, it's easy to choose the best one. But when it's 5 or 10 or 50 images, the process becomes more difficult. 

The solution is to take the first two pictures, find the best one. Now take the third picture and cross check with the best one and it continues.

I made a simple web app which helps to do this. Simply, we upload a bunch of images and click start. The program shows us a pair of images and we have to choose the best one. It repeats until the best one finally being found. 

[Dot-poll](https://github.com/pulimoodan/dot-poll) is a simple web app with basic html and js which delivers this solution. See the live version here: [Demo](https://pulimoodan.github.io/dot-poll/)

There is a lot of features we can add to this app and I am looking for developers who are interested working on this. Leave a comment or a pull request if you find this worth a try.
Advent of Code 2023 - December 6th
Tags: advent, adventofcode, python, december
Published: 2023-12-06 09:07:39

---
title: Advent of Code 2023 - December 6th
published: true
description: My progress with the 2023 version of Advent of Code
tags: advent, adventofcode, python, december
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36qayk14ewje7rvykeg5.jpg
series: Advent of Code 2023
# published_at: 2023-12-01 17:41 +0000
---

In this series, I'll share my progress with the 2023 version of [Advent of Code](https://adventofcode.com/2023).

Check the first post for a short intro to this series.

You can also follow my progress [on GitHub](https://github.com/robvanderleek/adventofcode).

## December 6th

[The puzzle of day 6](https://adventofcode.com/2023/day/4) took me only half an hour. I'm using a brute-force implementation for the second part, which is a bit disappointing but I need the saved time for the second part of yesterday's puzzle.

__My pitfall for this puzzle:__ The second part of the puzzle deserves something better than the current brute-force implementation. Unfortunately, I could spend no more time on it.

{% spoiler Solution here, do not click if you want to solve the puzzle first yourself %}

```python
#!/usr/bin/env python3
import math
import re

with open('input-small.txt') as infile:
    lines = infile.readlines()

times = [t for t in re.split('\s+', lines[0].split(':')[1].strip())]
distances = [d for d in re.split('\s+', lines[1].split(':')[1].strip())]

ways = []
for index, t in enumerate([int (t) for t in times]):
    way = 0
    for i in range(1, t + 1):
        if i * (t - i) > int(distances[index]):
            way += 1
    ways.append(way)

print(math.prod(ways))

time = int(''.join(times))
distance = int(''.join(distances))

ways = 0
for i in range(1, time + 1):
    if i * (time - i) > distance:
        ways += 1
 
print(ways)
```

{% endspoiler %}

That's it! See you again tomorrow!
Wednesday Links - Edition 2023-11-06
Tags: java, jvm, spring, zgc
Published: 2023-12-06 09:00:00

CDS with Spring Framework 6.1 (4 min)🤝
https://spring.io/blog/2023/12/04/cds-with-spring-framework-6-1

JEP 456: Unnamed Variables & Patterns (12 min)🗳️
https://openjdk.org/jeps/456

Introducing Generational ZGC (5 min)🐇
https://inside.java/2023/11/28/gen-zgc-explainer/
How to install dotnet 6 in ubuntu 20.04
Tags: howto, install, dotnet, ubuntu
Published: 2023-12-06 08:54:27

**Download and install the below package:**

```
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
```

```
sudo dpkg -i packages-microsoft-prod.deb
```

**How update the system and install transport https:**

```
sudo apt install apt-transport-https && sudo apt update
```

**Now install dotnet SDK 6:**

```
sudo apt install dotnet-sdk-6.0
```

**Also install dotnet core 6:**

```
sudo apt install dotnet-runtime-6.0
```

**Check dotnet version:**

```
dotnet --version
```

**Create hello world application:** 

```
dotnet new console -0 HelloWorld
```
**Run the hello world application :**

```
cd HelloWorld/ && dotnet run
```

## For ubuntu 20.04 reference:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2004

## For ubuntu 22.04 reference:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2204

## Another good one:
https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-22-04/
Socket编程
Published: 2023-12-06 08:43:40

头文件我们过会再看，
首先创建出套接字fd
```c++
int server_fd = socket(AN_INET,SOCK_STREAM,0)
//AN_INET代表地址族-因特网，使用ipv4通信协议进行通信，
//SOCK_STREAM 使用TCP进行连接
//0参数代表将默认使用最合适的协议，在上面代码中默认使用TCP进行通信
```
understanding : what computer wants
Tags: computerscience, beginners
Published: 2023-12-06 08:38:56

So
this is my first post in a while 
I am a serious procrastinator, so here it goes:
I am writing this post without any preparation (I know it`s the best) but I had to break the perfect chance cycle aka the perfectionist trap.
 Today I just understood or more likely perception changed utterly, regarding a simple thing: ND arrays
I am re-learning and revising programming from 1 not zero since I had a couple of courses about a decade ago.
so I decided to make a 3*3 game puzzle 
but kept thinking about how to make Python, C, or Java treat it as a grid, as in height and width because we were always taught that way and drawn in the board that way.
however, all the answers were about nested arrays or arrays inside arrays.
I finally understood it`s what and how perceiving a 2D array is different from how it`s created.
for Computer it`s always Linear but nested.
On the PC it`s always 1 big line so 
1   2  3
4   5  6 
7   8  9 
is actually (1,2,3)(4,5,6)(7,8,9) but you use a library like NumPY to represent it to you in Human readable 2D table way.
CSS box-reflect Property Kullanımı
Tags: webdev, css, tutorial, codepen
Published: 2023-12-06 08:38:25

{% embed https://gist.github.com/eminaltan/8c71f73d0262aaf80ba5d1d072aa5e8e %}

{% codepen https://codepen.io/eminaltan/pen/jOdpdgR %}
Advantages And Disadvantages Of Upgrading Inventory Management System
Tags: python, inventree, hiredeveloper, webdev
Published: 2023-12-06 08:36:48

Pros of Upgrading Inventory Management System

Increased Productivity: Upgrading the [inventory management system](https://www.aegona.com/software-development/software-development-based-inventree-open-source) helps optimize workflows, thereby enhancing business productivity and efficiency. This can lead to more effective inventory management and reduced time for related operations.Improved 

Accuracy and Reliability: The new system provides better data collection and processing capabilities, aiding in making smarter decisions based on more reliable inventory status information.

Enhanced Customer Responsiveness: With better inventory management, businesses can quickly meet customer demands, fostering satisfaction and strengthening customer relationships.

Cons of Upgrading Inventory Management System

Investment Costs: Upgrading the [inventory management system](https://www.aegona.com/software-development/software-development-based-inventree-open-source) may require a significant investment in software, hardware, and employee training.

Deployment Time: The deployment of a new system might take a considerable amount of time and could impact daily business operations.

Compatibility Risks: There might be compatibility issues when integrating the new system with existing or other applications within the organization.

Read more [inventory management software development company](https://www.aegona.com/software-development/advantages-and-disadvantages-upgrading-inventory-management-system)
Best Astrologer in Jalandhar
Published: 2023-12-06 08:36:47

Pandit is a person who has gained deep knowledge in any subject as Garden needs a Gardener to take care of it. Same as that, Holy Places like Temples need a Pandit to take care of it. He is the one who looks after Holy Places. He takes responsibility for it and does everything timely and wisely as he does chanting and makeup of God daily as he knows the rituals and their importance very well. He cleans the place where God’s sculpture resides/is kept. He makes sure that all the Hindu Rituals will be performed peacefully. He is the [Best Astrologer in Jalandhar](https://panditdesraj.com/).
Some Ruby Details I Find Myself Tripping Up On
Tags: ruby
Published: 2023-12-06 08:14:34

I found myself getting caught on what attributes specifically are and how they function separately from methods. Attributes are specific properties of an object and store data, while methods are functions that can be associated with the object and define the behavior/capabilities of the object. 

Attributes created by attr_accessor basically declares an instance variable and creates getter and setter methods. The importance of this would be in access the variables outside the scope of the instance, since all instance variables are private by default.

For example, if I were to create an attribute of **username** in a class of my definition called **Person**, I can access the attribute by self.username or by @username when inside the scope of **Person**. However, when I go outside of the scope of **Person** (let's say I create Jeeho = Person.new), I cannot access the instance variable. With the getter/setter methods defined by the attribute, I can access outside Person (e.g. Jeeho.username). Here, I'm technically not calling object.attribute, but rather object.attribute_method.

```
class Person
  attr_accessor :username
  
  def example_method
    return self.username
    # having object self here might be helpful to distinguish from local variable if there's a local variable of the same name as the method
    # same result as just calling @username
  end
end

Jeeho = Person.new
# can't access instance variable @username here outside Person, but still can access it if I have a getter method defined, which attributes does for me
Jeeho.username

```

Another detail of Ruby I was getting caught in was whether every method requires calling on an object. While object methods are referenced very clearly by object.method, it is still possible to create standalone methods that do not require an object (a good example of this being the square_root method that was in Defining our own classes Lesson).

```
def square_root(a_number)
  answer = a_number ** 0.5
  return answer
end
```
Jobescape.me-An interesting finding for freelancers
Tags: freelance, digitalmarketing, courses, ai
Published: 2023-12-06 08:32:48

Hello everyone! I want to share an interesting find with you. I decided to pump my skills in marketing and promotion of my services as a freelancer, and I think what to look for and went to look for information on the Internet. In short one word nothing useful I have not found. But then I came across an interesting platform Jobescape.


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

**Platform Vibe**: You hop onto Jobescape, and it’s like walking into a library where every book is screaming, “I can make you better!” It’s sleek, user-friendly, and runs around the clock, perfect for night owls or early birds.

Pros:

Self-Paced Courses: They’ve got a buffet of courses, from “Freelancing Fundamentals” to “Digital Marketing I, II, III, and IV”. It’s like being at a freelance university without the student debt.

AI Assistants: These digital genies are worth their weight in code, doing everything from spitting out **SEO** articles to crafting **TikTok** video scripts. They’re the Robin to your Batman.

Cons:

Overwhelming for Newbies: There’s no hand-holding here. You’re given the tools, but you better know how to use them or be willing to learn on the fly.

Learning Curve: It feels like being thrown into the deep end of the pool — exciting but also slightly terrifying.

Remember those who have overcome the thorny and difficult path of the beginning. Success in a career always awaits them. So don’t be afraid to take a risk!


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

The guys provide really useful courses about (Digital Marketing, Freelancing Platforms and Marketplaces) these are the ones that I highlighted for myself. In addition, the site has a lot of goodies for fans (AI).


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

 From (Facebook Ads Detailed Targeting) to (Blog post generator). In short, in a word, the guys do not sit idle. And the price is quite reasonable. If you want to improve your skills as a freelancer is highly recommended.
Pulumi
Published: 2023-12-06 08:30:58

Pulumi is primarily implemented in the **_Go programming language_**.

Pulumi, an infrastructure as code tool, operates as independent company **_without a parent_** company.

**Pulumi Overview:**

**Purpose:** Enable developers and DevOps teams to treat infrastructure as code, allowing them to use familiar programming languages to express and automate the provisioning of cloud resources.

**Functionalities :** 
- Multi-Language support
- Declarative Infrastructure Definition
- Cross-Cloud Compatibility
- Continuous Delivery Integration
- Resource Abstraction
- State Management

**Logo :**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mn00ffiobarrpb055x9h.jpeg)

Pulumi is available in both **_open-source and commercial(paid) version._**