teleren/devto huggingface dataset:
Hangman Code :P
Tags: project, python, beginners
Published: 2021-01-02 10:35:55

My first basic not so good project..

But I did learn a few things...

Things I think I'll remember from now on...
json.load() 
choice() method (random module)
system() method (os module)
sleep() method (time module)
sort() method for lists
isalpha() method
count() method
index() method

words.json is a file which consists of words.

```
import random
import json
import os
import time

with open("words.json") as words_list:
    words=json.load(words_list)

word=random.choice(words).upper()
chances=5
guesses=list()
g_word='-'*len(word)

while chances>0:
    os.system("clear")
    print("Word: {}".format(g_word))
    print("Guessed Letters: {}".format(' '.join(guesses)))
    print("Chances: {}".format(chances))
    guess=input("Guess a letter: ").upper()

    if not guess.isalpha() or len(guess)!=1 or guess in guesses:
       print("Invalid Input. Try Again.")
       time.sleep(1)
       continue
    
    guesses.append(guess)
    guesses.sort()
    
    if guess not in word:
        print("Wrong Guess...")
        chances=chances-1
        time.sleep(1)
        continue
    
    if guess in word:
        g_word=''.join([letter if letter in guesses else '-' for letter in word])
        print("Right On!")
        time.sleep(0.5)
        
    if g_word == word:
        print("Word: {}".format(g_word))
        print("You Won!")
        time.sleep(1)
        exit(0)

print("\nYou lost! Better luck next time.")
print("The key was: {}".format(word))
```
3 Projects you should have in your portfolio
Tags: javascript, frontend, webdev, codenewbie
Published: 2021-01-02 10:32:43

###When building this projects keep the followings in mind
- Focus on the details of the user interface
- Try to code serveral aspect of the user interface
- Dont forget lower resolution screens

###Projects
- Dashboard UI
![Screenshot 2021-01-02 at 10.56.05](https://dev-to-uploads.s3.amazonaws.com/i/6umw3dv04u55jp268p8r.png)

- Podcast/Music player UI
![Screenshot 2021-01-02 at 11.00.35](https://dev-to-uploads.s3.amazonaws.com/i/8caosquzzvu0mh6zp3fd.png)

- Booking UI
![Screenshot 2021-01-02 at 11.08.07](https://dev-to-uploads.s3.amazonaws.com/i/jeygzxu8p13ydgs7n3k2.png)
Choosing Best products online in Tier 2 and 3 countries
Published: 2021-01-02 10:27:09

Hi everyone, I am a girl from USA and living in Tier 2 country for my online research. When I talk about India, people are very new in India who are shopping online. One day, my neighbour in lockdown thought to buy a <a href="https://reviewguy.in/best-gaming-chair-in-india/">adjustable gaming chair</a> for her boy who is studyinh in class 12 as he was stareaming game online and was getting good response. She was very affraid and it took her 10 days to decide that she should buy it from online or offline.

This same condition also occured with my grand mother as she is from India and live there. She was think to have a treadmill that is top in india and she always searched <a href="https://reviewguy.in/best-treadmill-for-home-use-in-india/">best treadmill in India</a>. Due to me, she taked discussion quickly but on my guaranty. hahah

This was really a funny incident for me in lockdown.
A simple way to update your php to 8.0 on CentOS7
Tags: php, beginners
Published: 2021-01-02 10:23:31

1. Uninstall your current php and its modules
```
sudo yum remove -y php php-*
```
2. Add remi repository
```
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
```
3. Install php 8.0
```
sudo yum install -y --enablerepo=remi-php80 php
```
4. Confirm the php version
```
php -v
PHP 8.0.0 (cli) (built: Nov 24 2020 17:04:03) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
```
5.Install necessary php modules
Best Animation Examples 2020
Tags: html, css, javascript, codepen
Published: 2021-01-02 09:56:29

Hello friends, in which article today we will know <a href="https://blog.stackfindover.com/best-animation-examples-2020/" rel="dofollow">Best Animation </a> Examples 2020.

###What is Animation?###

After all, what is the meaning of animation? <a href="https://blog.stackfindover.com/best-animation-examples-2020/" rel="dofollow">Animation</a> is a type of process that involves designing, drawing, making layouts and photographic. It is important to prepare sequences that are later integrated into multimedia or any gaming products. Talking about its principle, then the still images in it are exploited and managed in such a way that it creates the illusion of movement. In order to create the illusion of motion, those images are displayed very quickly and these images are very different from each other. When continuously we see these static images in a sequence, then we feel like a video animation in which characters or objects are moving.

####01: CSS 3D Solar System####
{% codepen https://codepen.io/juliangarnier/pen/idhuG default-tab=js,result %}

####02: Particle Animation####
{% codepen https://codepen.io/yahiarefaiea/pen/xyNWQq default-tab=js,result %}

####03: Animated Login Form####
{% codepen https://codepen.io/stack-findover/pen/OJRvPQv default-tab=js,result %}

####04: VelocityJS demo####
{% codepen https://codepen.io/sol0mka/pen/kzyjJ default-tab=js,result %}

####05: Pure CSS Product Card####
{% codepen https://codepen.io/cobra_winfrey/pen/OJXJeod default-tab=js,result %}

<a href="https://blog.stackfindover.com/best-animation-examples-2020/" rel="dofollow">Load More</a>
What is cPanel? Learn using cPanel in WordPress Hosting
Published: 2021-01-02 10:14:19

##What is cPanel?
cPanel is a Linux-based Web Hosting control panel with a Graphical User Interface that has been written in PERL programming language. The basic purpose to create cPanel is to easily handle and manage websites and servers. Basically, cPanel is a User Interface that makes complicated things related to web servers and websites more simple and easier as WordPress does in its dashboard.

cPanel allows you to host websites, domain management, manage and organize your web files, manage and create email accounts, and many other admin tasks.
##Why cPanel is used in WordPress Hosting?
As WordPress officially provides so many different features in its WordPress Dashboard, so why we need the cPanel in WordPress Hosting?

WordPress Hosting definitely offers you different helpful features in its WordPress Dashboard. But you ever think that why user asks for cPanel in their hosting. Don’t worry, you don’t have to pressure your mind, we are here to tell you why it is required.

The cPanel includes those features that are not provided in the WordPress Dashboard and are very helpful for you and your website. The cPanel is like the backbone of your hosting, and you can control every single piece of thing from your cPanel.
<a href="">Read Full article</a>
Article about Phalcon in a German magazine
Tags: phalcon, php, article, german
Published: 2021-03-31 18:33:28

---
title: Article about Phalcon in a German magazine
published: true
date: 2021-01-02 10:12:00 UTC
tags: phalcon,php,article,german
canonical_url: 
---

I’m happy to announce the release of my article dedicated to Phalcon in the December issue of a German magazine called PHP Magazin.

<!--more-->

Phalcon is even on the front page with a dedicated illustration!

The title of the article is **Der Falke unter den PHP Frameworks** - **The Phalcon among the PHP frameworks**.

The [article](https://kiosk.entwickler.de/php-magazin/php-magazin-1-2021/der-falke-unter-den-php-frameworks/) is thirteen pages long. Inside, I am presenting Phalcon as well as showcasing its main features.

You can find this issue on [the magazine’s website.](https://kiosk.entwickler.de/php-magazin/php-magazin-1-2021/).

Thanks for your attention! I hope this article will contribute to increasing Phalcon’s community.

_Article submitted by Jérémy PASTOURET_ [@jenovateurs](https://github.com/jenovateurs)

* * *

Chat - Q&A

- [Discord Chat](https://phalcon.io/discord)
- [Forum](https://phalcon.link/forum)

Support

- [OpenCollective - Support Us](https://phalcon.io/fund)
- [Store - Merchandise](https://phalcon.io/store)

Social Media

- [Telegram](https://phalcon.io/telegram)
- [Gab](https://phalcon.io/gab)
- [MeWe](https://phalcon.io/mewe)
- [Parler](https://phalcon.io/parler)
- [Reddit](https://phalcon.io/reddit)
- [Facebook](https://phalcon.io/fb)
- [Twitter](https://phalcon.io/t)

Videos

- [BitChute](https://phalcon.io/bitchute)
- [Brighteon](https://phalcon.io/brighteon)
- [LBRY](https://phalcon.io/lbry)
- [YouTube](https://phalcon.io/youtube)

<3 Phalcon Team
Developer Opportunities(jobs)
Tags: developers, opportunities, jobs
Published: 2021-01-02 10:02:57

Traditional Methods.
Based on the number of hour you want to sacrifice, there is freelancing, part-time and full-time job. Most of the job positions available in IT industry are available in the following websites. Let me share some of the attractive job vacancy providing websites. Most of the time applying job is an easy process, just submit your resume, projects and your details.

All kinds of jobs.
- [flexjobs](https://www.flexjobs.com/jobs/)
- [swissdevjobs](https://swissdevjobs.ch/) 
- [simpli](https://www.simpli.com/)
- [jobs] (https://www.jobs.com/)
- [indeed](https://www.indeed.com/)
- [honeypot](https://app.honeypot.io/)
- [remote](https://remote.co/)
- [WebDevJobs](https://webdevjobs.co)
- [freshersworld](www.freshersworld.com/jobs/)
- [amazon jobs](https://www.amazon.jobs/)
- [remote](https://remoteok.io/)
- [GitHub Jobs](https://jobs.github.com)
- [stack Overflow](https://stackoverflow.com/jobs)
- [Simply Hired](https://www.simplyhired.com)
- [Career Builder](https://www.careerbuilder.com)
- [Linkedin Profinder](https://linkedin.com/profinder)
- [Authentic Jobs](https://authenticjobs.com)


Startup Jobs :
This website provide jobs in startup company.
- [Angel](https://angel)
- [Startup Jobs](https://startup.jobs/)
- [Tech Startup Jobs](//www.techstartupjobs.com/)

Freelance Sites
- [GigGrabbers](https://www.giggrabbers.com)
- [Lemon.io](https://lemon.io)
- [Toptal](https://www.toptal.com)
- [Coworks](https://coworks.om)
- [Floyo](https://folyo.me)
- [fiver](https://www.fiver.com/)
- [Freelancer](https://www.freelancer.com/)
- [upwork](https://www.upworl.com/)
- [peoplePerHour](https://www.peopleperhour.com/)
- [Speedlancer](https://speedlancer.com/)

I love to get an idea, please let me know how you got jobs. What platform you used to job.
Building a personal portfolio | Getting started
Tags: dohackathon
Published: 2021-01-02 09:58:27

I have just begun creating a personal portfolio website to submit as part of the App Platform Hackathon. I know I'm starting late. Better late than never! With just 8 days left till the deadline, I'll have to work fast to make a submission on time. 

For the past year, I have been planning to create my personal portfolio. Because I have full-time school and work, I didn't have time to sit down and code. This short Christmas vacation has given me some free time to dedicate to this project. I have just 3 days until school resumes. Hopefully, I can complete over 70% of the project before then. 

## What I've done so far
Before I begin coding, here are a few tasks I've already done:
- Signed up for Digital Ocean
- Filled the form requesting credits
- Searched for inspiration. I have been using awwwards.com and cssdesignawards.com to explore beautiful website effects and designs. Some cool effects and designs will be applied when creating my own portfolio. I already have a mental picture of what I want the site to look like. The only thing left now is execution :)

Next update coming soon!
Correct HTML structure for 2 inputs controlling a single value?
Tags: help, html, a11y
Published: 2021-01-02 09:50:20

Question ... What would be the correct HTML structure for 2 inputs controlling a single value? In my case both an input slider and a text (number) input. eg:

![An input with both a slider and text option](https://dev-to-uploads.s3.amazonaws.com/i/560oc3ljc4lxldphxfeu.png)

Be awesome to hear what an accessibility pro recommends!
What sign-in methods do you use in your apps?
Tags: discuss, security, auth
Published: 2021-01-02 09:39:46

---
title: What sign-in methods do you use in your apps?
published: true
description: 
tags: discuss, security, auth
cover_image: https://www.ecommerce360.es/wp-content/uploads/2015/06/login-social.png
---
Some of the most popular ones include Apple, Facebook, Github, Google, LinkedIn, Twitter, email, and lots of others.

My favorites are GitHub, Twitter, and email. DEV and many other sites use this model, and I think that it's more than enough.

What sign-in methods do you use in your apps?
What will you focus on in your tech-stack in 2021?
Tags: discuss, productivity, inspiration
Published: 2021-01-02 09:21:22

---
title: What will you focus on in your tech-stack in 2021?
published: true
description: 
tags: discuss, productivity, inspiration
cover_image: https://epubsecrets.com/wp-content/uploads/2018/03/tools_cropped.jpg
---
Personally, I will spend more time improving on NextJS, PostgreSQL, TypeScript, and GraphQL. I also like the approach of Svelte.

What will you focus on in your tech-stack in 2021?
Building container image in AWS CodeBuild with buildah
Tags: buildah, codebuild, centos
Published: 2021-01-02 09:20:40

While I was trying out AWS CodeBuild, I realised that the available build images are only Amazon Linux 2 & Ubuntu 18.04. Being used to CentOS, I initially tested out using Amazon Linux 2.

However, Amazon Linux 2 is based on RHEL7. I faced issues in building image using buildah in Amazon Linux 2. As such, I decided to take the challenge to use custom image based on `centos:latest`, which buildah can be easily installed and configured.

When using custom image, there are a couple of things that need to be done as these will not be available in the image:
1. install aws cli
2. install buildah

## 1. Installing AWS CLI v2
As per AWS CLI's guide, we'll download & install the latest version:
```
curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
unzip -q awscliv2.zip
./aws/install
```

## 2. Installing buildah
Installing buildah is simpler in CentOS8:
```
dnf install -y buildah fuse-overlayfs
```

However, the build process was giving an error:
`failed to mount overlay for metacopy check with "nodev,metacopy=on" options: invalid argument`. Googling around, I found this issue {% github https://github.com/containers/podman/issues/8118 %}. What needs to be done is to remove the `metacopy=on` in `/etc/containers/storage.conf`. Subsequently, the build is successful :)

Below is a summary of my CodeBuild's buildspec.yml (configured for terraform):
```
version: 0.2

phases:
  install:
    commands:
      - dnf -y update

      - echo "Install aws cli v2"
      - dnf -y install unzip
      - curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
      - unzip -q awscliv2.zip
      - ./aws/install
      - export PATH=/usr/local/bin:$PATH

      - echo "Install buildah"
      - dnf install -y podman buildah fuse-overlayfs
      - sed -i 's/^mountopt =.*/mountopt = "nodev"/g' /etc/containers/storage.conf
  pre_build:
    commands:
      - echo "Login to ECR"
      - REPO_URI=${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com
      - aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | buildah login --username AWS --password-stdin ${REPO_URI}
  build:
    commands:
      - echo "Build started on `date`"
      - cd ${CODEBUILD_SRC_DIR}
      - cat /etc/os-release
      - sh build-container.sh ${IMAGE_NAME}
  post_build:
    commands:
      - echo "Build completed on `date`"
      - TAG=`date +%Y%m%d_%H%M%S`
      - echo "Pushing image to repository ${IMAGE_NAME}"
      - buildah push ${IMAGE_NAME} ${REPO_URI}/${IMAGE_NAME}:${TAG}
```
With the above, I'm able to build the container image using buildah and pushing it to my container repo.
Cara berlatih menulis:Artikel pertama di dev.to
Tags: writing, productivity, indonesia, menulis
Published: 2021-01-02 09:15:09

# Enam cara berlatih menulis

Cara berlatih menulis ala saya:

1. **Menulis setiap hari**: artikel ini adalah contohnya. 

2. **Menulis di mana saja**: kertas, tisu, serber, dll. Asal jangan di tembok rumah apalagi di jalanan. Jangan lupa untuk memotretnya sebagai arsip sementara, sebelum Anda ketik ulang secara digital.

3. **Menulis dengan spontan**: Untuk itu bawa *notepad* (**bukan iPad**) ke manapun dan kapanpun. Kenapa bukan iPad? Ini preferensi saya yang tidak ingin menambah beban kabel *charger* untuk di bawa. **Kertas dan pena tidak perlu baterai**. 

4. **Menulis secara luas**: menulis artikel blog, memberikan komentar terhadap artikel orang lain (bermurah hatilah saat memberikan komentar, yang banyak jangan sedikit), memberikan anotasi. Saat ini ada platform seperti [hypothes.is](hypothes.is) yang memungkinkan anda melakukan itu secara daring dan terbuka,

5. **Menulis apa saja**: yang anda lihat, yang Anda rasakan, yang anda benci, dll. Tapi tetap harus beretika ya. Ingat jejak digital dapat dilacak. Tinggalkan jejak yang baik. Kalau niatnya mengkritik ya berikan kritik yang baik. Jangan memaki-maki. Berikan juga alternatif solusinya, kalau Anda kebetulan menguasai ilmunya.

6. **Simpan (arsipkan) tulisan-tulisan anda**: saran saya gunakan penyimpanan awan (_cloud storage_), sehingga selalu bisa diakses ketika anda butuhkan atau dikurasi serta dikembangkan untuk tujuan tertentu. Ingat saran kesatu di atas, ‘menulis setiap hari’. Jadi mungkin saja Anda menulis secara acak. Tidak sistematis mengikuti ide yang muncul. Layanan seperti Google Drive, OneDrive dan DropBox dapat digunakan. Bagi anda yang pemrogram, pasti tahu platform [Github](github.com) dan [Gitlab](gitlab.com) yang bisa dipakai sebagai repositori arsip di awan.

# Jadi kesimpulannya

* write everyday
* write anywhere
* write anything
* write longer
Self Hosting WordPress
Tags: docker, wordpress
Published: 2021-01-02 09:12:46

My latest obsession has been self-hosting ever since getting my Raspberry PI, I've began exploring docker compose files and setting them up.


One of the useful resources that I look for to do self-hosting is from 
https://hub.docker.com/

One of the amazing things about docker is the folder structure, here I can specify my own directory, making docker generate the files at the mention directories.

Note that this docker compose is for raspberry pi setup, however it should also work for x86 systems as well. 

```
version: '3.1'

services:

  wordpress:
    container_name: wordpress
    image: wordpress
    restart: always
    ports:
      - 9005:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb
    volumes:
      - wordpress:/var/www/html

  db:
    image: mysql/mysql-server:latest
    restart: always
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - db/var/lib/mysql

volumes:
  wordpress: /opt/containers/wordpress/html #Define your own path
  db: /opt/containers/wordpress/mysql #Define your own path
```
Nuxtjs Generate SEO metadata simple
Tags: nuxt, ssr
Published: 2021-01-02 08:49:05

---
title: Nuxtjs Generate SEO metadata simple
published: true
description: generate metadata in nuxtjs when you need ssr
tags: Nuxtjs, SSR
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/b53j6icfprw7mtmtrgo3.png
---
when you use nuxtjs to support ssr, you can defined meta info in page vue component. and you should set metadata each page?

No! you can just add `nuxt-seo-meta` to your project.

i have made this npm to reduce time defined redundancy meta.

in `nuxt-seo-meta` you just defined you care info and reset all meta info `nuxt-seo-meta` will auto generate.
include `twitter`, `facebook` social meta.

here show the screenshoot for you

use in `asyncData`

```javascript
async asyncData({ seoMeta }) {
  seoMeta({
    title: "PageTitle",
    description: "PageDescription",
    url: "PageUrl",
    image: 'SocialShareImage.png'
  })
}
```

use in head

```javascript
head({$seoMeta}){
  return {
   meta: $seoMeta({...options}, false)
  }
}

```

![DemoImage](http://public.mixbo.cn/nuxtjs-seo-meta.png?t1)

you can find more info [here](https://github.com/ihavecoke/nuxt-seo-meta#readme)
Traefik as a reverse proxy
Published: 2021-01-02 08:47:51

This guide is about sharing how I setup Traefik as a reverse proxy with https connection


1.Setup for apache2-utils to encrypt your password
```
apt install apach2-utils
```

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

In this Docker file, you can change several value to your custom domain needs, the comments briefly explains the usage of the configurations.

Docker-Compose
```
version: '3'
services:
  traefik:
    image: traefik:latest
    container_name: traefik
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true #Prevents the UID transition while running a set UID binary
    networks:
      - proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - /etc/localtime:/etc/localtime:ro #Ensure that docker date matches server time
      - /var/run/docker.sock:/var/run/docker.sock:ro 
      - ./data/traefik.yml:/traefik.yml:ro #traefik configuration files
      - ./data/acme.json:/acme.json #to tell traefik to save ssl certs here
    command:
      --api.insecure=true # Enabling insecure api, NOT RECOMMENDED FOR PRODUCTION
    
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.entrypoints=http"
      - "traefik.http.routers.traefik.rule=Host(`traefik.domain.com`)"
      - "traefik.http.middlewares.traefik-auth.basicauth.users= admin:@@$apr1@@$buoyPbo.@@$NOlqTVpSHfumf9lOiMYwI1" #Generated password
      - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
      - "traefik.http.routers.traefik-secure.entrypoints=https"
      - "traefik.http.routers.traefik-secure.rule=Host(`traefik.domain.com`)"
      - "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
      - "traefik.http.routers.traefik-secure.tls=true"
      - "traefik.http.routers.traefik-secure.tls.certresolver=http"
      - "traefik.http.routers.traefik-secure.service=api@internal"
networks:
  proxy:
    external: true
```

```
api:
  dashboard: true
entryPoints:
  http:
    address: ":80"
  https:
    address: ":443"
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
certificatesResolvers:
  http:
    acme:
      email: <<email.com>>
      storage: acme.json
      httpChallenge:
        entryPoint: http
```

Start docker container
```
docker-compose up -d
```
Your good to go!!!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dsxcii4mq0utwn7bo733.JPG)