teleren/devto huggingface dataset:
Don't fall for the "freeproxy" scam
Tags: webdev, scams
Published: 2020-12-09 14:01:17

Recently I was taking a look at my access logs for my website. Nothing too unusual, just the regular hacking attempts. I was reading them then I noticed this request.

```
185.220.100.243 - - [09/Dec/2020:07:17:37 -0500] "GET / HTTP/1.1" 200 2212 "https://freevpn.space/web-proxy/riverside.rocks" "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0"
```

First of all, a few things to note about this request, the first being that it is almost definitely a bot. Firefox 68 is old and nobody uses it anymore. Second, after a lookup of the IP on AbuseIPDB, it is from the Tor network:

![](https://riverside.rocks/assets/serve/production/app/5fd0d78692a78.png)

My first thought was, oh crap, my website is on some proxy list, this is bad. But after some more digging, it looks like this is a scam. I decided to follow the link in the referrer with cURL to get an idea of where it went.

![](https://riverside.rocks/assets/serve/production/app/5fd0d820cc66d.png)

It forwards the user to very shady looking website with what looks like an affiliate tag in the HTTP referrer.

![](https://riverside.rocks/assets/serve/production/app/5fd0d85b405d9.png)

This website then forwards you to ExpressVPN.com with the affiliate code. My best guess is that these scammers are exploiting ExpressVPN's affiliate program to make some easy cash by scarring webmasters. Stay safe folks!
Why should I use firebase firestore on my React Native app
Tags: reactnative, javascript, react
Published: 2020-12-09 13:56:37

Hi the developer world, today we'll answer a question, why should I use Firebase Firestore on my React Native app.
Firebase Firestore is a new feature of Firebase. It allows us to synchronize our data in real time through real-time auditors who will track any changes between our database and the application.
Firebase Firestore works as a collection and document. You can save a lot of data for example: url of our files (image, video, etc.), names of our users, or more, we can use it to create a messaging application that works in real time. The integration of Firebase Firestore is really very simple, no need to know much, the hardest part of the work is managed by firebase so we don't have much to do.
Next time we'll see how to integrate Firebase Firestore on our React Native app. 
Thank you for reading my article, subscribe and follow me on social networks.
How to copy a http request from the network tab to Postman
Tags: http, postman
Published: 2020-12-09 13:44:24

(In Chrome) Go to the network tab, right click on the request and then click on copy as curl.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/i2906a5jgyoumofkqjog.png)

Then import into Postman:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0bdybzhpdfwasmkc6idg.png)

Go to raw text:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p6zvhsw69bvtys8ht0kd.png)

Paste the curl, click on continue and then import
JAVA: Increment, Decrement operator
Tags: java
Published: 2020-12-09 13:42:06

Please go through [Java: theory of Operators, Precedence & Associativity
](https://dev.to/supriya2371997/java-theory-of-operators-precedence-associativity-11an) for other operators and basics of below-mentioned operators

Q1: Increment operator?
Q2: Decrement operator?
Q3: Facts?

**Increment operator:-**
-: used to increment a value by 1.
-: 2 varieties are available that are pre-increment and post-increment.
1. Pre-Increment: value is first used for calculating the result and then incremented
For example X=42
            y=++X
      step1: x=x+1 (x=42+1=43)
      step2: y=x (y=43)

2. Post-Increment: value is incremented and then calculated the result
For example X=42
            y=X++
      step1: y=x (y=42)
      step2: x=x+1 (x=42+1=43)

**Decrement operator:-**
-: used to decrement a value by 1.
-: 2 varieties available that are pre-decrement and post-decrement
1. Pre-Decrement: value is first used for calculating the result and then decremented
For example X=42
            y=--X
      step1: x=x-1 (x=42-1=41)
      step2: y=x (y=41)

2. Post-Decrement: value is decremented and then calculated the result
For example X=42
            y=X--
      step1: y=x (y=42)
      step2: x=x-1 (x=42-1=41)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9cpgk0taomao0mpevlg3.JPG)

**Facts:-**
F1. Nesting like ++(++a) is not allowed
   error: unexpected type

F2. Can be only used with variables.
   program.java:9: error: unexpected type
       a = 34++;
            ^
   required: variable

F3. Can't be used on final variables
   error: cannot assign a value to final variable a

F4. Can be only applied only on all primitive data types
   error: bad operand type boolean for unary operator '++'


**Please comment if you have any feedback or suggestions**
How to make your own CSS Framework - Part 1
Tags: css, html, webdev
Published: 2020-12-09 13:40:34



A couple of years ago, I made my very own CSS framework from scratch called [Sleek](https://sleek.arvindrs.com). Of course, no one used it, including me.

So I decided to write a series of article on how I went about making one starting from the planning, designing stage all the way to coding and documenting.

Here's a link to this series:

[How to make your own CSS Framework Part -1 : Introduction](https://www.arvindrs.com/how-to-make-your-own-css-framework-part-1/)

[How to make your own CSS Framework Part -2 : Planning](https://www.arvindrs.com/how-to-make-your-own-css-framework-part-2/)

[How to make your own CSS Framework Part -3 : Design](https://www.arvindrs.com/how-to-make-your-own-css-framework-part-3/)

The rest of the articles are coming up soon.
Fastlane tips - How to setup IntelliJ for Fastlane and Fastfile
Tags: fastlane, android, ios
Published: 2020-12-09 13:28:12

If you use [fastlane](https://fastlane.tools/) for your mobile environment and IntelliJ then you must be feeling the pain of opening your `fastlane/Fastfile` in IntelliJ and see all without syntax highlights or autocomplete? 

That's because it does not have `.rb` and so IntelliJ can't understand the language of the file, but there's one simple setup that will fix it:

1. Open
> Settings / File Types

2. Search for Ruby 
3. Click `+` and write `Fastfile`.

Example:
![Intellij Setup](https://dev-to-uploads.s3.amazonaws.com/i/9awejq1ky86a6m706mv5.png)

Thanks to [custom-file-types-in-intellij-idea](https://blog.jetbrains.com/idea/2010/09/custom-file-types-in-intellij-idea)
Important Interview Questions: Javascript Version - Part 1
Tags: javascript, webdev, codenewbie, 100daysofcode
Published: 2020-12-09 13:20:56

Here are some of the javascript questions asked in interviews.

## What is JavaScript?

Javascript is a scripting language that adds functionality to a web page for example javascript adds animations on clicking a button. JavaScript is also an Object-based Programming language.

## State the difference between javascript and java

Java | JavaScript
-|-
It is Object-Oriented Programming language | It is an Object-based Scripting language
Java applications can run in any virtual machine(JVM) or browser|JavaScript code used to run only in the browser, but now it can run on the server via Node.js
Supports multithreading|Does not support multithreading

## What are Javascript datatypes?

Following are the JavaScript Data types:

+ Number
+ String
+ Boolean
+ Arrays
+ Object
+ Undefined
+ Null

## What is the use of the isNaN function?

This function returns true when the argument passed is not a number.

## Between JavaScript and an ASP script, which is faster?

Javascript is a client-side language and does not require assistance from the web. On the other hand, ASP is a server side language and hence is slower than JavaScript. (For details on ASP check the [doccumentation](https://home.ubalt.edu/abento/452/asp/index.html).)

## What is Negative Infinity?

A number in JavaScript which is derived by dividing a negative number by zero is called Negative Infinity.

## Is it possible to break JavaScript Code into several lines?

In a string statement, a backslash can be given at the end of the 1st line to move the rest in the next line.

```javascript
doccument.write('First line. \Second line.')
```

And if you change to a new line when not within a string statement, then javaScript ignores the break in the line.

```javascript
const number =
40
```

## Which company developed JavaScript?

Netscape is a software company that developed JavaScript.

## What are undefined and undeclared variables?

**Undefined** occurs when a variable has been declared but no value is assigned to it. Undefined is not a keyword.

**Undeclared** occurs when we try to access a variable that is not defined using the `const`, `var` or `let` keyword.

```javascript
let undefinedVariable

console.log(undefinedVariable) // undefined
console.log(undeclaredVariable) // ReferenceError: undeclaredVariable is not defined
```

## Write the code for adding new elements dynamically?

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Dynamic elements</title> 
    <script type="text/javascript"> 
        function addNode() { 
            var newP = document.createElement("p"); 
            var textNode = document.createTextNode(" This is a new text node"); 
            newP.appendChild(textNode); 
            document.getElementById("oldP").appendChild(newP); 
        } 
    </script>
</head> 
<body> 
    <p id="oldP">firstP<p> 
</body> 
</html>
```
Consume Rest API With Go
Tags: go
Published: 2020-12-09 13:12:07

A few days ago I have to look at consuming API with GO from Ghost so here is what I learnt.  

A very simple example of how to consume API and print it as text to console. It's not much but it's good to start. 

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"os"
)

func main() {
	var endpoint = "http://your-addres.domain/api/endpoint"

	response, err := http.Get(endpoint)

	if err != nil {
		fmt.Print(err.Error())
		os.Exit(1)
	}

	responseData, err := ioutil.ReadAll(response.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(responseData))
}
```

Next, it will be good if I can return objects to use in my app instead of text. And go has to function for it called `unmarshall`. Unmarshalling JSON response need JSON module so I have to import `"encoding/json"`.

Another thing I need was struct in which will be my json respone parsed. Following syntax is example for Ghost API for posts.

```go
type Response struct {
	Posts []Post	`json: "posts"`
}

type Post struct {
	Id string		`json: "id"`
	Title string	`json: "title"`
	Slug string		`json: "slug"`
	Excerpt string	`json: "excerpt"`
	Html string		`json: "html"`
}
```

and define new variable in main function `var responseObject Response`

next i add unmarshall after response which will parse json string to my object syntax for it is as follows:

```go
json.Unmarshal(responseData, &responseObject)
```

Now you can go trough array of object.

```go
for _, post := range responseObject.Posts {
  fmt.Println("Id:", post.Id, "with title:", post.Title, "slug:", post.Slug)
}
```

Complete example is here:

```go
package main

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"os"
)

type Response struct {
	Posts []Post	`json: "posts"`
}

type Post struct {
	Id string		`json: "id"`
	Title string	`json: "title"`
	Slug string		`json: "slug"`
	Excerpt string	`json: "excerpt"`
	Html string		`json: "html"`
}

func main() {
	var endpoint = "http://your-addres.domain/api/endpoint"
	var responseObject Response

	response, err := http.Get(endpoint)

	if err != nil {
		fmt.Print(err.Error())
		os.Exit(1)
	}

	responseData, err := ioutil.ReadAll(response.Body)
	if err != nil {
		log.Fatal(err)
	}
	// fmt.Println(string(responseData))

	json.Unmarshal(responseData, &responseObject)

	for _, post := range responseObject.Posts {
		fmt.Println("Id:", post.Id, "with title:", post.Title, "slug:", post.Slug)
	}
}
```

Thank You for reading.

<span>Photo by <a href="https://unsplash.com/@nasa?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">NASA</a> on <a href="https://unsplash.com/s/photos/data?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Daily Developer Jokes - Wednesday, Dec 9, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-12-09 13:00:24

---
title: "Daily Developer Jokes - Wednesday, Dec 9, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20Dec%209%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258e0be565.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ How did pirates collaborate before computers ?

___A:___ Pier to pier networking.
 -->
Simple Dark-Light theme with VanillaJs
Tags: javascript, webdev, html, css
Published: 2020-12-09 12:59:34

Dark mode designs and functionality that enable to toggle between Dark and Light theme is trending UI/UX Design🔥. So, here's the guide to create Simple dark-light toggle.
I wanted this to be simple so I didn't create any fancy toggle switch just use simple button.
<small>Codepen at end.🤖</small>

### Let's Start with HTML  
I'm using list for navbar elements, so
`<li class="nav-item" id="toggle">🌞</li>`

and we are done with HTML. let's do CSS

### CSS
```
// by default dark theme

:root {
    --bg-color: #171923;
    --bg-light: #232535;
    --font-color: #c5cddb;
    --font-light: #ffffff;
}

// light theme colors

.lightMode {
  --bg-color: #E8E6DC;
  --bg-light: #DCDACA;
  --font-color: #3D3D3D;
  --font-light: #202020;
}
```
`lightMode` is class which would be added to body using js.

### Final Part - Javascript

```
const toggle = document.querySelector("#toggle");
toggle.addEventListener("click", modeSwitch);

let isLight = true;

function modeSwitch() {
  isLight = !isLight;
  isLight ? toggle.innerText = "🌞" : toggle.innerText = "🌚";
  var rootElement = document.body;
  rootElement.classList.toggle("lightMode");
}
```
<b>What is toggle?</b>
- toggle is method of `DOMTokenList() interface.`
- It remove token from token list and return false.
- If token doesn't exist, then it add token and return true.

<b>What is happening?</b>

When we click on toggle button, event listener respond to it and call `modeSwitch()` function. In `modeSwitch()` function, class `lightMode` is added to body activating `lightMode` color schema. 

***************
{% codepen https://codepen.io/vaishnav21/pen/YzGGZYe default-tab=result %}
Contribution @casiimir

There are different ways to crate dark-light mode toggle. This one simple way I found out to explain how it work. 
Love to here your suggestions and feedback🤩.
Don't lose your eyesight as a Developer (5 Tips to Reduce Eye Strain)
Tags: webdev, beginners, productivity, programming
Published: 2020-12-09 12:57:49

Eye strain is something overlooked for those of us in the field, yet it affects many of us.

I wanted to take time to remind us that its an important topic, as usually its one we dont think about until its too late and the damage is done.

Making sure that you look after your eyes will benefit you now and in the long run. Vision will get worse if you don't put effort into taking care of it.

Here are the 5 Tips I recommend to reduce eye strain:
* 20/20/20 rule, every 20 mins, spend at least 20 seconds looking at something 20 feet away
* Reduce the brightness of your monitor
* Use a lamp or light source when working at night
* Wear glasses that blue harmful blue light
* Use dark mode when possible for viewing sites

If you want to see more, check out the video below where I cover this topic and my experiences of it.

{% youtube UccYkf-bawc %}

## Follow and support me: 
Special thanks if you subscribe to my channel :)
* [🎞️ Youtube](https://www.youtube.com/channel/UCvM5YYWwfLwpcQgbRr68JLQ?sub_confirmation=1)
* [🐦 Twitter](https://twitter.com/adrian_twarog)

## Want to see more:
I will try to post new great content every day. Here are the latest items:
* [VS Code in Virtual Reality](https://dev.to/adriantwarog/vs-code-in-virtual-reality-4ja2)
* [VS Code on my Phone](https://dev.to/adriantwarog/vs-code-on-my-phone-how-i-did-it-1fme)
* [40 Amazing Developers You Should Follow On Youtube](https://dev.to/adriantwarog/40-amazing-developers-you-should-follow-on-youtube-5bhh)
* [Enhance UI - Design for Developers](https://dev.to/adriantwarog/enhancing-ui-design-for-developers-3peg)
Delete Trello Cards using Postman
Tags: testing, beginners, tutorial, postman
Published: 2020-12-09 12:35:49

In the last few posts, we learned how to create a new card using the POST request, how to fetch a card using the GET request, and how to update the card using the PUT request. In this post, we will wrap it all up by deleting the card using the DELETE request.

#### **Postman DELETE Request**
Working with DELETE requests is always a bit tricky as unlike other HTTP methods you cannot make multiple same requests as that might throw an error of “resource not found”. Let’s take a look at an example –

In the image below, I am deleting an existing Trello card and I got a 200 OK response confirming that the data was deleted successfully.
![img alt](https://automationbro.com/wp-content/uploads/2020/12/image-1.png)

When attempting to hit the same request again, I got a 404 Not Found error (as seen in the image below).
![img alt](https://automationbro.com/wp-content/uploads/2020/12/image-2.png)

Therefore, when planning on writing your API tests, you need to structure your data in such a way where you get a new resource every time when you are deleting a resource (we will look into this in the upcoming posts).

---

### **Check out the video below to learn more about how to work with the DELETE request in Postman –**
{% youtube bqQ7kD6rpKY %}

---

#### To learn about API Test Automation using JavaScript, check out my free tutorial series here –
[JavaScript API Test Automation Tutorial Series](https://www.youtube.com/watch?v=ZSVw3TyZur4&list=PL6AdzyjjD5HDR2kNRU2dA1C8ydXRAaaBV)

---

I hope this video helped you out, let me know if you have any questions in the comments below!

Happy testing! 

...

📧 Subscribe to my [mailing list](https://automationbro.com/mailing-list) to get access to more content like this 
👍 Follow @automationbro on Twitter for the latest updates
Has anyone started a study group?
Tags: watercooler
Published: 2020-12-09 12:34:10

Some years ago, I've been in an economics study group for a couple of months, and I loved it, even if it is not something I am good at, I could learn a lot from the more serious people there.

Now I consider myself to be in that mid-level developer limbo, and I really like helping new people to get in the right track, so I thought I should start a study group where I could give people advice and learn new things.

Has any of you ever did that? Do you have any tips for how to go about this?
CSS Scan Pro 2.0 - A re-imagined Devtools for web design.
Tags: showdev
Published: 2020-12-09 12:28:25

---
title: CSS Scan Pro 2.0 - A re-imagined Devtools for web design.
published: true
description: CSS Scan Pro is a browser extension that makes it radically easy to get the looks of your favorite websites. Hover over any element, and get its CSS, colors, assets, animations, font, and dimensions, instantly. Copy, export, or refine it with an intuitive CSS editor, without writing code.
tags: showdev
cover_image: https://cssscanpro.com/img/cover2.png
---

👋 Hi Dev.to! :)

🎯 I launched [CSS Scan Pro](https://cssscanpro.com) 1 year ago with the vision of re-imagining the Devtools for web design.

🚀 Since then, it has received lots of improvements and new features - and it’s now the definitive browser extension to work with web design :)

{% youtube EpUPBbzeAr4 %}

**✨ What’s New in CSS Scan Pro 2.0:**
- Visual Editor: change the CSS of any element visually and interactively
- Copy the HTML and CSS of all the element's children - instead of just copying the selected element
- Save an element as a file
- Live-edit the text of any element
- Scan HTML attributes (src="", value="", etc)
- Live-edit every CSS: including all pseudo-classes, all pseudo-elements, and @keyframes as well!
- Chrome and Firefox Devtools integration: you can use CSS Scan Pro inside your Devtools
- Option to generate and copy unique CSS selectors
- Save all assets from a website with 1 click
- A color picker to easily change colors + change color syntax + gets tints and shades of the selected color
- Convert relative URLs to absolute
- Remove any website element with a click
- A new copy button that sits inside pinned CSS windows
- A new ruler mode: freestyle - to measure freely
- Performance boost
- UI improvements
- Export element to CodePen
- A new mode to select elements
- CSS inspection algorithm improvements (faster and better)
- Auto measurement units conversion on Visual Editor
- Easily search for a font on Google
- Tailwind support

💰 [CSS Scan Pro 2.0](https://cssscanpro.com) is a paid extension. Along with [CSS Scan](https://getcssscan.com) and [toast.log](https://toastlog.com), this is my full-time work, so you'll always receive updates! 🙌

💖 This is a free and automatic update for previous CSS Scan Pro 1.0 customers.

🎁 Try yourself a free demo here: [https://cssscanpro.com](https://cssscanpro.com)

🙏 This is a work that has taken me 2 years so far, so I’m excited to share with you and genuinely interested in hearing what you think about it.

💌 Thanks to everyone that already bought it and supported my work!

If you have any ideas or suggestions, I'm all ears.
Two-minute read newsletter to help Google Summer of Code aspirants
Tags: gsoc, google, internship, job
Published: 2020-12-09 12:25:59

On October 26, 2020, Google announced Google Summer of Code 2021. 🎉

Being a GSoCer with [GNOME Foundation](https://gnome.org) and now a part of their Web Team, I get a lot of requests related to GSoC preparation, how to get started, how to approach GSoC mentors, etc. especially during this part of the year.

So, I have decided to start a newsletter ✉️, Insight, where I will be sending short-form posts every 2nd day to help you prepare for the big venture. I will also bring mentors and former GSoC students to share their views and experiences with GSoC and how GSoC has helped them become who they are. You will have access to top-quality content and guidance throughout the GSoC season.

You can sign up for the newsletter 👇
https://www.ravsam.in/newsletter/sign-up/