teleren/devto huggingface dataset:
Girls in Tech entrevista a Justine Devos, Head of Data & Insights de InfoJobs

Tags: womenintech, datascience, insights, data
Published: 2022-01-14 14:23:29

Una de las áreas en las que estamos poniendo foco, junto con la **comunidad Women in Tech de Adevinta Spain**, es en establecer acuerdos o sponsorizaciones con entidades que promuevan la presencia de las mujeres en el ámbito técnico. Por eso, somos sponsors de Girls in Tech y, como parte de nuestra colaboración, han entrevistado a Justine Devos, Head of Data & Insights de InfoJobs.

Justine ha compartido su inspiradora historia profesional, que curiosamente arrancaba con sus estudios de Historia del Arte, más tarde se aventuraba en el sector de la hostelería, hasta que decidió volver a Francia y centrar su formación en business e informática, a la vez que ponía en práctica todo lo que iba aprendiendo en una startup en el equipo de marketing y comunicación, donde despertó su interés por el análisis de datos. 

Además, nos comparte las 4 razones en las que basa su estrategia para liderar el equipo. Para todas las futuras directoras del mundo tecnológico, Justine nos deja estos consejos: "tener confianza en sí misma y aprender a conocer a cada persona. Dedicar tiempo para conectar con cada uno de los miembros del equipo. Crear un entorno de confianza para trabajar bien y delegar tareas."

Te dejamos la entrevista completa ⬇

{% youtube 3PeHmY77PL4 %}
Hack Solidity: Block Timestamp Manipulation
Tags: solidity, security, blockchain, smartcontract
Published: 2022-01-14 14:16:05

Timestamp provides information about the date and time in which the block is mined. When you go e.g. to the etherscan you can find a timestamp for each block that was mined.


![timestamp solidity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/keu46x9iegle43q12hm9.jpg)

Block timestamp can be manipulated by miners a then used to their advantage to attack a smart contract.

Let's go into details of how this could happen using the contract below. 

```
contract Roulette {
    uint public pastBlockTime;

    constructor() payable {}

    function spin() external payable {
        require(msg.value == 5 ether); // player must send 5 ether to play
        require(block.timestamp != pastBlockTime); // only 1 transaction per block

        pastBlockTime = block.timestamp;
 // if the block.timestamp is divisible by 7 you win the Ether in the contract
        if (block.timestamp % 7 == 0) {
            (bool sent, ) = msg.sender.call{value: address(this).balance}("");
            require(sent, "Failed to send Ether");
        }
    }
}
```
I created a simple game where a player can win all of the Ether in the contract if he submits a transaction at a specific time. 

To join the game player need to send 5 ether. To play the game player call the `spin` function. If the block.timestamp is divisible by 7 player win all the Ether in the contract.

The miner that wants to win all of the Ethers can manipulate the contract. To do so he can:

- call the `spin` function and submit 5 Ether to enter the game

- submit a `block.timestamp` for the next block that is divisible by 7


## How to prevent block timestamp attacks

There are two ways to prevent block timestamp attacks:

- do not use block.timestamp in your contract

- apply the 15-second rule which says that 

> If the scale of your time-dependent event can vary by 15 seconds and maintain integrity, it is safe to use a `block.timestamp`.
 

### Sources

- https://consensys.github.io/smart-contract-best-practices/recommendations/#the-15-second-rule

- https://solidity-by-example.org/hacks/block-timestamp-manipulation/

- https://cryptomarketpool.com/block-timestamp-manipulation-attack/

- https://blog.sigmaprime.io/solidity-security.html#block-timestamp
Connect your Azure VM without opening SSH / RDP Ports!
Tags: cloud, azure
Published: 2022-01-14 14:14:00

When you open **PORT 22 for SSH** or **3389 for RDP** in your Azure VM.

You are fundamentally taking a risk.

You are exposing your VM from public attacks! 

As the IP is public, the attacker is just going to run the scripts!

But for early stage startups, small companies this can be a big security loophole and for big companies, this is a major compliance issue!

While early stage startups cannot afford compliance and auditing firms!

They are putting their resources and assets as risk!

Is there a solution to it?

Don't open them?

Yes, this is one solution! If you don't want to access to your VM after creating them!

But I want to access them!

Well in that can you can use [Azure Bastion](https://docs.microsoft.com/en-us/azure/bastion/bastion-overview)

It is a PAID service by Microsoft Azure, where you can still access your VM without opening those ports!

All you need is your Microsoft Azure Account and Browser!

![Credits - Azure Docs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9l9x97n748b9yt0b126t.png)
Birdbox 2021 (Repost)
Tags: birdboxcamera, raspberrypi, arm, motioneye
Published: 2022-01-14 14:13:28

[Video on YouTube](youtube.com/watch?v=8ucla9r3Ufs
)

I wanted to try doing a Raspberry Pi project, so I got myself a Raspberry Pi Zero W (but Pi Zero 2 is better for this), a NOIR camera, a Bright Pi, a power bank, and a power cable. And then I put it all together, put my 16GB memory card into my computer, and installed Motion Eye OS following this guide:

[Guide by Arrow.com](https://www.arrow.com/en/research-and-events/articles/motioneyeos-camera-setup-on-raspberry-pi-zero-w)
![Birdbox](/images/BirdBox2021/birdbox.png)
After following that guide, just put your Raspberry Pi in a birdbox and you're all set. We ended up not using the IR lighting, because we got enough light from the little entrence, but I'm glad we had the option. I think this was a fun project, but at the time the Raspi Zero 2 W didn't exist, but it would signicantly improve the quality of the video as well as the framerate.

Links:  
[MotionEyeOS](https://github.com/ccrisan/motioneyeos/releases)  
[Balena Etcher](https://www.balena.io/etcher)
Will No-Code Replace developers?
Tags: webdev, codenewbie, programming, discuss
Published: 2022-01-14 14:08:17

### Lets first understand, what even is No-Code or Low-Code?

No-Code is made for people in every background to create stuff/software. No code platforms have pre-built drag-and-drop elements that have been coded for reuse and scale, so that anyone, even beginners can make anything they want easily.

### Will No/Low Code replace programmers?

No Not at all, we will surely need programmers... There will always be a need for coding. They benefited in there both alternatives.

## [Subscribe to my newsletter](https://devdairy.substack.com/p/coming-soon?showWelcome=true)

### So does No/Low Code does have any future?

Yes No/Low Code do have a future but they are not the future of code. It is certainly having a place in the future and will be leveraged to make many applications For ANYONE. The future is low-code or no-code with an expected growth rate of 44.4% by 2022 to $27.23 billion (up from $4.32 billion in 2017).

### Why No/Low Code so famous?

No/Low Code is popular because it doesnt matter on what background you come from, you can make softwares. Making software in nocode platforms can be fast and done pretty regularly to build prototypes and MVP in a record time.

Thats all for this blog, its a pretty small blog, but its just a start for me :)
Paracetamol.js💊| #8: Explica este código JavaScript
Tags: javascript, webdev, spanish, beginners
Published: 2022-01-14 14:06:25

## **¿Qué imprime este código?**

```js
console.log(+true);
console.log(!"Lydia")
```

 A: `1 y false`
 B: `false y NaN`
 C: `false y false`

Respuesta en el primer comentario. 

---
Paracetamol.js💊| #7: ¿Qué imprime este código JavaScript?
Tags: javascript, spanish, webdev, beginners
Published: 2022-01-14 14:05:08

## **¿Qué imprime este código JavaScript?**

```js
let c = { greeting: "Hey!" };
let d;

d = c;
c.greeting = "Hello";
console.log(d.greeting);
```


-     A: `Hello`
-     B: `undefined`
-     C: `ReferenceError`
-     D: `TypeError`

Respuesta en el primer comentario.

---
Star Rating system with HTML, CSS,JS 
Tags: discuss, codepen, javascript, css
Published: 2022-01-14 14:01:36

In a very minimal way,  how would you implement a star rating system?
I was able to do it 😁 Here is my code, corrections are welcome :) 
https://codepen.io/Rj456/pen/dyVwgbX?editors=0011
Appwrite 0.12 - Ask Me Anything
Tags: appwrite, opensource, database, news
Published: 2022-01-14 13:57:46

{% youtube jt5CGCPCsEc %}

Last week, we at [**Appwrite**](https://github.com/appwrite/appwrite) announced the release of [**version 0.12**](https://github.com/appwrite/appwrite/releases), one of our biggest and most important technical releases in recent times 🤩. As a celebration, we hosted an AMA livestream where [**Brandon**](https://github.com/kodumbeats) discussed about all the major updates from this release! 🥳

{% post appwrite/its-here-announcing-the-release-of-appwrite-012-5c8b %}

If you have any further questions or simply want to hang out with some awesome open source geeks, you can **join the Appwrite team and community** on [**our Discord server**](https://appwrite.io/discord) 💝.
JavaScript factory functions and Object.create()
Tags: javascript, react, webdev, typescript
Published: 2022-01-14 13:52:23

Do you know JavaScript factory function and its issues, and why we use Object.create() method instead?



Hello 🖐,

Factory functions in JS are any function that return an object. 

like this one:

```
function createPerson(firstName, lastName) {
    return {
        firstName: firstName,
        lastName: lastName,
        getFullName() {
            return firstName + ' ' + lastName;
        }
    }
}
const person1 = createPerson("Ahmad", "Mukahal");
const person1 = createPerson("john", "Deo");

```

and so on...



With the factory function, you create any number of the person objects you want without duplicating code.

What if we have one thousand persons? It will store a thousand objects in the memory heap! and this is not an efficient way.

Example: 
Each object will have a different address in the memory and every object will have the getFullName() method, Ooh no, I'm not DRY!!

This is why the Object.create() method comes into play.

The Object.create() method creates a new object using an existing object as the prototype of the new object:

```
const person = {
firstName : "John",
lastName: "Deo",
getFullName() {
            return firstName + ' ' + lastName;
        }
}
```
// Make prototype chain:
```
const me = Object.create(person);
```



so, now `me` object has all properties and methods in person object, and it can hold its own props and methods and override props and methods as you want like this:


```
console.log(me.firstName) // John
me.firstName = "Ahmad";
me.lastName = "Mukahal";
console.log(me.firstName) // Ahmad
```


What efficient is that !!

Hopefully enjoyed reading.

Ahmad Mukahal 🌹
You are visitor number...
Tags: javascript, aws, python
Published: 2022-01-13 18:28:31

The visitor counter is working! After some time off for the holidays I got back to banging my head against the 403 errors I was getting when my site called the API. The Lambda function worked when I tested it in Lambda and returned the incremented count number. I had the correct CORS headers set up so it wasn't a CORS issue as far as I could tell.

I followed the [AWS troubleshooting for 403 errors](https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-troubleshoot-403-forbidden/) and I could curl OPTIONS and get a valid preflight response but not GET or POST.

To refresh my memory on the whole process I decided to start from the beginning and set up a new Lambda function and API with the intent to figure out what I did wrong with my existing setup.

The new Lambda function worked just as before since it was the exact same code. My first API was a REST API so for this version I chose an HTTP API. AWS does more of the setup work for you with this version but it eliminates some potential for mistakes on my end.

The new API created a new IAM role which I had to grant access to Lambda and after that it worked! I could call the invoke URL and get the count instead of an error!

I updated the URL in my javascript for the resume site and pushed the changes. Loaded up the site again and there it was: "You are visitor 1".
how to check Ubuntu version
Published: 2022-01-14 13:34:11

Below we can find some tips on how to check Ubuntu version you are currently running. 

The first place to look for Ubuntu version is to look inside ​​/etc/issue​​ file. From terminal run command:

**$ cat /etc/issue
**Ubuntu Xenial Xerus \n \l

To obtain a Ubuntu release number check content of /etc/lsb-release file:

## $ cat /etc/lsb-release 

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus



Additional information regarding Ubuntu version can be found within ​​/etc/os-release​​:

## $ cat /etc/os-release 

NAME="Ubuntu"
VERSION="16.04 (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

Furthermore, the following command will provide you with a neat output of your current Ubuntu version:

## $ lsb_release -da

No LSB modules are available.
Distributor ID: Ubuntu
Description:  Ubuntu Xenial Xerus (development branch)
Release:  16.04
Codename: xenial




[check Linux version](https://www.howtouselinux.com/post/4-ways-to-check-linux-version)
[check ip address in Linux](https://www.howtouselinux.com/post/check-ip-address-in-linux)
What is the best-kept secret of GraphQL?
Tags: graphql, opensource, microservices
Published: 2022-01-14 13:33:39

Hi there!

Looking for a major GraphQL skills upgrade?

The GraphQL Wroclaw Meetup Team would like to invite you to join our online event on January 18 at 7 PM (GMT +1). 

On the night you’ll hear from Gerard Sans, Roy Derks and Vignesh T.V. 

We’ll be talking about why GraphQL is perfect for microservices and why it plays a major role in building the next generation of the web. And finally, we’ll explore a secret API design pattern… 

Sign up to the meetup and discover more - https://www.meetup.com/GraphQL-Wroclaw/events/282674485/
Get the values from the "GET" parameters of URL Using JavaScript
Tags: javascript, programming, tutorial, tricks
Published: 2022-01-14 13:19:45

If you want to Use JavaScript by Default feature 
Visit MDN :- https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams

{% youtube xeWPMVeIC4I %}

```javascript
let url = new URLSearchParams(location.href);//Let Window URL :- https://createevminutes.sh20raj.repl.co/shorts/#?collection=ryQCmre&id=1
url.get('id'); // 1
```

Like we have URL `http://www.example.com/t.html?a=1&b=3&c=m`
and we want to get the value assigned to `a` i.e. `1` then when we will call `getParameterByName('a')` that will return `1`

```javascript
function getParameterByName(name, url = window.location.href) {
    name = name.replace(/[\[\]]/g, '\\$&');
    var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
        results = regex.exec(url);
    if (!results) return null;
    if (!results[2]) return '';
    return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
```
## Alternative Inbuilt JavaScript Function

```javascript
var url_string = "http://www.example.com/t.html?a=1&b=3&c=m2-m3-m4-m5"; //window.location.href
var url = new URL(url_string);
var c = url.searchParams.get("c");
console.log(c);
```

## or

```javascript
function getparam(param,url){
if(!url) url = window.location.href;
let urlParams = new URL(url);
return urlParams.searchParams.get(param);
}
```
## Minified and Fastest Version of the Function

```javascript
function getparam(a,e){return e||(e=window.location.href),new URL(e).searchParams.get(a)}
```
Moving to Germany
Tags: career
Published: 2022-01-14 13:00:26

If you follow me, you know I have worked as a consultant for the last year. I have decided to take the next step in my career and move to Hamburg this week.

It was a difficult choice, and I wanted to stay in india and grow with the community; the Indian tech community will always have a special place in my heart. I became GDE; you all voted me to be the First GitHub star from India and gave me lots of love.

Some personal and professional decisions led to this.
* Better community outreach: Being in Europe will give me access to a broad community, as the timezone in india sometimes affects the participation in many conferences and meetups.

* My future ambitions: It is not a secret that I want to work as a Developer Advocate one day. Last year, I got a few calls, but many discussions due to salary and location expectations didn't go ahead.

I will not miss the Indian community at all, I will keep rooting for you all, and if you need any help from me, I am just a DM away. I was lucky to meet a few of you before moving. 

Six years ago, I came to Pune and got everything I came looking for in this City: a better life for my family, money, and peaceful life. Wish us that we get the same thing in a new country as we start a new chapter of our life.
ATM System Diagrams
Tags: design, oop, programming, uml
Published: 2022-01-14 12:47:28


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/crboepa95qgikwqd0eo5.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxt2letemnnf50atqr5t.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebri6c9yvgysoev02lsq.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/94jlqjzm40qll2ejbdxt.png)
How To Undo Unstaged Changes In Git Working Directory
Tags: git, github, howto, beginners
Published: 2022-01-14 12:40:23

Git version controlling system lets you discard and undo mistakes that happen in several stages such as “working directory”, “stage/index”, “history” and “remote”. In this question, we are going to discard and undo changes in the working directory. In other words, discard the changes that are not yet staged in the repository. If you need to discard staged changes, refer to [this question](http://laravel.test/questions/how-to-undo-staged-indexed-changes-in-git).

First, initiate a local Git repository with the `git init` command or use an existing repository that you have.

```
git init
```

## Clean Newly Created Unstaged Files

Create a couple of sample files and add some content to them. If you need, you can use the following command for that. It will create a file called `file.txt` and will add “Test Content” to it. Repeat the command a few times with different file names to create a few files.

```
echo "Test Content" > file.txt
```

Now we call these files are “untracked”, “unstaged” and in the “working directory”. You can confirm it by running the `git status` command.

```
git status
```

Let's say, you just accidentally created these files and now want to remove them all. We can easily undo such situations quickly with the `git clean -df` command. It will discard all the newly created files and directories in the working directory.

```
git clean -df
```

If you only need to remove some specific files, you can mention them like this.

```
git clean -df file1.txt file2.txt
```

After that, you can use the `git status` to check whether everything is cleaned and in its original state.

## Discard Unstaged Changes Of Existing Files

Let's say, this time you have changed some committed files in the repository and now need to undo those changes. For the demonstration, again create some sample files (you may use the earlier mentioned command to create files). Stage them using the `git add .` command.

```
git add .
```

Commit the files using the `git commit` command. We are using the `-m` to mention the commit message.

```
git commit -m "Add new files"
```

Now change some content in these committed files. Then run the `git status` to confirm whether there are modified files. After that, run the following command to clean and undo all the changes you made to files.

```
git checkout -- .
```

If you only need to discard some specific files, you can mention them like this.

```
git checkout -- file1.txt file2.txt
```

Alternatively, you can use the `git reset` command with `--hard` as well. It will discard and clean both staged and unstaged modifications of **existing** files in the repository.

```
git reset --hard
```

Feel free to visit [devtonight.com](https://devtonight.com?utm_source=dev&utm_medium=questions&utm_campaign=how-to-undo-unstaged-changes-in-git-working-directory) for more related content.
Fix Hp Printer Is Offline using IP Address Manually
Published: 2022-01-14 12:36:55

Hp printers are one of the best printers used widely by users. But, a common error that the HP printer is offline is witnessed by users globally. There are various methods to fix the error. Thus, here, we will discuss one of the popular methods that are to connect your hp printer through IP Address manually. 
View Source- https://lifesspace.com/read-blog/34171
how become an expert trader with backtest your skill(strategies) in the past on trading view?(introducing PTV)
Tags: opensource, githunt, programming, python
Published: 2022-01-14 12:36:29

Demo accounts became widespread in the twenty-first century, along with online trading. They are marketed to customers as a way for a customer to test a platform’s user experience and features before committing their own money to these investments or paying the platform trading commissions. 

# Learn before trade
if you want backtest your skills in stock market what do you do? 

if you were in the past what did you do ? what position did you enter? 
you need to repeat the candles untill you can do a good trade.

# introduce PTV (a trading view widget)
if you are familiar with trading view platform , you must know it has a feature call Bar Reply , 
[what is bar reply?](https://www.tradingview.com/support/solutions/43000474024-how-do-i-turn-bar-replay-on/)

for simulate demo trading in the past you can use PTV 
trading view does not have this feature and i decided to implement this feature by my self . 
for more information please checkout github repository of PTV
it's free and open source
check out this link:


[https://github.com/xibalbas/paper_trading_view.git](https://github.com/xibalbas/paper_trading_view.git)

don't forget to star the repo :))


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