teleren/devto huggingface dataset:
Ethereum as a Global State Machine.
Tags: blockchain, ethereum, evm, pos
Published: 2023-01-28 18:01:05

Right from inception, the Ethereum project was clearly spelled out in a well prepared document called Ethereum whitepaper. Ethereum has always been developed, tweaked and updated to meet the goal that is the Ethereum project.

What is the Ethereum project? A short summary to this question is that Ethereum was born to be a global state machine that is truly decentralized.

The word global here is pretty self-explanatory... leaving us with state machine.

A global state machine is a globally distributed system that achieves and maintains one outcome or result simultaneously across its entire network. State here refers to the current result at that instant. On a state machine, the outcome is always the same across the entire system or networks, or in the case of Ethereum, nodes.

Now, maintaining a state on a distributed network implies that there is a mechanism to track the change in state in real time across the entire network; this also implies that the entire distributed networks when given a set of code must arrive at the same result after executing the program.

So how do we track state transitions across a global network of computers? It gets tricky... to ensure that Ethereum network is deterministic, all the nodes(computers) across the world that powers the Ethereum blockchain must run an Ethereum compliant program called client.

An Ethereum client must not necessary be written in a particular programming language, but it must be written according to the specifications provided in the Ethereum yellow paper (different from Ethereum white paper).
Those programs written according to the Ethereum specifications are called Ethereum clients.

Ethereum clients, when installed and ran on a computer connects that computer to the Ethereum blockchain network.
Anybody can download any of these clients and install on their system and become an Ethereum node.

Once such system successfully connects to the Ethereum blockchain network, it will download past records of the transactions recorded on the network... afterwards it will become a fullnode; and a validator if the owner meets the preset requirements.

Ethereum is not just distributed, it is also decentralized. That is why it depends on independent computers across the world to run the network. No single computer has a control over what happens on the network, decisions are collectively made by the majority of all the computers on the network. The process by which this democracy is achieved on the network is overseen by an algorithm known as 'consensus mechanism'.

PS: This is still pretty high level; no very technical stuff yet. Anyone can easily understand even without any prior knowledge of blockchain network. If you are intrigued by what you read, feel free to dive down the rabbit hole; simply type in 'what is blockchain technology' on Google and take it on from there. Cheerio.

#programming #blockchain #Ethereum #ethereumblockchain
neco time table 2023
Published: 2023-01-28 18:19:41

[https://multischolar.com/neco-timetable/](https://multischolar.com/neco-timetable/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)
https://plaza.rakuten.co.jp/chenlee/diary/202301290000/
https://www.provenexpert.com/neco-time-table-20233/
https://www.producthunt.com/@timeneco
https://www.divephotoguide.com/user/necoobj/
https://wakelet.com/@necoobj
https://vocal.media/authors/necoobj
https://www.lifeofpix.com/photographers/necoobj/
https://seedandspark.com/user/necoobj
https://rosalind.info/users/necoobj/
http://phillipsservices.net/UserProfile/tabid/43/userId/196237/Default.aspx
https://app.roll20.net/users/11563604/necoobj
https://speakerdeck.com/necoobj
https://social.msdn.microsoft.com/Profile/necoobj
https://camp-fire.jp/profile/necoobj
https://plazapublica.cdmx.gob.mx/profiles/necoobj/activity
https://www.metal-archives.com/users/necoobj
https://storium.com/user/necoobj
https://trabajo.merca20.com/author/necoobj/
https://www.intensedebate.com/people/necoobj
https://www.mifare.net/support/forum/users/necoobj/
https://pinshape.com/users/2563008-necoobj
http://foxsheets.com/UserProfile/tabid/57/userId/119189/Default.aspx
https://www.kompasiana.com/necoobj
https://www.credly.com/users/neco-obj/badges
https://www.myminifactory.com/users/necoobj
https://www.sqlservercentral.com/forums/user/necoobj
https://www.longisland.com/profile/necoobj
https://guides.co/a/neco-obj/
https://myanimelist.net/profile/necoobj
https://www.iheart.com/podcast/269-neco-time-table-2023-107971444/
Easy way to install GIT in Linux
Tags: linux, git, devops, systems
Published: 2023-01-28 18:15:41

## Prerequisites :
- You know how to use Linux terminal
- Ubuntu 20.04
- Centos 7
- sudo is optional, use it when required.

In this article, I will explain to you on how to install GIT in Ubuntu and Centos using package manager.

## Ubuntu 20.04
First, you need to update your ubuntu package manager
`sudo apt-get update`

And then, install git with execute command 
`sudo apt-get install git`

After the process of installation finish, verify if GIT is successful installed in your machine by checking it version
`git --version`
If it return value like the picture below, GIT successful installed.

![GIT version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7wy5qjyt08hfn0vw99p.png)
---

## Centos 7

First, Update `package manager` in your centos system

```bash
sudo yum update
```

After that, install `GIT` by executing the following command (it’ll take some time and need your action to continue the process)

```bash
sudo yum install git
```

When the above process is done, verify if `GIT` is already installed in your machine by checking it version

```bash
git --version
```

The result should look like this:

![GIT version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shj4t0ycpfq24xw0z74y.png)


---

🎉  thats all, now you can use `GIT` in your machine.
~~~~~~~~VOTE!~~~~~~~
Tags: showdev
Published: 2023-01-28 18:05:43

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

We started out with our backend project by deciding we would choose an overarching idea that we could create under. Peter liked the idea of creating a voting site/app where you could cast your vote for an elected official and I liked the idea of putting a silly spin on it, noting that there were towns in the US with a mayor who was a dog.

From there we traced out the scope, detailing all the pages we’d like to create and the information we’d like populated. I noted down our tables and Peter created our schema with DB Designer. Once our idea was approved, Peter chose our site colors and created site mock ups with Adobe Illustrator Xd. These mock ups were integral in helping to visualize our pages throughout the project and from there I began creating our database with sequelize and Elephant sql, while Peter created our EJS files once I’d outlined the routes.
<br>
![mock ups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54g51btynmnfr73jo8g2.jpg)
<br>
For much of the project we worked in tandem, making decisions on logic and design collaboratively, pooling resources via Zoom when we needed to make changes to EJS and/or new routes. 

As our deadline neared we agreed to focus on CRUD and the project requirements such as bcrypt, authentication, and security - cutting extra pages and ideas that we liked but that could not be executed in the time allowed.

Given more time, we likely would have created a fourth table to manage votes, added in complexity such as the admin drop downs only containing positions already included within the table, disabling buttons, and adding in a printable “I voted” sticker. However overall are pleased with the final product, our voting app, Vote!

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

<center>[Project Repo](https://github.com/Meg-Div/BackendProject)
[Peter's Github](https://github.com/peterriesing) & [Meg's Github](https://github.com/Meg-Div)</center>
Information on markdown for people just starting on Github!
Published: 2023-01-28 17:57:13

GitHub is a powerful platform that allows developers to collaborate on code, track changes, and manage software projects. It can be a bit intimidating to get started, but once you understand the basics, it becomes a valuable tool in your development workflow. In this blog post, we'll cover the basics of using GitHub and how to use Markdown to create a nice design for your project.

First, let's talk about the basics of using GitHub. When you create a new repository, you'll be given the option to initialize it with a README file. This file is a great place to start when you're first setting up your project. It's where you'll provide an overview of what your project is, what it does, and how to use it.

Once you've created your repository, you'll be able to start making changes to your code. To do this, you'll need to clone the repository to your local machine. This will create a copy of the repository on your computer, which you can then work on. When you're ready to share your changes, you'll need to commit them to the repository. Committing your changes is like saving a snapshot of your code. It allows you to track the progress of your project and collaborate with others.

Now let's talk about Markdown. Markdown is a simple markup language that makes it easy to format text. It's often used to create README files and documentation for projects. Markdown is easy to learn, and it's a great way to add structure and organization to your text.

Here are some basic Markdown syntax examples:

1 - To create a heading, use one or more hash symbols before the text:

```

# Heading 1
## Heading 2
### Heading 3

```

2 - To create a list, use a dash or a star before each item:

```

- Item 1
- Item 2
- Item 3

```

3 - To create a link, use brackets for the text and parentheses for the URL:

```

[Google](https://www.google.com)

```

4 - To add emphasis, use single or double asterisks or underscores:

```

*italic* or _italic_
**bold** or __bold__

```

There are many more advanced features available in Markdown, but these are the basic syntax you need to know to get started.

In summary, GitHub is a powerful platform for managing software projects and collaborating with others. Markdown is a simple markup language that makes it easy to format text. By using these two tools together, you can create well-organized, easy-to-read documentation for your project that looks great.
CodeBoost - Code Completion Tool (VS Code Extension)
Tags: vscode, webdev, javascript, ai
Published: 2023-01-28 17:50:39

What would it look like if we use the power of the AI to create a extension that auto complete your code based on the current code? 

Exactly like GitHub CoPilot. 

{% embed https://www.youtube.com/watch?v=5cg1GWXPfpE %}

The extension offers inline completion items, which means that as soon as you type a specific trigger phrase or hit a specific key, a list of code snippets will appear for you to select from. This makes it easy to find the code you need without having to manually type it out or search through your files.

Overall, this extension is a powerful tool that can help developers save time and increase their efficiency. Whether you’re a beginner or an experienced coder, this extension is a valuable addition to your development toolkit. So, if you want to boost your productivity, try this extension today!

This extension will soon publish and will available for public for free. 

Bear with us.
Serenity Sounds: A Guide to Meditative Music
Tags: meditationmusic, relaxationmusic, stressrelief, yogamusic
Published: 2023-01-28 17:49:28

Meditation music has been used for centuries to help people relax, reduce stress, and improve overall well-being. In the modern world, the use of meditation music has become increasingly popular as a way to manage the physical and mental health effects of the fast-paced, high-stress lifestyle that many people lead.

Research has shown that meditation music can have a positive impact on the body's stress response. When we are stressed, our bodies release hormones that put us in a state of "fight or flight." This can lead to physical symptoms such as increased heart rate, high blood pressure, and muscle tension. Meditation music can help to counteract these effects by slowing down the heart rate and lowering blood pressure. It can also help to relax the muscles and reduce tension in the body.

Meditation music can also be beneficial for mental health. Studies have shown that it can help to reduce anxiety and depression, improve mood, and increase feelings of calm and relaxation. This is likely because meditation music can help to reduce the activity in the part of the brain that is associated with negative thoughts and emotions.

In addition to its physical and mental health benefits, meditation music can also be used as a tool for spiritual growth and self-discovery. Many people use it as a way to connect with their inner selves and to gain a deeper understanding of their own thoughts, feelings, and beliefs.

Overall, meditation music can be a powerful tool for improving health and well-being in the modern world. Whether you're looking to reduce stress and tension, improve your mental health, or connect with your inner self, meditation music can help. With a variety of different styles and types of music available, it's easy to find something that resonates with you and your personal needs.

It's important to note that meditation music should be used as a complement to traditional medical treatments and not as a replacement, always consult with a doctor before starting any new practice.

In conclusion, meditation music can be a valuable tool for managing the physical and mental health effects of modern life. With its ability to reduce stress, improve mood, and promote relaxation, it can help to improve overall well-being and quality of life.
SHORT ESSAY ON MEDITAION
Tags: meditation
Published: 2023-01-28 17:42:59

## Short essay on meditation
Meditation has been around for thousands of years, but in today's fast-paced world, it's more important than ever. With the constant barrage of information and stimulation from technology, it's easy to feel overwhelmed and stressed. Meditation can help to calm the mind and bring a sense of balance and peace to our lives.

One of the most significant benefits of meditation is its ability to reduce stress and anxiety. When we meditate, we focus on the present moment, which can help to ease worries about the future and regrets about the past. Studies have shown that regular meditation can lower cortisol levels, a hormone associated with stress, and increase feelings of well-being.

Meditation can also improve our focus and concentration. By training the mind to focus on one thing, we can improve our ability to pay attention and stay on task. This can be especially beneficial in today's world, where we are constantly bombarded with distractions.

Meditation can also help to improve our relationships. When we are calm and centered, we are better able to communicate with others and to understand their perspectives. We are also more likely to respond to situations with compassion and empathy, rather than reacting with anger or frustration.

Another benefit of meditation is that it can improve our physical health. Research has shown that regular meditation can lower blood pressure, improve heart health, and boost the immune system. It can also help to reduce chronic pain and improve sleep.

In short, meditation can help us to navigate the stress and distractions of modern life, improve our relationships, and boost our physical and mental well-being. It's a simple and easy practice that can be done by anyone, anywhere, and at any time. Start incorporating meditation into your daily routine and experience the benefits for yourself.
making a window in opengl and GLFW, a c++ guide
Published: 2023-01-28 17:34:12

**intro**
i have made a post on making a window in just opengl but i found most tutorials used GLFW for window displaying

**step 1**
first install opengl on your Operating System(OS) i am using [ubuntu](ubuntu.com) and i installed it from [here](https://medium.com/geekculture/a-beginners-guide-to-setup-opengl-in-linux-debian-2bfe02ccd1e)

**step 2**
you need to install GLFW for ubuntu linux i found a tutorial [here](https://shnoh171.github.io/gpu%20and%20gpu%20programming/2019/08/26/installing-glfw-on-ubuntu.html), however you will need to install it for your OS.

**step 3**

i found the code to making a window off the installation guide to install GLFW for ubuntu [here](https://shnoh171.github.io/gpu%20and%20gpu%20programming/2019/08/26/installing-glfw-on-ubuntu.html), this is the code:

```cpp
#include <GLFW/glfw3.h>

int main(void)
{
    GLFWwindow* window;

    /* Initialize the library */
    if (!glfwInit())
        return -1;

    /* Create a windowed mode window and its OpenGL context */
    window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
    if (!window)
    {
        glfwTerminate();
        return -1;
    }

    /* Make the window's context current */
    glfwMakeContextCurrent(window);

    /* Loop until the user closes the window */
    while (!glfwWindowShouldClose(window))
    {
        /* Render here */
        glClear(GL_COLOR_BUFFER_BIT);

        /* Swap front and back buffers */
        glfwSwapBuffers(window);

        /* Poll for and process events */
        glfwPollEvents();
    }

    glfwTerminate();
    return 0;
}
```


**step 4**
to compile your main.cpp file you can do

```bash
g++ -pthread -o main main.cpp -lglfw -lGLU -lGL -lXrandr -lX11 -lrt -ldl -lglut
```
i included some extra library's for when you are doing other things with opengl so you wont run into library errors

**step 5**
enjoy and good luck coding
[GCP] Cloud CDN With AWS S3 Bucket
Tags: aws, gcp, multicloud, s3withcloudcdn
Published: 2023-12-30 12:40:50

---
title: [GCP] Cloud CDN With AWS S3 Bucket
published: true
date: 2023-01-28 17:32:21 UTC
tags: 
- AWS
- GCP
- MultiCloud
- S3WithCloudCDN
canonical_url: https://www.kmp.tw/post/gcpcdnwiths3bucket/
---

# Situation

### Visit S3 From Google Cloud CDN

# Component
- ### AWS
    - ### S3 Bucket
- ### GCP
    - ### LoadBalacer w/ CDN

# How To

## In AWS Side
- ### Make sure Your S3 Bucket Already Setting To Public
- ### Get S3 Bucket URL, In This Case Is `http://ikala-test.s3-website-us-east-1.amazonaws.com`

## In GCP Side
- ### Create NEG(Network endpoint groups)
![cdnS301](https://img.kmp.tw/gcpcdntos301.png)
![cdnS302](https://img.kmp.tw/gcpcdntos302.png)

- ### Create Load Balancing( Classic Only )
![cdnS303](https://img.kmp.tw/gcpcdntos303.png)
- ### Ceate Backend
![cdnS304](https://img.kmp.tw/gcpcdntos304.png)
![cdnS305](https://img.kmp.tw/gcpcdntos305.png)
![cdnS306](https://img.kmp.tw/gcpcdntos306.png)


- ### Ceate FrontEnd
![cdnS307](https://img.kmp.tw/gcpcdntos307.png)
- ### After Finished

![cdnS308](https://img.kmp.tw/gcpcdntos308.png)
![cdnS309](https://img.kmp.tw/gcpcdntos309.png)
- ### Verify

![cdnS310](https://img.kmp.tw/gcpcdntos310.png)
[REF](https://www.doit-intl.com/helping-a-business-incrementally-migrate-from-aws-and-cloudflare-to-gcp/)
Eagerly know if end of paginated results is reached in Prisma
Tags: prisma, findmany, pagination
Published: 2023-01-28 17:17:37

---
title: Eagerly know if end of paginated results is reached in Prisma
published: true
description: Eagerly know if end of paginated results is reached in Prisma
tags: prisma, findMany, pagination
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-28 17:08 +0000
---

## Context

Prisma doesn't return meta information like `total_page` or `no_of_pages` when returning [paginated results](https://www.prisma.io/docs/concepts/components/prisma-client/pagination). With information like `total_page` we can know beforehand if we are at the end of the page and show/hide relevant information. In prisma, this doesn't seem to be possible at the moment without [adding a second query](https://github.com/prisma/prisma/discussions/3087#discussioncomment-39983) to fetch the count of results.

## Problem

There's a `Fetch More` button at the bottom of a list. We need to enable this button only if we have more records to show. If not, we should hide this button.

## Solution

This [demo implementation](https://stackblitz.com/edit/nextjs-m8xcgk) doesn't use a second query. While fetching each page it retrieves one more record than the required page size. With this approach, the maximum number of records fetched twice is equal to the number of page requests. A more detailed explanation is attached below.

![eagerly-detect-end-of-results-prisma](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3op74v50hbscdj3trxrb.png)

[GitHub](https://github.com/atosh502/disable-fetch-more-eagerly), [Stackblitz](https://stackblitz.com/edit/nextjs-m8xcgk)
Let us Build the Wall of WAF
Tags: security, firewall, aws, cloud
Published: 2023-01-28 17:15:15


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrmcrycs2ca6omleoxqs.png)
AWS WAF- Web Application Firewall


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a37o89trx2e1ul6gnep4.png)
Yes, we do have NACLs, which is a network firewall, but to protect us from the exploits of application layer attack we use WAF. A traffic which seems harmless to the NACL, can be built in with an attack motive like SQL-injection, HTTP flood, Cross site scripting or many many more.

The ultimate motive of any web application is to serve the clients but not all clients are ideal, some are attackers or bots designed to attack the web application.

WAF lets us configure rules that allow, block, or monitor (count) web requests based on conditions that you define.

These conditions can include IP addresses, HTTP headers and body, or custom URIs.

You can set up rules like Rate Based Blocking to automatically block bad traffic, or respond immediately to incidents. Here the WAF keeps a count of how many requests can be allowed for a particular type of client. If they exceed the limit ,they are blocked.

We also have WAF Managed Rules which helps us to deploy pre-configured rules to protect your applications common threats like application vulnerabilities. All Managed Rules are automatically updated by AWS Marketplace security Sellers.

After configuring all the rules, we put them together in a WACL(Web Access Control List)

With WAF we can also configure the response body which the user gets when traffic is blocked for them.

Happy learning guys !!!