teleren/devto huggingface dataset:
Start your Career in Cyber Security
Tags: beginners, cybersecurity, linux
Published: 2023-03-15 18:27:22

## What is cyber security ?
⇒ Cyber Security is the application of technologies, processes and controls to protect systems, networks, programs, devices and data from cyber attacks.

The main purpose of cyber security is to protect all organizational assets from both external and Internal threats as well as disruptions caused due to natural disasters.

## Before Forward !
## You Should Know about,
- Computer Basics:
Like hardware and software, Input/Outputs, Processing Methodology etc.

- Web and Internet:
You Should learn about HTTP/HTTPS, DNS, Web Servers, FTP, SMTP

- Networking:
Bypass TCP/IP, ARP, Know Routing and Switching

- Operating Systems:
Know to operate Linux (Kali/Ubuntu), Windows, iOS, MAC

- Use Command line: i.e. CMD, Bash

## Roadmap
![Roadmap to be a Hacker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebmqcv3hwg1w1rjpvntn.jpg)

## Programing in Cyber Security (Really ?)
⇒ Yes, Programing is Important for CyberSecurity.
If you know, How to Build then you should easily break it !

- General Coding i.e. C, C++, Java etc.
- Script Writing i.e. Python, Ruby etc.
- Web App Testing i.e. Frontend & Backend
- Shell Scripting i.e. Bash

## Study
- 95% Companies acquire 'Cyber Security Specialist Role' at the basis of their Under Graduate Degree i.e. UG in Computer Seience/Application (B.Tech/BCA)

## Job Profiles 
- There are too many job roles are available in Industry 

![Job Profile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90jr8ngqpimvk0z85dvp.jpg) 

## Became an Ethical Hacker

- Know OWASP Top 10 Vulnerability
- Learn to Operate tools
- Make Projects (Solve a market Problem)
- Github (Use Tools & Exploit Repos)
- Join Bug Bounty Programs (Bugcrowd, Hackerone)
- Burp-Suite or Port Swigger
- Follow and Join Community
- Capture flags on TryHackme and Hackerbox
- Join Security Conferences 
- Join Security Forums i.e. Reddit, Discord etc.

## Professional Certifications
### For Ethical Hacking
- CEH v12 (Certified Ethical hacker) [Recommended]
- OSCP [Recommended]
- CompTIA Security+
- eJPT (Jr. Penetration Tester)
- GIAC Security Essential
- CISSP (Certified Information Systems Security Professional)

### For Networking
- CCNA (Cisco certified network associate) [Recommended]
- CompTIA Network+
- CCNP (Cisco Certified Network Propositional)

### For Linux
- RHCSA (Red Hat Certified System Administrator) [Recommended]
- CompTIA Linux+

## Salary Expectations
- For A beginner the base salary is approx 3,50,000/-
- For experience candidate the base salary is approx 7,20,000/-
- For A professional candidate the base salary is approx 15,00,000+  

## Conclusions
- programing is Important
- Have a Hacker's Mindset
- Be verbose, but don't talk much
- Be Social
- logical thinking
- Don't learn all, but know all
- Don't forgot the soft skills 

   "Hacking is an Art, Practised through a creative mind !"
Things you should know about Thirdweb SDK
Tags: web3, blockchain
Published: 2023-03-15 18:23:52

## About
ThirdwebSDK is a software development kit (SDK) for building decentralized applications (dApps) on the Thirdweb blockchain. It enables you to build web3 applications with possessing abilities like:

- Connecting to user's wallets

- Deploying and interacting with smart contracts

- Using the Solidity extensions you implemented

## Installation
The easiest way to get started is by using the Thirdweb CLI.

This interactive tool creates a new project with Thirdweb pre-configured with a framework and language of your choice.

```
npx thirdweb create app --evm
```
OR
The package manager for Node.js called npm may be used to install ThirdwebSDK.

```
npm install @thirdweb-dev/react @thirdweb-dev/sdk ethers@5 
or
yarn add @thirdweb-dev/react @thirdweb-dev/sdk ethers@5
```
Then wrap your application in the ThirdWeb Provider to get started!

```
import { ThirdwebProvider } from "@thirdweb-dev/react";

export const MyApp = () => {
  return (
    <ThirdwebProvider activeChain="ethereum">
      <YourApp />
    </ThirdwebProvider>
  );
};
```

## Features

- ThirdwebSDK gives a scope of highlights to building dApps on the Thirdweb blockchain.

- These include account management, transaction signing, smart contract interactions, and more.

- The SDK also includes several built-in utilities for working with the Thirdweb blockchain, such as converting between different data types and handling errors.

## Benefits

By utilizing ThirdwebSDK, developers can undoubtedly construct dApps on the Thirdweb blockchain without expecting to compose low-level blockchain code.

- The SDK abstracts away a large number of the complexities of blockchain improvement, permitting developers to focus on their application logic.

- ThirdwebSDK is factual and effectively kept up with, with standard updates and bug fixes.

- Since the Thirdweb blockchain is decentralized, utilizing ThirdwebSDK can assist with guaranteeing the security and unwavering quality of your dApp.

## Conclusion
Overall, ThirdwebSDK is a powerful tool for building decentralized applications on the Thirdweb blockchain. Whether you're a seasoned blockchain developer or just getting started, ThirdwebSDK can help to streamline your development process and make it easier to build secure and reliable dApps.

Hope you like it.
The Art of Debugging: Tips and Tricks to Debug Code Like a Pro
Tags: programming, beginners, tutorial
Published: 2023-03-15 17:52:44

Debugging is an essential skill for any developer. It's the process of finding and fixing errors in your code. Whether you're a beginner or an experienced developer, debugging can be a frustrating and time-consuming task. But fear not! In this post, we'll share some tips and tricks to help you debug code like a pro.

**Understand the Error Message**
When you encounter an error, the first thing you should do is read the error message. Error messages provide valuable information about what went wrong and where it occurred. They may include the line number, the type of error, and a brief description of the problem. Understanding the error message can help you narrow down the cause of the problem and save you a lot of time in the debugging process.

**Use Debugging Tools**
Most programming languages and IDEs come with built-in debugging tools. These tools allow you to set breakpoints, step through code, and inspect variables at runtime. By using these tools, you can see what's happening inside your code and pinpoint where the error is occurring.

**Check Your Assumptions**
Sometimes the error is not in your code, but in your assumptions. Double-checking your assumptions can help you identify and fix the problem faster. For example, if you're working with user input, make sure you're handling all possible cases, including edge cases. If you're using an external library or API, make sure you're using it correctly and passing the right parameters.

**Divide and Conquer**
If you're dealing with a large codebase or a complex algorithm, it can be overwhelming to debug everything at once. A good strategy is to divide and conquer. Start by isolating the problematic code and testing it separately. If the problem persists, narrow it down even further until you find the root cause.

**Take a Break**
Debugging can be a mentally taxing process, especially if you've been working on the same problem for hours. Sometimes, taking a break and coming back to the problem later with a fresh perspective can help you see things you didn't notice before.

In conclusion, debugging is a crucial skill for developers. By understanding error messages, using debugging tools, checking your assumptions, dividing and conquering, and taking breaks, you can become a debugging pro. Happy debugging!
This post was made by ChatGPT.
Two Sum - LeetCode problem 1 solution in python
Tags: leetcode, algorithms, python, problemsolving
Published: 2023-03-15 18:15:12

In this article, I will be sharing my approach to solving the Two sum problem on LeetCode. Like every other problem, the important thing is how you approach the problem or what we call an algorithm in programming, it does not really matter the language used. The approach in this tutorial can be used in any programming, not just python alone.

**Motivation:** I spend most of my free time on [hackerRank](https://www.hackerrank.com/access-account/) and [leetCode](https://leetcode.com/) trying out different problems. This will help improve your problem-solving skills.

Two sum problems: [Link](https://leetcode.com/problems/two-sum/) to problem on leetCode


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e33lsgd65xguet1a2e3v.jpeg)
**My First Approach** The simple approach is to use two nested loops. when we have two nested loops, one is the outer loop while the other is the inner loop. Since the first input is a list, the outer loop iterates over all the elements of the list, and the inner loop iterates from the current index of the outer loop up to the end of the list. here's the part where you want to grab a pen and paper and write a simple algorithm

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


⏩ **Writing the Code**

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

✅ ✅ ✅ The code works

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

while the solution passed all the cases, You can see that the time complexity is not good enough and the code can be improved to execute faster. here the complexity is quadratic O(N²) which means the performance is proportional to the square of the size of the input elements. The code can be written efficiently if we make use of a dictionary and iterate over the list just once

✏️✏️ **The Algorithmn**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1br2l86pnypmnolbuyr.jpeg)
⏩ **The code**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72capny6k3n88eaw9l76.jpeg)
✅ ✅ ✅ The code works: this time the code didn't just work but it was more faster


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

The complexity of this algorithm is O(n) which is faster than the one we implemented previously

**Conclusion** In this short guide, I showed you two approaches I used to solve the Two sum problem on leetCode. The first solution was good but not efficient while the second solution was more efficient. I hope I was able to make you see the importance of writing out your algorithm first before solving the problem and finally this approach can be used in other languages too.

say hi to me on Twitter [@Sammie\_savvie](https://twitter.com/Sammie_savvie)
DOCS as CODE
Published: 2023-03-15 18:12:18

I am looking for people interested in **DOCS as CODE** idea, in order to design a proof of concept.

The idea is to provides all the features of an ALM:

- Requirement management
- MBSE designer (textual or graphical)
- Issue tracking
- Test management
- Document review
- Realtime collaboration

Using only open source tools and current technologies : JavaScript, TypeScript, NodeJS, JSON, Markdown (possibly enhancing some constructs), and so on.

It should be consistent but not monolitic, extendible, and providing some kind of interoperabilty with existing solutions.

The goal is to replace commercial and close source solutions, such as Jazz from IBM (Doors, Rhapsody, Change, Synergy, ...)
Check S3 storage classes from command line
Published: 2023-03-15 17:50:07

... it's not so easy, so I created a small GO program:

https://github.com/megaproaktiv/storageclass

Scanned 1.8 Million files in 5 minutes.

It will show you the storage classes of all buckets like:

```
Bucket: archivemac123
STANDARD 3747
STANDARD_IA 183
8.6 GB
```

Enjoy!
Micron - The journey - Chapter 1, Why?
Tags: php, rest, api, webdev
Published: 2023-03-15 17:50:05

Hello everyone!

My name is Girolamo Dario, i'm a full-stack web developer, i'm involved in some pretty cool projects in the company where i works.

I want to write a series of post about my decision of developing a little Rest API framework... hoping this can inspire some of you!!
This first chapter is called "Why?", this is a good question, why i make this? There are several framework like Lumen (inspired from this name i called my framework Micron), Laravel, etc. but none of this was able of (easily) make me buld API Rest. So i thought, can i develope myself a similar solution that allow me build API Rest in the way i think is the easiest ? 

The trend, in software developing, is to use "already done" standard solutions for various reasons like : the single developer isn't too much "important" because is easily replaceble, no time spent in R&D, no needs of high level skills beacause "knowing" the framework is enough... all good things but i think that exasperate this behavior can clip the wings of innovation, some developers had good ideas but no time (or skills) for develope them!!
I'm a little out of the box, instead of learn something like Lumen or Laravel I invested my time creating something mine, unique, like i want! 

I'm not encouraging you to self-develop all, frameworks are a very good thing, i'm encouraging you to be more enterprising!! Micron is a framework, just like Lumen, the difference is that Micron incarnate my own concept of "easy to use", and i think that Micron is really the easiest to use framework for Rest API on php!

I published it on github with MIT License, so anyone can use it or develope some functions, i make this choice because i think that use Micron is very very very simple and can allow beginner developer to approach the world of Rest API.

And this is why Micron is born, now it is widely used in my company for several projects. I still develope "my baby" adding cool unique functions.

Thank you for reading.... see you soon to my next post!
ChatGPT4 is out - what can you do with it?
Tags: chatgpt, blog
Published: 2023-03-15 17:49:27

[ChatGPT-4](https://helloacm.com/openai-text-classifier-fails-to-detect-chatgpt-text/) is out, more powerful than chatgpt-3. 

However, it seems it is still not yet enabled by default on chat.openai.com


![image.png](https://cdn.steemitimages.com/DQmNWhYXdXCcZTrhfXJhuWR1anm5yr97bP5tbat9bVUxWCF/image.png)


![1094f803b6cd289af813336450355f9.png](https://cdn.steemitimages.com/DQmY8MpHRufbAuLEhfHsDNQJZXo6h3ojkAgYcedXGCCf2FA/1094f803b6cd289af813336450355f9.png)

Got an email, join the waiting list.

And $20 for monthly subscription (premium user)

![image.png](https://cdn.steemitimages.com/DQmbeVGJgt9b3Et42kAy84jbrcHAiqaW1wby9HmwTChTYQd/image.png)

## Applications that can run on 512M VPS?
Well, what can you do with this Free Instance? What software/applications can be running on it smoothly so that you don’t waste this Free Stuff?

You can run a health check tool similar to CloudFlare Heath Check: [NodeJs Health Check Tool](https://helloacm.com/chatgpt-designs-a-health-check-tool-in-node-js-to-run-on-free-vps-instance/)

<hr/>

### [Steem](https://steemyy.com) to the Moon!
1. You can swap the STEEM/SBD to USDT (TRC-20) via [Steem2USDT](https://steemyy.com/steem2usdt.php)
2. Register a free STEEM account at [here](https://steemyy.com/reg.php)
Easily Decode Kubernetes Secrets with a Handy One-Liner
Tags: kubernetes, linux, bash, beginners
Published: 2023-03-15 17:32:48

## Introduction:
Working with Kubernetes often involves managing secrets. During debugging we often need to show their contents. I'll share a handy command that has been a time-saver when decoding secrets in Kubernetes at least for me :) I'll show you two versions of the command, one using jq and the other using kubectl's built-in JSONPath functionality.

## Background:
Some time ago, we encountered an issue with secrets, which led to problems connecting to Vault. We needed to inspect the JWT token within the cluster multiple times. As a result, I decided to share a simple method for accessing the secret content using either `jq` or `kubectl`'s JSONPath, followed by decoding it with `base64 -d`.

In future posts, I will write about how we are handling our secrets with vault, how we organize them for multiple projects and which solution we are using for secret injection. 

I also plan to write how our incident process is setup, which roles are involved and how such a process could help during stressful situations. 


Now, let's get to the command.

## The Command:
You can use either `jq` or JSONPath to get the same result. I'll show you both examples, but I usually like `jq`.

**List secrets in namespace:**

```bash
kubectl get secrets
```

I'm using kubectx and kubens. This way I don't need to specify the namespace on every command.
Maybe I will write something about that, too :)

If you haven't installed it you need to specify the namespace with `-n <namespace>`

**Print output as json**
Ok ... To find which path should be extracted. Following command can be used: 
```bash
kubectl get secrets <secret-name> -o json
```
As you could imagine `-o json`says that the output should be json.
You need to take a closer look on the output to identify the path.

In our example it is `data.token`.

**The whole command:**
We want to read a value from `data.token`, which is stored in `<secret-name>`, and change it from base64 to plaintext, Kubernetes is storing secrets base64 encoded.

Using `jq`:

```bash
kubectl get secrets <secret-name> -o json | jq -r 'data.token' | base64 -d
```

Using JSONPath: 
```
kubectl get secrets <secret-name> -o jsonpath='{.data.token}' | base64 -d
```

`kubectl get secrets <secret-name> -o json` returns the secret in JSON format, which we then pipe into `jq`.
`jq -r 'data.token'` extracts the token, and we pipe it further into `base64` to decode it.
Now you can see the secret displayed in plain text.


Keep an eye out for more posts where I'll share insights, tips, and tricks related to Kubernetes and problems we are facing during our day2day work.
OpenAI launches GPT-4 a multimodal Language model
Tags: openai, news, machinelearning, nlp
Published: 2023-03-15 17:04:17

OpenAI has launched its new multimodal language model GPT 4 on 14th March, 2023. Multimodal means that it can take both image and text as input. It will power ChatGPT Plus, an upgraded version of the original ChatGPT tool which took the world by storm, available on waitlist basis for users. GPT-4 is already powering the Bing search. It also works on multiple languages and even on low resource languages like Latvian, Welsh, and Swahili.

It performs better or similar to humans on many academic examinations. A comparison of GPT-4 and GPT-3.5 on various academic exams is shown below. 


![exam comparison](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xju62qxbv26eqt9dcrjw.png)

Some of the examples of exams taken by GPT-4 are - Uniform Bar Exam (MBE+MEE+MPT), LSAT, SAT Evidence-Based Reading & Writing, SAT Math, and Graduate Record Examination (GRE). It can even solve Leetcode programming questions. The reasoning capability of GPT-4 has increased compared to the previous feature.

The best feature about GPT-4 is that it can recognise complex images given as input and give output based on the instructions provided to it. Some companies have already partenered with OpenAI to use GPT-4. The most famous of them are Stripe, Duolingo, Morgan Stanley, and Khan Academy. Duolingo launched a new feature [Duolingo Max](https://blog.duolingo.com/duolingo-max/) which will help users learn new languages easily. Stripe used it for streamlining user experience and combatting fraud.

To know more about the tool follow the below link - 
https://openai.com/research/gpt-4
Send emails with php on mac quickly with mailhog and mhsendmail
Published: 2023-03-15 17:04:04

Install Mailhog
`brew update && brew install mailhog && brew services start mailhog`

Check whether PHP can send mail

`php -a`
```
mail('test@test.com', 'subject', 'test');
```

Check http://0.0.0.0:8025/

If nothing appears the easiest way to fix this is to install MHSendmail

`brew install go`

`go install github.com/mailhog/mhsendmail@latest`


Get your php version and create a new file with respect to your version

`php --ini`
/usr/local/etc/php/X.X/conf.d/80-sendmail.ini
```
sendmail_path = /Users/xxxx/go/bin/mhsendmail
```

Restart PHP and try send mail again, it should work!
TIL 3
Tags: ruby, beginners
Published: 2023-03-15 16:55:56

I've been working on my final project for a couple of weeks now, and I hit a few roadblocks in terms of the functionality that I know how to achieve vs the functionality that I want in my project that I thought I had no idea how to implement. One of them was table pagination. During a brief conversation with the instructor he assured me that it's something I should be able to do with the knowledge of basic Ruby and Rails that I have so far. And, as it turns out, he was right.

What I wanted to achieve:
- split the records in the table into chunks (10 per page)
- display those chunks on consecutive pages
- links "previous page" and "next page" to navigate the records
- first page has disabled "previous" link
- last page has disabled "next" link

What I needed:
The instructor noted I probably needed to use `params`, as well as `.limit` and `.offset` methods. Since we haven't talked about the two methods in class, I had to read up on those first.

What I did:
First, I wrote my steps in a form of comments:

```
    # set notes_per_page number
    # set params (:page), default to 0
    # define pagination limit and offset - limit is notes_per_page, offset is notes_per_page * page params
    # get number of notes
    # get number of pages, convert to float
    # divide page_number by notes_per_page, round, to integer
    # get last page - rounded_page_number minus 1 because count starts at 0
```

Second, I went comment by comment and wrote the code, one variable at a time. I was amazed at how easy it was to do it after explaining to myself what my code was supposed to achieve first.

Third, I had to figure out how to go about "previous" and "next" buttons. Again, I wrote myself the steps in a mix of Ruby and English:

```
    # if page param == 0, can't click on "previous", can click on "next"
    # if page param = last_page, can click on "previous", can't click on "next"
    # else can click on both
    # link takes to ?page=<%= page param +/- 1 %>
```

I know there are much easier, faster and prettier ways of achieving what I just did. But what I've learned is that many features are really easy to create - all is needed is an understanding of what it is we are trying to do, and work one line at a time. That's what's amazing about programming.

And suddenly, the next feature that I wanted to add to my final project - messaging option between the users - doesn't seem as difficult to write as I thought it was!