teleren/devto huggingface dataset:
What's your privacy-focused / ethical stack?
Tags: privacy, webdev, ethical, devops
Published: 2020-06-15 05:28:28

And what are the total **costs** (or **risks**) that you have to pay? Self-hosted? Also, would you donate anyway? (I do worry about sustainability of service providers)

What is your monthly cost? And what about learning curve, in your opinion?

(And what about social marketing / make your website popular?)

Currently I have

- [Plausible analytics](https://plausible.io/), currently in trial period; but 5 USD / mo is not much
- [Remark42 commenting engine](https://github.com/umputun/remark42/pull/723), free and self-hosted, but I Patreon'd.
- [Brave browser](https://brave.com/), which is based on Google's Chromium anyway
  - Have [problem with Firebase Auth, in particular due to localStorage not accessible.](https://community.brave.com/t/firebase-auth-not-working-due-to-localstorage/134551), but not in Google Chrome or other browsers.

Concerning about

- Hosting / VPS. DigitalOcean and Linode are very popularly recommended, but a while ago, I asked on [Kuzzle](https://kuzzle.io/), and they recommended [scaleway](https://www.scaleway.com/en/pricing/).
  - I currently use Google Cloud Platform free credits, for VPS. Free credits last for 1 year. I might move after one year.
  - Not to mention that [self-hosting does have learning curve](https://dev.to/patarapolw/how-to-deploy-stateful-container-on-digitalocean-42ci)

Learning curve

- I have not yet been successful in implementing Auth / API protection without relying on Firebase Auth / localStorage. Might be nice if I move localStorage into cookies.

Looking for

- Auth. Seen Okta, but concerned about the price.
- Storage, that I can use programmatically in both adding new data and retrieval.
- After all, support, in case I cannot solve it myself.

I guess my costs is currently around 15 USD / mo, while I actually earn zero money.

In the end, I think sustainability is the most important, if you wish to serve the general public.

BTW, what do you think about many donations (whether online or offline, at least in my experience) _prefer to be monthly / yearly, rather than once_?
How to change Java Version/JAVA_HOME for Ant?
Tags: java, todayilearned
Published: 2020-06-15 05:17:31

## Want to change Java Version/JAVA_HOME for Ant builds?

1. Open `~/.antrc` file by running `vim ~/.antrc`
2. Add `JAVACMD=<NEW_JAVA_HOME>/bin/java` and save

> The Ant wrapper script for Unix will source (read and evaluate) the file ~/.antrc before it does anything.
On Windows, the Ant wrapper batch-file invokes %HOME%\antrc_pre.bat at the start and %HOME%\antrc_post.bat at the end. 
You can use these files, for example, to set/unset environment variables that should only be visible during the execution of Ant.

>The wrapper scripts use the following environment variables (if set):
>* JAVACMD—full path of the Java executable. Use this to invoke a different JVM than JAVA_HOME/bin/java(.exe).
>* ANT_OPTS—command-line arguments that should be passed to the JVM. For example, you can define system properties or set the maximum Java heap size here.
>* ANT_ARGS—Ant command-line arguments. For example, set ANT_ARGS to point to a different logger, include a listener, and to include the `-find` flag.
    Note: If you include -find in ANT_ARGS, you should include the name of the build file to find, even if the file is called build.xml.

Source: https://ant.apache.org/manual/running.html

Check out my website at: https://darshit.dev
Tech Talks that have influenced your professional career!
Tags: techtalks, healthydebate, career, discuss
Published: 2020-06-15 05:03:57

Tech conferences are one of the best places for learning, sharing, and improving your professional career. Now that we are in a time of staying at home let's remember the best talks at conferences that you've seen or watch. I will post mine.

All the Little Things by Sandi Metz
https://youtu.be/8bZh5LMaSmE
Setup a personal website/blog with Github pages
Tags: webdev
Published: 2020-06-15 04:50:27

Nowadays website for personal and portfolio became quite common. Its became a digital identity in the digital world. So getting up a personal website its a not big deal when we have numerous ready-made templates available over the internet with free of cost. 

In this article, we are using [Github pages](https://pages.github.com/)   to build a static website.  Github pages provide us free hosting and no need to pay anything. And it is a free code repository for private and public repositories.

All you need to do is get the website template based on the available free themes and host them on Github.

For this article, I am using this [template](https://startbootstrap.com/themes/clean-blog/) which is free.  You can select any kind of template from the site. 

[Download ](https://github.com/BlackrockDigital/startbootstrap-clean-blog/archive/gh-pages.zip) template to your local system. This contains all the HTML code necessary for a website. This all code is static which means there is no server-side code like PHP etc.

Now open an account in Github if not there earlier.

Then create a public repository with name as  **githubusername.github.io**

Now extract the ZIP file from the downloaded theme. 

Upload all the code in that ZIP file folder to the created public repository. (Drag all the content of all the files into the Github repository ).

Now go to the repository and check index file is available.

Now click on Settings tab of the repository.  
Scroll down to the GitHub pages section and selects master from the dropdown Source . 
After you selected master from the dropdown you will find the link above , which is the link for your website. 
Its something like   **https://github_username.github.io/**. For instance ., if my username is nyalla then my website will be https://nyalla.github.io

If you click on that link you can navigate to the website which you created just now with Github pages and free themes. 

To customize it further you can edit the HTML files and keep your names and further modifications.

We can also directly generate the websites based on the Jekyll themes from the GitHub pages section.
Basic Git Commands 
Tags: git, gitcommands
Published: 2020-06-15 04:22:47

**If you want to use git to it's full potential, you must know about Git commands.**

Why?

Can you drive a car if it's does not have any fuel ?
No

Fuel is an essential element for car. 

Similarly, [Git commands](https://acompiler.com/git-commands) are essentials. You have to master this skill at some stage, especially if you are a software developer.

Git is popular,[Microsoft uses git](https://docs.microsoft.com/en-us/azure/devops/learn/devops-at-microsoft/use-git-microsoft). So there is no doubt why its important.

And today I will show you five basic git commands which will help you to a kick start your git journey.

####git --version
####git add <filename>
####git add -A
####git status
####git commit -m “your commit message”

So lets dive in more details 

###git --version
You can check your current version if git with git --version command

![Alt Check git version control with command line](https://acompiler.com/wp-content/uploads/2020/06/check-git-version-with-command-line.png)

With this you can make sure that you are not using the old version.

###git add <filename>

Git add command will use to add new files to the staging area.


With the gid add <filename> command you can add single file to the staging area

###git add -A

And with git add -A command you can add multiple files into the staging area.

Here -A is a switch or option and  A stands for all.

Also you can use git add . command, to add all files into the git staging area.

###git status

It is one of the important command. You can check your current branch and list of files which are required to commit 

###git commit -m “your commit message”

![Alt git commit](https://acompiler.com/wp-content/uploads/2020/06/Git-Commit-768x768.png)


Once you are ready to commit your changes it's time to commit. 

Here -m option stand for your message. You want to commit with some message so you can refer that later.

Also in case if you want yo update your last commit message you can use 

git commit --amend -m "your updated commit message"

So basically, git commit will add your changes to git repository from staging.

###What is git staging area

Pictures speak louder than words.

Here is the one

![Alt git staging area](https://acompiler.com/wp-content/uploads/2020/06/Git-Staging-Area.png)


Basically staging is a middle step between your working directory and repository.


I have a complete list and a bonus cheat sheet for you to download here.

Hope it's easy for your to understand these git commands.

Let me know in by comment about your git journey.
Mi primer post
Tags: español, spanish, desarrolloweb
Published: 2020-06-15 04:20:52

---
title: Mi primer post
published: true
description: !Este post es solo para decir hola!
tags: español, spanish, desarrolloWeb
cover_image: https://images.unsplash.com/photo-1518105779142-d975f22f1b0a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80
---

Hola, este post es pensado para la comunidad en español, la mayoría de información la encontramos en inglés, que es un muro invisible que dificulta a los que pertenecemos a la comunidad de habla hispana el correcto entendimiento de los temas.

Es una realidad que la información de primera mano se encuentra en Inglés, pero con el apoyo de todos podemos hacer más accesible los avances a todos nuestros hermanos hispanohablantes.

Si es de tu interés algún tema respecto a el desarrollo web, comenta por favor para hacer un post con ese tema.

Muchas gracias por tu atención.
NahamCon CTF 2020 - Localghost
Tags: security, ctf, flag, nahamseccon
Published: 2020-06-14 22:26:17

- Resource: NahamCon CTF 2020
- CTF Name: Localghost
- Points: 75
- Category: Web

Note::: This CTF is expired and no longer live so flags will be posted.



## Flag1
 __Hint__ 
 1. BooOooOooOOoo! This spooOoOooky client-side cooOoOode sure is scary! What spoOoOoOoky secrets does he have in stooOoOoOore??
 2. Note, this flag is not in the usual format.


 __Acquired By:__
### Step 1. General Look Around
When first looking at this page nothing really seems evident. If you scroll down then more ghosts are added to the page almost endlessly and the script doesn't appear helpful either.![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ekacsy5s7lsw435nvwyc.png) 
There is an odd note in the Console Log that I haven't seen before... 
`Intercom 
Array [ "Intercom" ]
 undefined`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1mqzhutuyebsx62k2bf0.png)
This hint has to do with the first hint about client side code.

Client side code is code that runs in your browser, generally JavaScript, that will be "processed on the client machine and the HTML page will NOT perform a PostBack to the web-server. Traditionally, client-side scripting is used for page navigation, data validation and formatting." (1)






### Step 2. How is this information helpful?
Now that I know that it is dealing with client side code I can dive into looking up information about Intercom and how it works. 

** EDIT ** Turns out this was a rabbit hole.
As I was researching Intercom I started looking at the Javascript code that was being loaded and saw a bunch of Hex code in the jquery.jscroll2.js file. ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j6u4ws1o8bpi0inh9xrx.png)




 

### Step 3. Decode the Hex
Now that I have a bunch of Hex I simply take it all over to a decoder and let it decode it for me.![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/g4kj6gqsbepn0eb4bfaw.png)




### Step 4. The Flag
Now that the flag is there I can see that it is being loaded in localStoreage by the code just after the flag that is `"setItem","localStorage"`. Now that I know it's in localStorage I am not going to waste any time trying to decode it but instead see what's in the LocalStorage and there it is. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/anryx3ba3tgbiby598v8.png)




## Learned
This flag showed me some interesting stuff about Intercom but really it taught me to check out some of the more obvious places first. LocalStorage and SessionStorage and fairly common places to store user data.






<hr>

Happy Hacking
![](https://media.giphy.com/media/l3vRmVv5P01I5NDAA/giphy.gif)

### Resources
1. https://www.seguetech.com/client-side-scripting-performance/


###### Please Note: that I am still learning and if something that I have stated is incorrect please let me know. I would love to learn more about what I may not understand fully.
How to get notified when one of your WhatsApp contact is online
Tags: whatsapp, tips
Published: 2020-06-15 15:50:25

---
title: How to get notified when one of your WhatsApp contact is online
published: true
date: 2020-06-15 04:16:22 UTC
tags: whatsapp, tips
canonical_url: https://www.ma-no.org/en/news-and-events/how-to-get-notified-when-one-of-your-whatsapp-contact-is-online
---

Privacy is one of the most important aspects among most users of the popular Facebook messaging application. So much so, that many settings have been included in WhatsApp itself to offer users the ability to display their profile picture, status, info, or the time they last connected to the application only to whomever they want. But of course, there are other features of WhatsApp that also have to do with user privacy such as knowing if someone has read a message or is currently online. Well, here's how to get alerted when one of your WhatsApp contacts is online.The truth… !


Read on [📖!](https://www.ma-no.org/en/news-and-events/how-to-get-notified-when-one-of-your-whatsapp-contact-is-online)
👩🏼‍💻 Docker for Beginners - By Beginner 👨🏼‍💻
Tags: docker, dockerbeginner
Published: 2020-06-15 04:08:54

---
title: 👩🏼‍💻 Docker for Beginners - By Beginner 👨🏼‍💻
published: true
description: 🐳 Docker is the platform for developers, test, deploy, and run applications with containers. As a full-stack developer or backend developer knowing this technology can lead to several advantages 🐋.
tags: docker, dockerbeginner
cover_image: https://images.unsplash.com/photo-1529603992250-a55acb77d146?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80
---

Hello world,

I have been learning Docker 🐳. I wanted to share some basics command to get started as a developer, I hope you know the basics about What is docker, containers or virtualization?

I am using Windows 10 2004 Update 🐱‍👓, this update comes with WSL2. In this tutorial, I am using Ubuntu on WSL2.

### Information ℹ 

#### Show all commands

```
$ docker
```
![Docker](https://dev-to-uploads.s3.amazonaws.com/i/aezke1h46qdasyv95jfw.jpg)

#### Docker version

```
$ docker version
```

#### Show information like number of containers
```
$ docker info
```

### Containers ⛴

#### Create and run a container in foreground
```
docker container run -it -p 80:80 nginx
```
![Run a container in foreground](https://dev-to-uploads.s3.amazonaws.com/i/9sef0zm5makfn2sv1rfe.jpg)

#### Create and run a container in background
```
$ docker container run -d -p 80:80 nginx
```
![Run in background](https://dev-to-uploads.s3.amazonaws.com/i/9qw8s0h79cqhv4csjs3h.jpg)

##### Running container
![Running](https://dev-to-uploads.s3.amazonaws.com/i/rtih87z18jfmdmzdkf6j.jpg)

#### Naming containers
```
$ docker container run -d -p 80:80 --name nginx-proxy nginx
```

#### List running containers
```
$ docker container ls
```
![Running all containers](https://dev-to-uploads.s3.amazonaws.com/i/k6s8h496zo3aa2u4nm6j.jpg)

#### List all containers
```
$ docker container ls -a
```

#### Stop container
```
$ docker container stop [ID]
```
![Stop container](https://dev-to-uploads.s3.amazonaws.com/i/d5y9ua9sn0yjw84gebf6.jpg)

#### Stop all containers
```
$ docker stop $(docker ps -aq)
```
#### Remove container (Can't remove running container)
```
$ docker container rm [ID]
```

#### Remove running container
```
$ docker container rm -f [ID]
```

#### Remove multiple containers
```
$ docker container rm [ID] [ID] [ID]
```

#### Remove all containers
```
$ docker rm $(docker ps -aq)
```

### Images 📸
#### List the all images we have downloaded
```
$ docker images
```
![All images](https://dev-to-uploads.s3.amazonaws.com/i/dojnvqjx236szaocu7ll.jpg)

#### Pull new image from docker hub
```
$ docker pull [IMAGE_NAME]
```
![Pull new image](https://dev-to-uploads.s3.amazonaws.com/i/dojnvqjx236szaocu7ll.jpg)

#### Remove image or images
```
$ docker image rm [IMAGE]
$ docker rmi $(docker images -a -q)
```

Note: Any suggestion?

## Happy coding

#### Looking for an entry-level job as Backend Developer or Full Stack Web Developer 

http://pprathameshmore.github.io/
Just Finished My Portfolio Website Using Gatsby.js and my Genetic Algorithm Library, Genie.js
Tags: showdev, javascript
Published: 2020-06-15 03:57:49

Hi everyone!

This is my first post here. I want to share the portfolio I created using Gatsby, with some flourishing using my genetic algorithm library, Genie.js (source [here](https://github.com/adrianmarkperea/genie), and demo [here](https://genie-phrase-guesser.netlify.app/)).

You can check it out at the following link: [https://adrianperea.dev](https://adrianperea.dev)

I never really fancied myself as a web developer, but proud that I made it this far. Didn't realize beforehand that CSS would've taken most of my time.

Hope to hear what you guys think!

Cheers,
Adrian
JS Date vs Moment.js:  A Really Simple Comparison
Published: 2020-06-15 03:56:02

Here's an exercise I wanted to share as part of my own efforts in learning out loud.

As part of a React project I'm working on, I needed to create and array containing the dates for the current month.  

While composing the function I realized I would need to perform arithmetic on date objects.  I could use the JS Date object directly, or I could make use of the methods provided by the **moment.js** library.

## Moment.js

Implementing my function using the addon library allows use of the **add** method to increment a date.  In the function below, **day** is a moment.js object.

```javascript
function calendarDays(day) {
    const days = []
    day.date(1)
    day.add(-(day.day() + 1), "d")
    for (let i = 1; i <= 42; i++) {
        day.add(1, "d")
        days[i] = { day: day.date(), month: day.month() }
    }
    return days
}
```

The function is called from the component and the array rendered using using the following code:
```javascript
{calendarDays(moment()).map(day => <span key={day.day} className="calendar-day">{day.day}</span>)}
```
The React profiler tool shows that the component renders in 2.2ms.
![React Profiler for Moment.js Implementation](https://dev-to-uploads.s3.amazonaws.com/i/027mk3p2z6z5pa94l93z.png)

## Javascript Object
```javascript
function calendarDaysJS(day) {
    const days = []
    day.setDate(1)
    day.setDate(1 - day.getDay())
    for (let i = 1; i <= 42; i++) {
        days[i] = { day: day.getDate(), month: day.getMonth() }
        day.setDate(day.getDate() + 1)
    }
    return days
}
```
```javascript
{calendarDaysJS(new Date()).map(day => <span key={day.day} className="calendar-day">{day.day}</span>)}
```
The React profiler reveals that the component renders in 1.3ms. That's a 40% improvement in efficiency.  
![React Profiler for Date Object Implementation](https://dev-to-uploads.s3.amazonaws.com/i/vq5zvdxhbs633420birm.png)

## Conclusion
According to the explanation offered by **moment.js**, using the library for date arithmetic operations yields code that is more readable.  My small test reveals that the there is definitely an efficiency tradeoff.  As always, it is up to the development team to decide which is more important.  As for myself, I am definitely leaning towards the reduced time benefits.

Happy coding!
Bernoulli Distributions
Tags: beginners, datascience
Published: 2020-06-15 03:55:09

The Bernoulli Distribution. One of the first stats concepts that I learned in middle school. Interested in seeing what else this mathematician did, I looked him up and was surprised to see how many concepts were named after him. The Bernoulli Effect, the Bernoulli Series, Bernoulli Polynomials. I remember thinking, "man this guy must have been really smart or had nothing better to do". However, everything made more sense a couple years later when I found out they a whole family of geniuses and each had come up with their own mark in math history. It was probably the only way to not be the loser of the family.


![Johann Bernoulli](https://dev-to-uploads.s3.amazonaws.com/i/k4hhbbmojsjtewc1v3h1.jpg)

> This was Johann Bernoulli

# What is the Bernoulli Function?

Anyways Jacob Bernoulli was the one who coined this distribution. The idea behind it is that in any event, you will either get a success (1) or a failure (0), and the probability of getting the success is p, making the probability of failure (1-p). Say you were trying to pick an ace out of a randomly shuffled deck. Since there are four aces in a deck with fifty two cards, the probability of success or p is 1/13, which means the probability of failure is 12/13. When repeated an n number of times the expected value or chance that you will succeed n number of times in picking an ace each time decreases exponentially. These probabilities can be graphed, creating the Bernoulli Distribution.

!["Formula for calculating the Bernoulli function"](https://dev-to-uploads.s3.amazonaws.com/i/u0bf8k0cwxkpmw5q5hvu.png)
> Formula for calculating the Bernoulli function

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wtdre2w4hxrvwivzrh4z.png)
>Formula for calculating expected value and variance

# Where is it used?
This distribution can be used in any and every statistical modeling as long as it meets four criteria.

1) It has only two outcomes -- Success or Failure.
   (Some event either can or cannot happen)
2) Each trial must be independent from one another.
   (The success or failure in trial one cannot affect the success 
    or failure in outcome two)
3) Probability of success and failure stays the same throughout 
   each trial.
4) Number of trials are fixed. 

So going back to our picking aces example. We can use the Bernoulli Distribution to try and guess how many times we will succeed as long as we put the card I drew back into the deck before I run the experiment again. If I don't then criteria 2 and 3 will not apply so I cannot use the distribution to calculate my success over n number of times. 


Pictures and Information gotten from: 
https://probabilityformula.org/bernoulli-trials.html
https://towardsdatascience.com/understanding-bernoulli-and-binomial-distributions-a1eef4e0da8f