teleren/devto huggingface dataset:
NDI เกิดช้าไปหน่อยไม่งั้นรวยแล้ว
Published: 2020-04-16 15:59:23

7-8 ปีก่อนผมไปช่วยงานพี่ติ๋มทีวีพูล ตอนนั้นทีวีพูลทำทีวีดาวเทียม 2 ช่อง ผมก็เดินๆไปดูในสตูดิโอ กล้อง, switcher, monitor, sound, video capture มันต่อกันด้วย interface อะไรก็ไม่รู้หน้าตาเหมือนสายแลนสมัย 10base-2 สายกลมๆ RG58 หรือไงนี่แหละ ถามน้องๆที่ดูแลเขาบอกสาย SDI พี่เป็นมาตรฐานของบรอดแคสต์ ย่อมมาจาก Serial Digital Interface มันเจ๋งมากเลยนะ ลากสายยาวๆได้และเป็น digitail หน้าจาประมาณนี้ ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/u26symwmexqo08sazw7n.jpg)
ผมไปตามๆดู speed มันโหวตั้งแต่ปี 1998 มันวิ่งตั้ง 1.5 Gbps ไปแล้ว ช่วงที่ผมเข้าไปทีวีพูลมันวิ่ง 3 Gbps และกำลังจะมีรุ่่น 6 Gbps ออกมาตอนนี้ 12 Gbps ที่มันต้องมีความเร็วขนาดนั้นก็เพราะคนบรอดแคสต์เขาไม่นิยม compress ประหยัด BW ไม่ใช่จำเป็นสำหรับเขา เขาเน้นคุณภาพ ทุกวนันนี้ก็ยังเป็น SDI กันอยู่นะครับ SDI เป็น point to point สายลากมันทีเป็นมัดๆ 5 เส้น 10 เส้น ต่กล้องเข้า switcher , Playout เข้า switcher ก็เส้นใครเส้นมัน  ทีนี้มาถึงยุค IP ก่อนนี้ speed 100 Mbps นี่มันเอามาทำอะไรแทบไม่ได้เลยนะในวงการบรอดแคสต์ แต่พอ 1 Gbps , 10 Gbps ชักมีปนะเด็น จึ่งมีคนคิดว่าเฮ้ยทำไมเราไม่ทำอะไรที่คล้ายๆ SDI แต่ขี่ไปบน IP วะ มันจึงกลายมาเป็น NDI (ตั้งชื่อง่ายจริงๆ) https://ndi.tv/ ผมไม่แน่ใจว่า NDI เกิดตอนไหนแต่คิดว่าไม่น่าจะนานนัก น่าเสียดายที่ NDI มาเกิดในยุคที่ทีวีไม่เฟื่องฟูไม่งั้นเจ้าของ License NDI คงรวยเละแหละ 

**แล้วผมพูดเรื่อง NDI ทำไม ?**  
เรื่องของเรื่องคือผมทำ Live รู้ไม่มากแต่อยากเล่า ทีแรกก็ไม่ได้คิดอะไรทำง่ายๆใช้ OBS + Zoom ผมใช้ MacOS ทีนี้มันมี Bug อันนึงตอน capture window มาแสดงใน OBS มันกระพริบและยังแก้ไม่ได้ ผมเลยกลับไปดูโปรแกรมอีกตัวคือ mimolive มันบอก support NDI และตอนสัมภาษณ์มันแนะนำให้ใช้ skype เพราะรองรับ NDI เหมือนกัน หลังจากซื้อ License มาผมก็ลองๆ skype โหวมันร้ายกาจมากจริงๆ คือพอเรา conf กับใคร skype มันจะ broadcast เสียง ภาพของแต่ละคนทีคุยกัน แยกกันวิ่งเป็น NDI ออกมา ฝั่ง mimolive ก็จะมองเห็นเป็น  input ดังรูป ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p72wuitr98cc3g1tm09p.png) เราสามารถสอยแยกภาพแยกเสียงเป็นอันๆไป broadcast ได้ ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kofx3vik03apgiiqx640.png)
ทุกอย่างดูเหมือนจะดี ผลจากการทดสอบ Live ครั้งแรกด้วย NDI ของผมเละเป็นโจ๊กเลย เสียง Loop ไปมา ด้วยสาเหตุที่ผมใช้ audio device ทั้ง input , output ของ skype , mimolive ไม่แยกกันเลย echo กันมั่วไปหมด แถมยังใช้ลำโพง MBP เป็น monior อีก จริงๆผมตั้งใจจะทดสอบก่อนจะ Live นะแต่ยุ่งไปหน่อยเลยได้ทดสอบก่อน Live นิดเดียว ครั้งหน้าเดี๋ยวเตรียม audio channel ใหม่ก็น่าจะ ok
ทั้งหมดที่เขียนมาไม่มีอะไรครับ เพียงแค่จะบอกว่าทำไมผมถึงเลือก mimolive กับ Skype แทนที่จะใช้ OBS + Zoom มันมีเรื่อง NDI นี่แหละครับผมถึงเลือกมัน....เล่าซะยาวตัดจบแค่นี้เลยดีกว่า
Let's Encrypt SSL with auto-renew on GoDaddy in 4 steps
Tags: ssl, godaddy, letsencrypt, cpanel
Published: 2020-04-16 15:50:49

---
title: Let's Encrypt SSL with auto-renew on GoDaddy in 4 steps
published: true
description: Install a free SSL certificate on any hosting with cPanel
tags: #ssl, #godaddy, #letsencrypt, #cpanel
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/qxdke0f7f8zy5q1crh3f.png
---

I recently tried to install a Let's Encrypt SSL certificate on GoDaddy and I did'n find enough information to configure auto-renew.

It is simplified in 4 simple steps steps everything you need to install a free certificate and save some 💸💸💸
&nbsp;

### 1. Connecting via SSH to your server
You must enable SSH access from your cPanel and log in with your credentials.

``` bash
$ ssh [username]@[hostname]
```
&nbsp;

### 2. Install [acme.sh](https://get.acme.sh)
Download [this repo](https://github.com/Neilpang/acme.sh) and install it.

```bash
$ curl https://get.acme.sh | sh
```
&nbsp;

### 3. Issue the certificate
You only need write access to the web root folder to issue the certificate.
```bash
$ acme.sh --force --issue -d example.com -d www.example.com  -w /home/[username]/public_html
```
&nbsp;

### 4. Deploy the certificate
There are 2 ways to implement the certificate and both leave the cronjob configured.

#### a. Deploy SSL to cPanel using UAPI (GoDaddy option)
This hook is using UAPI and works in cPanel & WHM version 56 or newer.

```bash
$ acme.sh --deploy -d example.com -d www.example.com --deploy-hook cpanel_uapi
```
#### b. Deploy SSL to cPanel (other cPanel version)
`DEPLOY_CPANEL_USER` and `DEPLOY_CPANEL_PASSWORD` is required only once.
```bash
$ export DEPLOY_CPANEL_USER=myusername
$ export DEPLOY_CPANEL_PASSWORD=PASSWORD
$ acme.sh --deploy -d example.com -d www.example.com --deploy-hook cpanel
```
> For more documentation see the [GitHub Wiki](https://github.com/acmesh-official/acme.sh/wiki)

I hope this may help you!
Request a free GitKraken Pro account
Tags: git, gitkraken, startup, covid19
Published: 2020-04-16 15:50:30

I created a website COVID19 statistic and I get free pro accounts through this program are for 25 users for one year.

We’re committed to doing what we can to help. If you’re contributing to a COVID-19 related project, you are eligible to request a free GitKraken Pro license for yourself and up to 25 team members. Thank you for working on projects that will help with COVID-19, and we appreciate your honesty.

[Apply Now](https://www.gitkraken.com/pro-for-a-cure)

My Blog [here](https://www.faisaljebali.com)
Fibonacci in Kotlin
Tags: kotlin
Published: 2020-04-16 15:47:04

---
title: Fibonacci in Kotlin
published: true
description: 
tags: #kotlin
---
The Fibonacci sequence is a sequence of integers in which each term is the sum of the two preceding terms.
![Alt kotlin](https://twitter.com/tonux_samb/status/1232968279561510912/photo/1)
Gitlab-CI Config to deploy to your server via SSH
Tags: gitlab, ssh, cd
Published: 2020-04-16 15:45:15


**STEP 1: Login SSH without password**
ssh-keygen

Output:
Enter file in which to save the key (/home/user/.ssh/id_rsa): (input for custom filename)
Enter passphrase (empty for no passphrase): (skip if you want)


ssh-copy-id -i ~/.ssh/id_rsa.pub UserName@RemoteServer



ref: https://www.shellhacks.com/ssh-login-without-password/

**STEP 2: Pull Git without password on Server**

Login to your server:
ssh root@ip

ssh-keygen -t ed25519 -C "email@example.com"


copy content from generated-file ssh to DEPLOY KEYS REPOSITORY GITLAB 

Testing that everything is set up correctly : 
ssh -T git@gitlab.com



ref: https://gitlab.com/help/ssh/README#generating-a-new-ssh-key-pair


git remote add bySSH git@gitlab.com:username/project.git



**STEP 3: Configure .gitlab-ci.yml**


before_script:
  - apt-get update -qq
  - apt-get install -qq git
  # Setup SSH deploy keys
  - 'which ssh-agent || ( apt-get install -qq openssh-client )'
  - eval $(ssh-agent -s)
  - ssh-add <(echo "$SSH_PRIVATE_KEY")
  - mkdir -p ~/.ssh
  - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
    
deploy_staging:
  type: deploy
  environment:
    name: staging
  script:
    - ssh root@ip "cd /var/www/project-folder && git checkout dev && git pull bySSH dev && npm install && pm2 reload idpm2 && exit"

  only:
    - dev



ref: https://medium.com/@hfally/a-gitlab-ci-config-to-deploy-to-your-server-via-ssh-43bf3cf93775
Accomplish the Most Convincing Magento Design with Towering Media
Tags: webdev
Published: 2020-04-16 15:45:12

Magento is one of the most used and about all the hype platforms in the eCommerce industry. Major names like Ford, Olympus, and Coca-Cola have a Magento web store. The exceptional features of this platform, offer edge to any eCommerce business, and even small start-ups. Open source license, custom and responsive [Magento design](https://toweringmedia.com/magento-design), amazingly big community, no hosting restrictions, and third party integrations are some of the main benefits of this miraculous platform known as Magento. 

Are you seeking reliable help for your upcoming business or existing one? Make a switch or get a brand new development done with the assistance of professionals present at Towering Media. 

How does Magento Design put an impact?

Visualization has a great role to play in all the industries and domains. Information matters, but how is it represented, is even more crucial. The eCommerce world definitely needs great design and impactful design to be eye-catching for the users. The more convincing the design will be, the chances of getting better conversions hikes. Do you know the first impression of any online platform plays 94 percent contribution in overall aesthetics? 

How helpful is Towering Media?

Whether you are seeking Magento design or development, this company comes forward. The experts present at Towering Media are highly efficient and have gained expertise over significant years in the development domain. Their job is to give out the most enriching products and experience to the clients. They will assist your business venture to stand out of the crowd with unique development and attractive designs for the Magento website. 

Do not waste more time and connect with the expertise of this top-notch service providers.
Kotlin : Check if a year is a leap year?
Tags: kotlin
Published: 2020-04-16 15:44:44

---
title: Kotlin : Check if a year is a leap year? 
published: true
description: 2020 is a leap year
tags: #kotlin
---
code : 
![Alt kotlin] (https://pbs.twimg.com/media/ER8ZO3EW4AER26E?format=png&name=900x900)

output 
![Alt return](https://pbs.twimg.com/media/ER8ZO3HWoAAPjNE?format=png&name=small)
ISP DNS Servers Are Slowing Your Productivity
Tags: productivity
Published: 2020-04-16 15:31:45

Has your internet slowed down considerably? This might be due to the extra load ISP DNS Servers are having. 

More and more people continue to work from home during this pandemic. Not to mention that the closures of schools are forcing students to take online courses at home. All of which, are putting an extra load on ISP's DNS servers.

I work as a software engineer in the US and my ISP has proven to be very reliable until this week. All of the online services I use to do my work started to slow down to the point that I was no longer happy.

I quickly fired up the terminal and ran the nslookup command to resolve the name of one of the services I use. The command was very slow to complete. That's when I realized that my ISP DNS servers were slow to resolve the IP addresses.

As always, security and privacy is a concern. I did some searches online and turned up this [article on medium](https://medium.com/@nykolas.z/dns-resolvers-performance-compared-cloudflare-x-google-x-quad9-x-opendns-149e803734e5) that breaks down the security, privacy, and performance of various DNS services. After I looked at the results of that article, I decided to go with Cloudflare's 1.1.1.1.

Since my home router does not allow changing the DNS server, I decided to make Cloudflare's DNS server my primary DNS server on my development devices at home. Perhaps not being able to change the DNS server on the routers is a good thing. That will keep devices like TVs and iPads off these DNS servers.

After making this change, my web experience was very much restored. My pages were loading faster than ever before and online services went back to normal. Overall, this small change really helped me to be more productive at home.

Changing this setting is different from one operating system to the next. If you are not sure how to change those settings, you can google how to change these settings or refer an [article like this](https://www.quora.com/How-do-you-change-your-DNS-settings-in-Linux-Windows).

Be productive while WFH!
Learning in Quarantine
Tags: php, platzi
Published: 2020-04-16 15:19:10

These strange days I finally decided to grow and expand my knowledge, participation, and research in everything about development. 

Nowadays I am an email marketing developer in a small digital marketing agency in Spain. I am very happy and proud of my work but I want more. I want to grow as a developer. 

¡Yikes! So now it would be a perfect moment to buy some video tutorials or online courses on any platform and learn. But the reality it's a b*tch. I am locked at home but I have no time because I have to work 💻the same amount of hours or even more (because I am committed to my team and my mates), I have to cook 🍳, to clean 🧹, to have fun 🎮, (just a little at least) I have to spend time with my roommate and my girlfriend, etc. 

So, when do I learn? Most of the online courses through the internet are videos of 30 minutes, 45 minutes or even 1 hour. So, when I am supposed to watch a 1-hour video to learn PHP? (Yes, I want to learn PHP).

I was very lucky to found Platzi Platform an its career paths. There are hundreds of micro-lessons about everything.

Today I am writing my first post here in DEV Community. I am very happy to belong to this inclusive and amazing community.

In my next post, I will write about PHP. I promise 🤓
What makes a good developer advocate with Chris Riley
Tags: devrel, podcast, motivation, news
Published: 2020-04-16 15:14:53

**Trick question of the week:**
*How are developer relations different from developer advocates?*

The role of the liaison between the company and the developer is not something new. Several titles have appeared since companies decided that engaging with developers can offer a competitive advantage. Early roles, that are still active today, were given titled "evangelist" or "advocate".

Is DevRel a natural evolution of the role with a different title or advocates and DevRel work together for a more complete approach? We're not going to spoil it for you. We'll let our guest Chris Riley walk us through this, what makes a good developer advocate and more. Chris has been long in the field and takes us through the evolution of the industry and what makes someone good at such a technical role. 

**Bonus:** where can someone new to their Advocacy/DevRel role find resources on how to be more effective? 

Tons of answers in one all-inclusive episode. [Here it is] (https://www.devrelx.com/podcast?utm_source=devto&utm_medium=Article&utm_campaign=Chris Riley). 

**DevRelx:** Our new portal comes with a bi-weekly digest of the latest industry news. You will still be notified of new podcast episodes and also news, articles and jobs. Interested? [Sign-up here] (https://www.devrelx.com/?utm_source=devto&utm_medium=Article_dx&utm_campaign=devrelx).

**Chris Riley** *is a Tech Advocate at Splunk, he is obsessed with bringing modern technologies to those who need to solve real-world problems, going from unicorn to reality. Chris speaks and engages with end-users regularly in the areas of DevOps, SRE, and App Dev. He is a regular contributor to industry blogs such as ContainerJournal.com, DevOps.com and Sweetcode.io and host of the podcast Developers Eating the World. As a bad coder turned technology advocate, Chris understands the challenges and needs of modern engineers, as well as how technology fits into the broader business goals of companies in a demanding high-tech world.*

[Developer personas webinar discussed at the episode] (https://www.youtube.com/watch?v=liTCvhUCiIM)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1ohnftwlwdf1iyaph4jw.png)
Click outside listener for React components in 10 lines of code [Using Hooks]
Tags: react, node, typescript, javascript
Published: 2020-04-16 14:57:12

*__prerequisite__: Please read my [previous post](https://dev.to/vibhanshu909/click-outside-listener-for-react-components-in-10-lines-of-code-4gjo) to get an understanding of how one can implement a click outside listener in React in the first place, once you have an idea, this tutorial will become a lot simpler.*


In the [previous post](https://dev.to/vibhanshu909/click-outside-listener-for-react-components-in-10-lines-of-code-4gjo), we learned how to implement a click outside listener without using any third-party libraries within just 10 lines of code.

In this tutorial, we will take a step further, and implement the same concept using our own custom hook, so let's begin.

###Here's the hook:
```js
// hooks/useClickOutsideListenerRef.tsx
import { useCallback, useEffect, useRef } from 'react'

export const useClickOutsideListenerRef = (onClose: () => void) => {
  const ref = useRef(null)
  const escapeListener = useCallback((e: KeyboardEvent) => {
    if (e.key === 'Escape') {
      onClose()
    }
  }, [])
  const clickListener = useCallback(
    (e: MouseEvent) => {
      if (!(ref.current! as any).contains(e.target)) {
        onClose?.()
      }
    },
    [ref.current],
  )
  useEffect(() => {
    document.addEventListener('click', clickListener)
    document.addEventListener('keyup', escapeListener)
    return () => {
      document.removeEventListener('click', clickListener)
      document.removeEventListener('keyup', escapeListener)
    }
  }, [])
  return ref
}
```

###Usage Example:
```js
// components/Dialog.tsx
import React from 'react'
import { useClickOutsideListenerRef } from '../hooks/useClickoutsideListenerRef'

export interface IDialogProps {
  onClose: () => void
}

export const Dialog: React.FC<IDialogProps> = props => {
  const { onClose, children } = props
  const ref = useClickOutsideListenerRef(onClose)
  // I'm using tailwindcss for my css, you can use whatever you want.
  return (
    <div className='w-screen h-screen fixed inset-0 z-50 dialog-container'>
      <div className='flex h-full'>
        <div
          ref={ref}
          className='bg-white p-3 md:w-1/3 max-w-3/4 rounded overflow-auto'
        >
          {children}
        </div>
      </div>

      <style jsx={true}>{`
        .dialog-container {
          background-color: rgba(0, 0, 0, 0.25);
        }
      `}</style>
    </div>
  )
}
```
##Explanation
The **useClickOutsideListenerRef** hook takes a function which is invoked when the user clicks outside your component, and returns a *ref* which you need to refer to your **Content Element**, meaning the element that you want to interact with, i.e in this example the actual dialog box. So basically whenever the user click's outside the *refered div* element, the *onClose* method is invoked and the dialog is closed, but when the user click's inside the *refered div* the dialog remains open and stays interactive.

Enjoy.
About Ruby Hash#[] (Index)
Tags: ruby, hash, documentation
Published: 2020-04-16 14:51:42

---
title: About Ruby Hash#[] (Index)
published: true
description: 
tags: ruby, hash, documentation
---

Get more information and more examples at my AboutRuby project:
* [AboutRuby project](https://github.com/BurdetteLamar/AboutRuby/blob/master/core/Hash/api/markdown.md#-index)

Here's the write-up over at the Ruby project:
* [Ruby project](https://ruby-doc.org/core-2.7.0/Hash.html#method-i-5B-5D)

My main page is [here](https://github.com/BurdetteLamar/AboutRuby#about-ruby).

TL;DR

I've been working on enhancements to the documentation for the Ruby project.  Getting these enhancements posted to the Ruby project has been very slow.  They're not actually meeting resistance;  I know because my many PRs for enhancing class ENV were accepted (though not rapidly).  It's just that everyone is busy.

Anyhow, I'm stashing all this stuff on in my own project, called AboutRuby.  The piecemeal migration from there to the Ruby project is not going to be completed in my lifetime (I'm 77 years old).

So:  I'm going to blow my own horn here on DEV, to encourage you to use the enhanced documentation.
HashiConf Digital: June 22-24, 2020, free to register
Tags: techtalks, devops, security
Published: 2020-04-16 14:44:48

Join us for an online HashiCorp community experience: [**HashiConf Digital**](https://hashiconf.com/digital?utm_source=ExtSite).
 
Featuring product updates, technical sessions, workshops, and connections about the HashiCorp tools and products: Vagrant, Packer, Terraform, Vault, Consul, and Nomad. 

HashiConf Digital will take place online during daytime hours in the EU (timezone: CEST), but it is not just for our European community members. If the [Central European Summer time zone](https://www.thetimezoneconverter.com/?t=1%20pm&tz=Amsterdam&) works for you, feel free to register and join us! 

Registration is free and open to all.

More info: [https://www.hashiconf.com/digital](https://hashiconf.com/digital?utm_source=ExtSite)
Free training and certification currently avaliable for April and May
Tags: freecourses, quarantine, freecertifications
Published: 2020-04-16 14:44:32

I have received this message from one of my friends and would like to share with this awesome community. Kindly share with your friends circle. 

***** *****

1. Microsoft - Azure certification
https://lnkd.in/g4E6FfJ

2. AWS - All AWS technology
https://lnkd.in/fkcMAKg

3. IBM - All IBM technology
https://lnkd.in/gR4zq2W

4. Oracle University - Cloud Infrastructure and Autonomous Database
https://lnkd.in/fVBv9KT

5. Fortinet - NSE1 and NSE2
https://lnkd.in/gH7SCE9

6. Palo Alto - Networks
https://lnkd.in/gfj9f6h

7. Cisco - Cyber Security
https://lnkd.in/gwZBBPJ

8. Qualysguard - Vulnerabilty management
https://lnkd.in/fMHuKc4

9. Nessus - Vulnerabilty management
https://lnkd.in/gEvcJeh

10. SAN's - cyber security
https://lnkd.in/gexceQz

11. Homeland security - ICS Security
https://lnkd.in/g7G4Ebh

12. Coursera - Cloud courses
https://lnkd.in/fTCXqFm

13. Pluralsight - All Training
https://lnkd.in/djPvKDe

14. Sololearn - All Training
https://lnkd.in/fYHT27z

15. Google cloud courses
http://tiny.cc/cyl5mz
Fwitter android app v1.0.5 is released on play store.
Tags: flutter, fwitter, twitterclone, dart
Published: 2020-04-16 14:27:27

A Fwitter is a working Twitter clone written in Flutter using firebase features like auth, realtime database and storage.

## New feature 

* FCM Notification on chat message in system tray.
* Parent tweet will visible in its child's tweet detail.
* Google login button added on signup page.
* Null value alert issue on forgot password fixed
* Hashtags font weight and size issue fixed.


App link:- https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_twitter_clone

Source code:- https://github.com/TheAlphamerc/flutter_twitter_clone

Work progress status:- https://github.com/TheAlphamerc/flutter_twitter_clone/projects

## Contributing

If you wish to contribute a change to any of the existing feature or add new in this repo,
please review our [contribution guide](https://github.com/TheAlphamerc/flutter_twitter_clone/blob/master/CONTRIBUTING.md),
and send a [pull request](https://github.com/TheAlphamerc/flutter_twitter_clone/pulls). I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.

## Project Created & Maintained By

[Sonu Sharma](https://github.com/TheAlphamerc) ([Twitter](https://www.twitter.com/TheAlphamerc)) ([Youtube](https://www.youtube.com/user/sonusharma045sonu/)) ([Insta](https://www.instagram.com/_sonu_sharma__))
Interview Questions Frontend 2020
Tags: javascript
Published: 2020-04-16 14:07:37

<h1>javascript map vs foreach? - whats the difference<h1>

in short..

map returns a new array based on the callback
<>
foreach doesn't return but can change the original array

map can be chained with .filter and other chaining methods
<>
foreach doesn't

map is 3 times quicker
<>
foreach is slower