teleren/devto huggingface dataset:
Ponteiros em GO
Tags: go, beginners, todayilearned, braziliandevs
Published: 2022-05-20 21:47:12

## Introdução
A primeira e vez que ouvi falar em ponteiros foi quando eu estava aprendendo minha primeira linguagem de programação na faculdade `C`, e eu lembro que foi algo que conseguiu deixar minha mente totalmente bugada e eu levei semanas para entender. De lá para cá esqueci totalmente como funcionavam mas em 2022 estudando o GO ouvi novamente falar de ponteiros e seguindo o Today I Learned resolvi escrever sobre para não esquecer mais

## Ponteiros
Quando fazemos uma atribuição de variável no GO por exemplo:
```GO
  x := 10
```
na verdade ele está fazendo uma associação e salvando o valor 10 em um endereço de memoria e ele salva isso como sendo o x, se quisermos pegar esse endereço em que o GO armazenou o valor 10 podemos usar o `&x` para que o go mostre qual o endereço onde ele armazenou o 10

![Go playground](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qrstqkt8w6io3zi21iw.png)
 
com isso se declaramos uma nova variável por exemplo Y e atribuirmos a ela o valor de `&x`, significa que ela vai apontar para o mesmo endereço de memoria que X é diferente de qunando por exemplo falamos que `z := x`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2wmpuzmxud6iawby33to.png)
 
perceba nos logs que o valor de Y é igual ao endereço de memoria de X mas o endereço de memoria de Y é diferente do de X, enquanto que no Z onde fizemos uma atribuição direta o endereço de memoria de Z é exatamente o mesmo que X

Outra coisa interessante que podemos fazer é, depois de atribuir a Y o endereço de X podemos modificar o valor que Y está apontando com o operador de `*y` então podemos fazer o seguinte!
[Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehph41phas5ueyb1c8z3.png)

Onde mudamos o valor de X usando apenas Y

## E na vida real, quando vamos usar ponteiros?

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4s2yyr5falzxbbph0n2g.png)
 
sempre que queremos que uma função mude o valor de uma variável que já temos, nesse caso podemos ver q ambas as funções de soma, a `somaSemPonteiro` e a `somaComPonteiro` retornam o valor que receberam com 1 a mais, no exemplo é 11, porem só a soma com ponteiro reatribui o valor de x para 11 pois ela pega o local onde x está apontando e muda o valor que ele está apontando, onde antes era 10 passa a ser 11
Python Wrapper for newly announced WhatsApp Cloud API
Tags: python, tutorial, showdev
Published: 2022-05-20 21:46:07

**WhatsApp** just opened up its Cloud API to smoothen integration with WhatsApp messaging but it is not always easy for a developer to get started 

So I just made **Heyoo**, An Opensource python wrapper to make the integration even smoother. 

Have a look <https://github.com/Neurotech-HQ/heyoo>
Day 566 : Together
Tags: hiphop, code, coding, lifelongdev
Published: 2022-05-20 21:41:51

_liner notes_:
- Professional : Pretty chill Friday. Helped out a startup with integrating their application. Got 2 upcoming workshops set up on https://MyWorkshops.live. I pushed the code from my new laptop that I pulled from the repo I pushed a couple of days ago. When I deployed it, it broke. haha Then I knew that I didn't push all the code from my old laptop to the repo. Turns out that I had a couple of dist folders with some files I need and my .gitignore had it so that it will skip any dist folders. Push those files from my old laptop, included in my new laptop's files, deployed that and it worked. Awesome. Started working on my talks and a meetup presentation that I have coming up.

- Personal : Went through A LOT of tracks for the radio show. I'm trying to get like 2 weeks worth of shows put together so I don't have to carry my large laptop with me to Greece. I think I'm super close. Just need to put the tracks in order to make sure. Tried to watch "Atlanta" but apparently it is still being shown on FX, didn't know that, just been watching it on Hulu. So I went to watch it on FX via Sling, but I guess I just missed it and wasn't showing again till 2:30 am. Hulu said it wouldn't have the episode to watch till 3am! I just went to sleep. haha.

![View through a forest in Yosemite Valley, CA, USA looking at a waterfall flowing over a stone cliffs ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqv5ui0aymvwb2kzgf9z.jpg)

Going to work on putting together the radio show. I want to see if I have enough for a couple of shows. Definitely want to watch the latest episode of Atlanta. Going to get to work. Oh, I'm going to be travelling so any updates will be up at https://doingstuff.in

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube IbM2gR0Ja3o %}
Cara membuat MariaDB/MySQL bisa diakses secara remote di Ubuntu 18.04
Tags: mysql, ubuntu, linux, indonesia
Published: 2022-05-20 21:38:58

Pada tutorial ini, akan dibahas cara untuk membuat MariaDB bisa diakses secara remote, baik itu menggunakan server lain atau dengan aplikasi desktop pada Win/Mac. Cara ini juga dapat diaplikasikan pada MySQL, tinggal merujuk pada path dan nama file yang tepat.

Langkah pertama adalah dengan melakukan perubahan pada file konfigurasi MariaDB.
```
sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
```

Cari baris yang berisi `bind-address` dan ubah menjadi,
```
bind-address            = 0.0.0.0
```

Simpan perubahan, dan restart MariaDB.
```
sudo service mariadb restart
```

Langkah selanjutnya, buka port `3306` di UFW dengan perintah berikut.
```
sudo ufw allow 3306/tcp
sudo ufw reload
```

Langkah berikutnya, buat sebuah user baru khusus remote di MariaDB.
```
CREATE USER 'remoteusername'@'%' IDENTIFIED BY 'isi-password-disini';
FLUSH PRIVILEGES;
```

Kemudian untuk membuka akses sebuah database agar bisa di-remote, jalankan perintah ini.
```
GRANT ALL PRIVILEGES ON namadb.* TO 'remoteusername'@'%';
```

Kalau ingin semua database bisa di-remote, jalankan perintah berikut.
```
GRANT ALL PRIVILEGES ON *.* TO 'remoteusername'@'%';
```

Remote database connection sangatlah tidak disarankan, lakukan ini dengan resiko sendiri.

Semoga bermanfaat.
I finally completed my portfolio
Tags: beginners, career, codenewbie, programming
Published: 2022-05-20 21:34:10

So I have created my [portfolio](https://taepal467.github.io/Chantae_P/). I had a hard time coming up with a design template for how I wanted my portfolio to look. I know I wanted something simple and not too complicated since I'm still a newb. So instead, I used the theme from Freecodecamp [video](https://www.youtube.com/watch?v=_a5j7KoflTs&t=739s). Even though I didn't use the _exact_ design, do you think employers will see this a negative since I didn't come up with my own design and code? Let me know what you guys think!

P.S. The resume is still work in progress.

Update as of 5/24:
-Fixed the about me section to make it more readable on mobile devices.
Troubleshooting untuk Matomo Web Analytics
Tags: matomo, analytics, troubleshooting, indonesia
Published: 2022-05-20 21:28:59

Artikel ini memuat masalah-masalah troubleshooting yang akan muncul baik selama proses instalasi pada backend maupun frontend, maupun saat konfigurasi Matomo lewat browser.

---

## Troubleshooting pada backend

### Proxy masih berjalan

Apabila muncul pesan error seperti dibawah ini,
```log
[Sat Aug  8 09:58:08 WITA 2020] LISTEN   0         128                       *:80                     *:*        users:(("apache2",pid=2207,fd=4),("apache2",pid=2206,fd=4),("apache2",pid=2205,fd=4),("apache2",pid=2204,fd=4),("apache2",pid=2202,fd=4),("apache2",pid=2170,fd=4))
[Sat Aug  8 09:58:08 WITA 2020] tcp port 80 is already used by (("apache2",pid=2207,fd=4),("apache2",pid=2206,fd=4),("apache2",pid=2205,fd=4),("apache2",pid=2204,fd=4),("apache2",pid=2202,fd=4),("apache2",pid=2170,fd=4))
[Sat Aug  8 09:58:08 WITA 2020] Please stop it first
[Sat Aug  8 09:58:08 WITA 2020] _on_before_issue.
```

Stop dulu service `apache2` yang sedang berjalan, dengan cara berikut.
```bash
sudo service apache2 stop
```

---

### Port 80 terblokir

Apabila muncul pesan error seperti dibawah ini,
```log
[Sat Aug  8 10:15:52 WITA 2020] Standalone mode.
[Sat Aug  8 10:15:52 WITA 2020] Single domain='contoh.com'
[Sat Aug  8 10:15:52 WITA 2020] Getting domain auth token for each domain
[Sat Aug  8 10:15:55 WITA 2020] Getting webroot for domain='contoh.com'
[Sat Aug  8 10:15:55 WITA 2020] Verifying: contoh.com
[Sat Aug  8 10:15:55 WITA 2020] Standalone mode server
[Sat Aug  8 10:16:00 WITA 2020] Pending
[Sat Aug  8 10:16:03 WITA 2020] Pending
[Sat Aug  8 10:16:05 WITA 2020] Pending
[Sat Aug  8 10:16:08 WITA 2020] contoh.com:Verify error:Fetching http://contoh.com/.well-known/acme-challenge/bYQS7C58B7onTpHPDj6gBi2YBmcOSY4zhvne51QQUz0: Timeout during connect (likely firewall problem)
[Sat Aug  8 10:16:08 WITA 2020] Please add '--debug' or '--log' to check more details.
[Sat Aug  8 10:16:08 WITA 2020] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
```

Pastikan firewall server tidak memblokir port `80`, jika firewallnya menggunakan `ufw` jalankan perintah berikut secara berurutan.
```bash
sudo ufw allow http
sudo ufw allow https
sudo ufw reload
```
Cara membuat jail fail2ban untuk Nextcloud
Tags: ubuntu, nextcloud, fail2ban
Published: 2022-05-20 21:24:39

## Instalasi fail2ban

Jalankan perintah berikut secara berurutan untuk menginstall `fail2ban`.

```bash
sudo wget -q https://github.com/fail2ban/fail2ban/releases/download/0.11.2/fail2ban_0.11.2-1.upstream1_all.deb
```
```bash
sudo apt install ~/fail2ban_0.11.2-1.upstream1_all.deb
```

Selanjutnya untuk mengecek status `failban` apakah berjalan dengan baik, jalankan perintah berikut.
```bash
sudo systemctl status fail2ban
```

Sedangkan untuk mengecek versi `fail2ban` yang terpasang, dapat dicek dengan perintah berikut.
```bash
fail2ban-client -V
```

---

## Konfigurasi fail2ban
### Membuat filter untuk Nextcloud

Jalankan perintah berikut ini, untuk membuat sebuah filter `fail2ban` bernama `nextcloud.conf`.
```bash
sudo nano /etc/fail2ban/filter.d/nextcloud.conf
```
Salin dan isi file dengan baris dibawah ini.
```conf
[Definition]
_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*)
failregex = ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Login failed:
            ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Trusted domain error.
datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?"
```
Simpan file tersebut.

### Membuat jail untuk Nextcloud

Jalankan perintah berikut ini, untuk membuat sebuah jail `fail2ban` bernama `nextcloud.local`.
```bash
sudo nano /etc/fail2ban/jail.d/nextcloud.local
```
Salin dan isi dengan baris dibawah ini.
```conf
[nextcloud]
backend = auto
enabled = true
port = 80,443
protocol = tcp
filter = nextcloud
maxretry = 3
bantime = 86400
findtime = 43200
logpath = /var/www/nextcloud/nextcloud.log
```
Cara membuat jail fail2ban untuk Gitea pada Ubuntu 20.04
Tags: ubuntu, gitea, fail2ban
Published: 2022-05-20 21:15:19

Pada artikel ini akan ditunjukkan cara instalasi serta konfigurasi filter dan jail `fail2ban` untuk Gitea.

---

## Instalasi fail2ban

Jalankan perintah berikut ini, untuk melakukan instalasi `fail2ban`.
```bash
sudo apt install fail2ban -y
```

---

## Konfigurasi

### Membuat filter `fail2ban`

Buat filter `fail2ban` untuk Gitea dengan cara berikut.
```bash
sudo nano /etc/fail2ban/filter.d/gitea.conf
```

Salin dan isi file `gitea.conf` dengan baris dibawah ini.
```conf
# gitea.conf
[Definition]
failregex =  .*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).* from <HOST>
ignoreregex =
```

---

### Membuat jail `fail2ban`

Buat jail `fail2ban` untuk Gitea dengan cara berikut.
```bash
sudo nano /etc/fail2ban/jail.d/gitea.conf
```

Salin dan isi file diatas dengan baris dibawah ini.
```conf
[gitea]
enabled = true
filter = gitea
logpath = /var/lib/gitea/log/gitea.log
maxretry = 10
findtime = 3600
bantime = 900
action = iptables-allports
```

Kemudian lakukan restart.
```bash
sudo systemctl restart gitea
```

---

### Pengaturan pada `nginx` server

> Pengaturan ini hanya dijalankan pada server yang menggunakan `nginx` saja. 

Jalankan perintah berikut untuk mengubah file yang dibutuhkan. Pada artikel ini, domain yang digunakan adalah `git.contoh.com`.
```bash
sudo nano /etc/nginx/sites-enabled/git.contoh.com
```

Tambahkan baris berikut pada file tersebut, abaikan jika sudah ada.
```conf
proxy_set_header X-Real-IP $remote_addr;
```

Simpan perubahan pada file tersebut, dan restart `nginx`. Langkah ini tidak perlu dilakukan jika tidak ada perubahan pada file diatas.
```bash
sudo systemctl restart nginx
```
WhatsApp globally launches Cloud API for its Business Platform
Tags: news, cloud, api, discuss
Published: 2022-05-20 20:56:51

For years, the WhatsApp Business Platform has been available as an on-premise service and has been adopted by companies around the world. After several months of beta testing, Meta's CEO Mark Zuckerberg announced the general availability of WhatsApp Cloud API at the Conversations Event. 

WhatsApp Business Platform is a way for medium to large businesses integrates WhatsApp into their automation workflow. With the announcement, Meta expects Cloud API to help smaller businesses have a usable WhatsApp integration with the latest features in a short amount of time while avoiding all expense and complexity of managing an on-premise service. The cloud-based service is hosted on Meta's infrastructure and can scale as you go. 

As [WhatsApp is a popular communication platform with more than a billion users](https://blog.whatsapp.com/two-billion-users-connecting-the-world-privately), it is great for businesses to connect with the customers, and use cases can vary from direct support communication for customers to sending messages of personalized services, product order updates, and much more.

___

Interested in web development? My other articles might be helpful to you!

- [JavaScript Promise Chaining - Avoid Callback Hell](https://hungvu.tech/javascript-promise-chaining-avoid-callback-hell)
- [Front end, top frameworks and libraries you should know](https://hungvu.tech/front-end-tech-stack-components)

---

You can also take a look at [WhatsApp Cloud API documentation](https://developers.facebook.com/docs/whatsapp/cloud-api) for more information.
3 incredible Flutter open source projects you have to take a look at!
Tags: flutter, repository, fluttertips
Published: 2022-05-20 19:41:00

Everyone knows you can learn a lot from GitHub, but today I'm going to introduce you to **3 incredibly good Dart** & **Flutter** **repositories** from which you can **learn** something **immediately**!

Let's get right into it!

**Happy reading!**

# [DevFolio](https://github.com/mhmzdev/DevFolio)
Having a **portfolio** is always great, but sometimes it's hard to get started. This repository gives you the opportunity to learn how to make your portfolio responsive, make it look nice and much more. But not only that, you can also learn many other things from it. For example, how to play beautifully tuned animations in the beginning, how to make typewriter animations and much more. It's definitely worth checking out this repository!

# [Flutter Roadmap](https://github.com/Tomic-Riedel/Flutter-Roadmap)
This repository is **the best** to be found in this list. You can learn just about **everything** here. Here you get the best articles, YouTube videos etc. on certain topics. This repository is for beginners as well as advanced learners. Here is a small list of the big things you can learn: 

- Routing & Navigation
- Responsive Design
- App Architecture
- Backend Technologies
- State Management
- Local Databases
- Error Handling
- animations

 And when I say much more, I mean that this repository contains more than **35 topics**. I think that alone speaks for itself.

# [Flutter tips and tricks](https://github.com/vandadnp/flutter-tips-and-tricks)
This repository in combination with the previous repository will make you a real flutter expert. Here you get a lot of good tips summarised. So you know how many Flutter hacks you get here: The README of the project (where all the tips are) has more than 2000 lines. I can tell you that's a lot of tips!

# Conclusion
There are many repositories about Flutter with many tips & tricks. These 3 were my favourites. If this article gets **100 Claps** there will be another part, so hit the clap button as often as you can ;)

My personal reading recommendation if you liked this article:  [4 extremely useful Flutter tips, that you can use right away!](https://medium.com/p/57686f1e3707)

Thanks for reading, **have a nice day**!
Share the ️Love ️— What's your favorite #gamedev post on DEV?
Tags: discuss, bestofdev, gamedev
Published: 2022-05-20 19:37:15

_I've started up a new series called "[Share the Love](https://dev.to/michaeltharrington/series/18201)" where I'm encouraging y'all to drop your favorite post under a particular tag and @mention the author. Why? Cause it's a fun way to collect a lot of great posts in one spot and it gives folks a platform to give each other shoutouts. If you get tagged in, consider paying it forward to another author on the site — share the love, get it._ 🙌

![one smiley face with lovey eyes in the middle and other smiley faces catching on with their own lovey expressions... the words "share the love" appear soon after](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hexsd23t70s3e2rgfzhc.gif)

## What's your favorite post shared under #gamedev?

So, I like to hear, what are everybody's favorite posts shared under [#gamedev](https://dev.to/t/gamedev)?

{% embed https://dev.to/t/gamedev %}

Please consider giving the author an @mention when ya share their work as it's likely gonna give them the feel-goods. 😀

> Note: you can embed a post into a comment by writing the following syntax.
>
> `{% embed dev.to/username/name-of-post %}`

Alright, now time to hunt down that favorite [#gamedev](https://dev.to/t/gamedev) post you'd like to highlight! Share the love! ❤️
3 incredible Flutter open source projects you have to take a look at (German version)
Tags: flutter, repository, fluttertips
Published: 2022-05-20 19:33:41

Jeder weiß, dass man viel von GitHub lernen kann, doch heute stelle ich dir 3 unglaublich gute Dart & Flutter Repositories vor, von denen du sehr viel lernen kannst.

Lass uns direkt anfangen!

**Happy reading!**

# [DevFolio](https://github.com/mhmzdev/DevFolio)
Ein Portfolio zu haben, ist immer großartig, doch manchmal ist es schwer, damit anzufangen. Dieses Repository gibt dir die Möglichkeit, zu lernen, wie du dein Portfolio responsive machen kannst, es schön aussehen lässt und vieles mehr. Doch nicht nur dass, du kannst auch viele Dinge daraus lernen. Zum Beispiel, wie du am Anfang wunderschön abgestimmte Animationen abspielst, typewriter Animationen machst und vieles mehr. Es ist auf jeden Fall empfehlenswert, sich dieses Repository mal anzuschauen!

# [Flutter Roadmap](https://github.com/Tomic-Riedel/Flutter-Roadmap)
Dieses Repository ist **das Beste**, welches in dieser Liste vorzufinden ist. Hier kannst du so gut wie **ALLES**  lernen. Hier bekommst du die besten Artikel, YouTube Videos u.A. zu bestimmten Themen zusammengefasst. Dieses Repository ist sowohl für Beginner gedacht, als auch für Fortgeschrittene. Hier ist eine kleine Liste der großen Dinge, die du lernen kannst: 

- Routing & Navigation
- Responsive Design
- App Architecture
- Backend Technologien
- State Management
- Local Databases
- Error Handling
- Animationen
 Und wenn ich sage, noch vieles mehr, dann meine ich, dass dieses Repository mehr als **35 Themen** beeinhaltet. Ich denke schon alleine das spricht für sich selbst.

# [Flutter tips and tricks](https://github.com/vandadnp/flutter-tips-and-tricks)
Dieses Repository macht dich in Kombination mit dem vorherigen Repository zu einem richtigen Flutter Experten. Hier bekommst du so wiele gute Tipps zusammengefasst. Damit du weißt, wie viele Flutter Hacks du hier bekommst: Die README des Projekts (wo alle Tips drinstehen) hat mehr als 2000 Zeilen. Ich kann dir sagen, dass sind extrem viele Tipps!

# Conclusion
Es gibt sehr viele Repositories über Flutter mit sehr viele Tipps & Tricks. Diese 3 waren meine Favoriten. Ab **100 Claps** gibt es einen weiteren part, also schlage den Clap button schwarz so oft du kannst ;)

Meine persönliche Lesempfehlung, wenn dir dieser Artikel gefallen hat:  [4 extremely useful Flutter tips, that you can use right away!](https://medium.com/p/57686f1e3707)

Danke fürs lesen, **ich wünsche dir noch einen schönen Tag!**
A free, remote conference for Hugo — HugoConf 2022!
Tags: hugo, webdev, jamstack, conference
Published: 2022-05-20 19:28:41

---
canonical_url: https://hugoconf.io/
---

[Hugo](https://gohugo.io/) is the fastest static site generator out there, and it’s past time we celebrated it, as well as the developers, agencies and contributors who make the most of it.

{% embed https://www.youtube.com/watch?v=BN1BcoY8mD4 %}

##Submit your Talk or Workshop before June 15th

If you’d like to speak at HugoConf, you can choose between a Lightning Talk (5 mins) and a Tech Talk (25 mins). We’re also hosting Workshops (45 mins) if there’s a Hugo feature you’d love to share with the community.

All talks will be pre-recorded — we know fixed conference dates aren't for everyone. We're particularly interested in hearing from under-represented and beginner Hugo users — so don't worry if you're not an expert. If you've used Hugo to make something that you find interesting, chances are we will too!

## A Conference for all Hugoers

HugoConf organizers are dedicated to providing a safe, inclusive and harassment free environment for all attendees. Please review our [code of conduct](https://hugoconf.io/code-of-conduct), and help build the community by being supportive and constructive.

If you have any questions or suggestions, reach out to **[team@hugoconf.io](mailto:team@hugoconf.io)**.

##Help us Organize

We're looking for members of the community to help plan and run the conference on the day.

If you're interested in participating in any capacity, [get in touch](mailto:team@hugoconf.io)!

We'd love your help.

##FAQs

**Where is HugoConf held?**

At [hugoconf.io](https://hugoconf.io/). On July 8th, we'll stream the sessions directly on the page.

**I can't attend! 😭 Will the talks and workshop videos be available to watch later?**

Yes, all sessions will be recorded and publicly available on YouTube.