teleren/devto huggingface dataset:
Chuyên tư vấn lắp đặt camera
Tags: camera
Published: 2022-11-29 02:35:02

Lắp đặt camera wifi tại nhà là giải pháp giám sát tiện lợi và tiết kiệm nhất hiện nay vì chỉ cần số tiền nhỏ là bạn đã mua được camera wifi giá rẻ rồi. Tuy nhiên, giải pháp này chỉ phù hợp với khu vực nhỏ cần từ 5 camera trở lại mà thôi. 
[camera quan sat](https://lapcameraquan1.com)
[lap camera gia re ](https://camerasaigon24h.com/Lap-Dat-Camera-Gia-Re_cv315)
[lap camera wifi](https://lapcamerawifi.com)

 MUA NGAY
Camera giám sát wifi sẽ hoạt động dựa trên mạng internet không dây, điều này sẽ giúp người dùng có thể tự lắp đặt camera tại nhà hoặc có thể đặt ngay dịch vụ lắp đặt camera trọn gói tại nhà ở TPHCM của An Thành Phát với mức phí CỰC RẺ.


ƯU ĐIỂM khi chọn giải pháp lắp camera quan sát không dây
Dễ đầu tư: camera an ninh wifi rẻ hơn rất nhiều so với đầu tư hệ thống camera có dây vì bạn không cần đầu tư đầu thu hình, dây tín hiệu, ổ cứng,… Càng tiện lợi hơn nếu nhà bạn đã có sẵn mạng Wifi không dây và điện thoại smart-phone thì chỉ cần mua camera + thẻ nhớ là sử dụng được ngay



[camera gia re](https://lapcamerawifi.com/Tu-Van-Lap-Camera-Gia-Re.vn)

[lap dat camera gia re](https://lapcamerawifi.com/Tu-Van-Lap-Camera-Gia-Re.vn)
[lap camera quan sat gia re](https://giacameraquansat.com/Gia-Lap-Camera-Chinh-Hang.vn)

[lap camera gia re](https://cameraquansatre.com/Lap-Camera-Gia-Bao-Nhieu.vn)

[lap camera gia re chinh hang](https://lapcameraquan1.com/Lap-Camera-Gia-Re-Gia-Dinh.vn)


[lap camera gia re](https://lapcameraquan2giare.com/)

[lap dat camera gia re uy tin](https://lapdatcameraquan6.com/Chuyen-cung-cap-camera-giam-sat-gia-re-uy-tin.vn)

Nhiều tiện ích: bạn có thể trải nghiệp được các tính năng như: Xoay 360, đàm thoại đa chiều, ghi hình sắc nét, cảnh báo trộm qua diện thoại, xem camera mọi lúc mọi nơi,…

Dịch vụ Lắp đặt camera tại TPHCM với quy trình chuyên nghiệp 
Lắp đặt camera tại TPHCM có quy trình lắp đặt chuyên nghiệp được thực hiện bởi các kỹ thuật viên của An Thành Phát. Hãy cùng xem qua quá trình An Thành Phát thực hiện việc lắp đặt camera trọn gói tại nhà gồm những công đoạn nào nhé! 

Khảo sát khu vực – chọn vị trí lắp đặt – lập bản vẽ đường dây
Lập báo giá camera chi tiết , trao đổi nhiệt tình – Thỏa thuận thời gian, địa điểm, chi phí

Tiến hành lắp đặt camera trọn gói cho khách hàng tại nhà
Camera quan sát có dây dành cho công ty, văn phòng
🎮 Retro Gaming x 🐍 Python
Tags: python, showdev
Published: 2022-11-29 02:31:27

Hi Dev.to 👋,

I wanted to share a project I've been working on. It's a CLI tool that scrapes Roms from archive.org sources. I wrote it in Python as an exercise to learn more of it, so if I'm not adhering to best practices, please let me know!!

![Project maelstrom in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9v1t75th62nj30gxp1tp.gif)

I'd also like to share that I'm a huge retro gaming junkie and if you'd like to follow me on Retro Achievements, you can do so here ➡️ [https://retroachievements.org/user/noot](https://retroachievements.org/user/noot)

If any other retro gamers want to contribute I'm always welcoming PRs 😁

EDIT: I forgot to post the project URL.. oops! 

[https://github.com/devnoot/maelstrom](https://github.com/devnoot/maelstrom)
Re: these posts
Published: 2022-11-29 01:59:04

I've always struggled with keeping good notes and referencing them down the line. Likely comes from developing bad study habits growing up (did well enough in HS and college that it was okay), but it just seems like more and more stuff becomes harder to learn. Having bad notes is especially true for CS concepts because so much of the knowledge-gap patching comes from Googling, meaning I don't even take notes most of the time. And while I do keep a running notebook on things I've learned while doing work-related stuff, because it's a physical item, it's not searchable, making it really hard to go back to find the info I want.

My intention with these posts is to have one location for all those learning moments. This way I have a convenient reference if I've forgotten something. It can also serve as a reminder of all the things I've learned over the years.

A related intention would be to document my feelings and thought processes over the years. Perhaps I will be able to see the things I used to think were hard but now are not.
Ruby and OOP
Tags: ruby, oop, beginners, programming
Published: 2022-11-28 21:38:02

3 weeks ago, I started learning the programming language Ruby, as well as started to get comfortable with Object-oriented programming.  The first week was a bit of an adjustment for me because I didn't know what to expect from Ruby. For the first couple phases, as well as my prep course, we learned JavaScript, so learning Ruby, SQL, Active Record, and plenty of other concepts was fairly difficult. One thing that helped me though, was really focusing on Object-oriented programming, and linking my learning to the concepts of these objects and classes. 

Object-oriented programming (OOP) is a programming paradigm that uses objects and their interactions to design and program applications. It is one of the most popular programming paradigms and is used in many languages, including Ruby. OOP has several benefits over other programming paradigms, such as improved code reusability and readability.

There are many benefits to using object oriented programming, or OOP. OOP allows for code reuse, which means that once you have written a piece of code, you can use it again in other programs. OOP also makes it easy to create modular code, which is code that is organized into small, self-contained units. This makes it easy to debug and test code, because each module can be tested separately. Finally, OOP can make code more readable and easier to understand.

Ruby is an object-oriented programming language that allows programmers to create and use objects in their code. Objects are created from classes, which are blueprint definitions that describe the object's characteristics and behavior. Once an object is created, it can be used in code just like any other data type. Ruby's object-oriented features make it easy to create and use complex data structures.

When working with Ruby and Object Oriented Programming, it is important to set up your class in a way that is logical and easy to understand. In most cases, you will want to start by defining your class and its methods in a separate file, and then require that file in your Ruby program. You can also use the Ruby Object class to create a new class, but this is not always necessary. Once you have your class setup, you can start adding objects to it by using the new method.

When working with these classes, there were a few ways that I like to keep everything straight in my head. I liked to make a map with all of my databases, all of their relationships, and all of the functions I would be able to access within these relationships. It is similar to writing an essay outline so that I have a clear framework to work off of. 

Well that's the gist of what I learned about Ruby and what OOP are! By sticking to the concepts and logic, I was able to work better through this difficult phase. Thanks for reading!
The new social medias that leaves you in awe
Tags: bleepr, bleep, socialmedia, webdev
Published: 2022-11-29 00:55:44

Creating contents that makes it big time could be a hassle nowadays, especially with the internet filled with so many social media sites that it's increasingly becoming harder to choose from. Well, here's a list of social medias with their own unique features:

---

1. [Dribbble](https://dribble.com)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sl8ycrrn44wguwm5dlyd.png)

If you are a UI designer or a product designer looking for a social media to get likeminds and share your work, then dribbble is the right social media for you

- For Designers. Portfolio creation made easy.

- For Freelancers. Fresh leads in your inbox every day.

- For Teams. Build your team's pipeline or profile.

And if you are a web developer looking for inspiration for your next project, you could check out dribbble. It's open source and free to download graphics.

2. [Snipplr](www.snipplr.com)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fwrgrtj10bablhfyteh.jpg)
Snipplr is a site for web developers, to get code snippets of all kinds, it got popular 2022 and since then it has gone head on with the likes of stack overflow, Reddit and Quora.

3. [Bleepr](https://bleepr.web.app)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6l4jhd5er9jc2ni3cvfq.png)

If you're a content creator, then this is certainly a game changer for you. Well, there's a saying that goes "you are what you eat" but in this case you earn what you create. You get paid for your contents on bleepr, weekly and you level up with the amount of interactions you get. 
Bleepr tiers includes:

- First class tier ($100 - $300)/week

- Second class tier ($50 - $150)

- Third class tier ($10 - $100)/week

Now isn't that just a game changer for content creators?


Leave a comment and like ❤️ 📌
Blocked for 2 Months 2 Weeks and Counting
Published: 2022-11-29 00:19:35

## An Early Lesson

In my early days of professional programming I ran into a bug. The open function was executing unexpectedly and closing the dialog unexpectedly, or the close function was executing and opening. Something like that. So I learned to `setIsOpen(false)` or `setIsOpen(true)`, but never `setIsOpen(!isOpen)`. I always let other devs `setIsOpen(!isOpen)` though. It's really not a high risk thing.

## Over-Engineering Something Minuscule

So much later I felt like doing type first development on the silly thing just for kicks. This was my TypeScript type definition that acted as contract to hide internal logic, even if it's overkill. (It is overkill and I always knew it.)

```
type IsOpen =
  | {
      isOpen: true;
      close: () => void;
    }
  | { isOpen: false; open: () => void };
```

Does this force you to write an if statement or ternary expression to access the close or open function, yes it does. Is that ridiculous since calling closed when it's already closed (or open when it's already open) harmless? Of course. Knowing this did I commit it and let it go to production, yes I did.

## Impediments

But am I a little impatient and not understanding now that somebody has objected to past over-engineering and impeded my progress on an unrelated pull request that was limited to fixing TypeScript errors and adding scripts to aid in development? Yes. The PR is intended to be a minimal one to aid me in the development of all subsequent 50 PRs. This low risk PR has already passed QA twice with 3 separate sessions of QA and refactoring the code has now required an unnecessary 4th QA session.

I have been aggregating minimal changes required to write unit tests and pass quality gates for 2 months and 2 weeks, unable to get PRs reviewed, approved, tested, and finally merged. 4 weeks ago I switched to a different repository and created over 50 micro PRs. It didn't help. I have previously been coding for about 10 years and this has never happened to me.

## Advice

When reviewing PRs, make as many things optional as possible. Start your comment with "Optionally, ". If you feel like it has to be changed before merging, offer to create a PR into theirs upon request. If you feel like it has to be changed but can wait, it can probably wait until you or another developer thinks the same thing and is touching it. Always state clearly that something is or isn't required for PR completion and precisely what is required. But above all, be flexible enough to allow a PR with no runtime risks to be completed.

Also, in my not so humble opinion, look into continuous delivery until you become convinced it can work and it can work well.
Native logging for your NPM package
Tags: node, npm
Published: 2022-11-29 19:21:30

---
title: Native logging for your NPM package
published: true
date: 2022-11-29 00:00:00 UTC
tags: ['nodejs', 'npm']
canonical_url: https://lepape.me/native-logging-for-your-npm-package
---

When working with nodejs, if you are coding a NPM package, you might want to keep your package *light* but with basic logging.

One use-case could be you want your package to have 0 dependency, but allow the package's users to enable logs only when they need it. By default, any `console.*` in the code will appear in the output.

There is a native nodejs way with the `util` package, and especially the [debuglog](https://nodejs.org/api/util.html#utildebuglogsection-callback) function.

Let's have a look to a simple example:

```js
// ./index.js
const log = require('node:util').debuglog('foo')
log('starting package!')
```

This won't show any output unless you run it with the correct flag: 

`NODE_DEBUG=foo node index.js`. 

When debugging, you can add the flag `NODE_DEBUG=foo` to your NPM scripts (such `npm run dev`) to see all outputs. Make sure to let your users know, in order for them to see the logs when using/debugging the package.

There is as well a wildcard mode to match all custom logging you could create:

```js
// index.js - node v18.11.0
const util = require('node:util')
const log = {
  network: util.debuglog('foo-network'),
  verbose: util.debuglog('foo-verbose')
  // <-- extend it to improve your logging!
}

log.verbose('starting package!')

new Promise(resolve => setTimeout(resolve, 2000))
  .then(_ => log.network('network call done'))
```

With the following outputs:

```sh
~ ❯ NODE_DEBUG=foo* node index.js
FOO-VERBOSE 23347: starting package!
FOO-NETWORK 23347: network call done

~ ❯ NODE_DEBUG=foo-network node index.js
FOO-NETWORK 23400: network call done
~ ❯
```

1st time was run with the wildcard on. And the 2nd time, in an imaginary scenario where the user would only need the NETWORK logs.

It is a good practice to namespace the section you pass to `debuglog` with your package name toallow granular debuging.

Fun fact, if you run a nodejs script with all debug logs activated (NODE_DEBUG=*), you can get more information on your script:

```sh
~ ❯ NODE_DEBUG=* node index.js
MODULE 23530: looking for "/Users/francois/index.js" in ["/Users/francois/.node_modules","/Users/francois/.node_libraries","/usr/local/Cellar/node/18.11.0/lib/node"]
MODULE 23530: load "/Users/francois/index.js" for module "."
MODULE 23530: Module._load REQUEST node:util parent: .
MODULE 23530: load built-in module node:util
FOO-VERBOSE 23530: starting package!
TIMER 23530: no 2000 list was found in insert, creating a new one
TIMER 23530: process timer lists 2087
TIMER 23530: timeout callback 2000
TIMER 23530: 2000 list empty
FOO-NETWORK 23530: network call done
```

> ℹ️ Tip 1: if you need more options like adding colors, have a look to the [debug](https://www.npmjs.com/package/debug) package.

> ℹ️ Tips 2: `util.debuglog` has an alias with `util.debug`! 😎
Data Structures: Linked Lists
Tags: javascript, beginners, algorithms
Published: 2022-11-28 23:25:43

Today we are going to travel through crazy linked lists!


{% embed https://stackblitz.com/edit/js-nlivnb?ctl=1&devToolsHeight=33&embed=1&file=index.js&hideExplorer=1&hideNavigation=1&theme=dark %}
Kim Jong-un, the leader of North Korea, has stated that his nation’s nuclear arsenal will be the most powerful in the world.
Published: 2022-11-28 23:10:06

North Korea’s “ultimate goal” is to be the world’s most powerful nuclear force, Kim Jong Un has said.

The North Korean leader promoted dozens of military officers involved in the recent launch of a new ballistic missile, state media reported.

State media reported on Sunday that North Korean leader Kim Jong Un stated that his country aspires to have the world's most formidable nuclear force as he promoted scores of military commanders involved in the recent launch of a new ballistic missile.
[Read More](https://trendingsearchs.com/kim-jong-un-the-leader-of-north-korea-has-stated-that-his-nations-nuclear-arsenal-will-be-the-most-powerful-in-the-world/)
Learn to Code by NOT Doing What Everyone Else Does
Tags: webdev, beginners, programming, codenewbie
Published: 2022-11-28 22:41:24

---
title: Learn to Code by NOT Doing What Everyone Else Does
published: true
description: Most people learn to code by learning web development, but is that the best way?
tags: webdev, beginners, programming, codenewbie
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x399h0mg0qvemvbrom2s.png
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-28 21:29 +0000
---

{% embed https://www.youtube.com/watch?v=A2OXrx4N2fQ %}
Transcribe any podcast in 1 minute with serverless Python
Tags: python, serverless, podcast, machinelearning
Published: 2022-11-28 22:06:03

{% embed https://twitter.com/bernhardsson/status/1597344306008055815?s=20&t=P0RTA8EWP3ztnQ8vYA3e9Q %}

In late September [OpenAI](https://openai.com/research/) publicly released a shockingly good speech-to-text AI model. Pretty soon after that I began working on using it to make a podcast transcriber tool. I'm a big podcast listener (probably 10+ hrs a week) and I'm keen to hear any feedback you have on the tool.

[modal-labs-whisper-pod-transcriber-fastapi-app.modal.run](https://modal-labs-whisper-pod-transcriber-fastapi-app.modal.run/#/)

Here's some videos showing how it works.

* [**Video showing the transcription of _Serial season 2 episode 1_ in just 62 seconds**](https://user-images.githubusercontent.com/12058921/199637855-d98bcabe-bff4-433b-a58f-1e309d69e14d.mp4)

* [**Video showing how to go from a transcript segment back to the original audio**](https://user-images.githubusercontent.com/12058921/199637370-1cb1e070-8f60-4cc6-8c51-dc42bebcf29d.mp4)

If you're interested in the technical details, you can [read more in a **blog post**](https://twitter.com/bernhardsson/status/1597344306008055815?s=20&t=P0RTA8EWP3ztnQ8vYA3e9Q).

This is built only with `.py` code. No YAML, C++, Dockerfile, nothing like that, just Python.
CSS
Tags: css, beginners
Published: 2022-11-28 21:54:09

While the window of time is short it is stunning to look at a timeline of the progress and steps it took for CSS to stand as it is today.  From 1990 when the first iteration of the WorldWideWeb came into fruition as thr first browser, its baffling to see that a short 4 years later the idea of CSS was first proposed.  While it took two years until CSS was first officially published, the use of it would push forward and continue to be used till today.  All the while CSS has gone through so many updates its exhausting to pen through each change, but it speaks to the volumes of work that went into developing what we use today.  The timeline can be found  here https://css-timeline.vercel.app/ .
What is your favorite way to learn?
Tags: discuss
Published: 2022-11-28 21:15:10

---
title: What is your favorite way to learn?
published: true
description: How do you prefer to learn a new language, product, or tool?
tags: discuss
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-28 21:11 +0000
---

What is your favorite way to learn a new language, product, or tool? 

For me, I prefer hands-on, with nearly all self discovery and as little guidance (written or instructor-led) as possible. 

This helps me understand if something will be intuitive for me (and therefore I can budget a smaller amount of time or non-focused time) or if I need to dedicate a significant amount of focused time and energy, or even find instructor-led or curated options for learning.

How do you learn? Or maybe the better question, how do you prefer to learn?
Simple Round-Robin Network with Docker
Tags: beginners, docker, showdev, tutorial
Published: 2022-11-28 21:06:40

##☁️Cloud Fundamentals Helping with Local Networking?
After studying and passing the AWS Solutions Architect & Developer Associate exams, seeing that Docker creates what amounts to a VPC locally really surprised me. My cloud and networking fundamentals are helping me better understand how a program running locally works? Well, when you go back to the basics and remember that a VPC is essentially a fancy AWS-account contained (at least by default) LAN, then it all makes sense.

##🎯Learning Target
The objective for this small project is exactly what the title says, create a simple round-robin network with Docker. Success means pinging the same alias and not getting the same container back every time.

###👶Explain Like I'm 5
Every time you connect to google.com, you're not loading the same server. Google has some fancy routing, but when it's broken down all the requests are distributed to different servers. This is called load balancing. Round-robin load balancing is a specific type of load balancing. Of course, Google's implementation of load balancing is leaps and bounds more efficient than what I'm doing here. Consider this a "poor man's load balancer."

##⏮️Prerequisites
📌 Docker Engine + CLI installed

##⭐Let's Begin
Docker creates a virtual network automatically. This network is composed of three networks: bridge, host, and none. We want all of our traffic to be isolated from the default network to show that our round-robin network is doing what it should be doing.

![The default Docker network](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bo8z6l7okxadvitgc3a0.png)

######Step 1
Create a virtual network in Docker. We want to isolate our containers-to-be away from the default Docker "bridge" network.

`docker network create rr-net`

![Default Docker network + created net](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nw4guxypfob67w8orhfy.png)

######Step 2
Create two elasticsearch v2 containers and give them the same alias. This way, when we start to lookup the alias, we will see if the network traffic is routed correctly. We use elasticsearch v2 for a few reasons. It's not very large, opens on the same port, and it responds as JSON with the data we need when hit with a cURL request.

`docker container run -d --network rr-net --network-alias search elasticsearch:2`


![Successful elasticsearch v2 creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apb6mmufg9fkdu8qk5w0.png)

######Step 3
Create a CentOS 7 container with an interactive bash shell connected to the round-robin network.

`docker container create --network rr-net -it centos bash`

######Step 4
Run the curl search a few times and see if the "name" field changes.

`curl -s search:9200`


![Success!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vn68vremrm5dn9lp2iy.png)

##✅Wrap Up
In this lesson, I showed how to create a simple round-robin network using Docker's virtual networks. Docker is proving to be an invaluable tool and I am looking forward to seeing how I can use it in future write-ups.
Passing multiple arguments to golang sub-templates
Tags: go, template, arguments
Published: 2022-11-28 21:04:31

---
title: Passing multiple arguments to golang sub-templates
published: true
description: 
tags: go, golang, template, arguments
cover_image: https://miro.medium.com/max/4800/0*YIWeYQPpPm_bOwVP.png
---

Have you ever wanted to pass multiple arguments to a go sub-template? If you google it you'll be convinced it's not possible. But bear with me.

In go templates you can pass a single "argument" (pipeline in go parlance) to a "sub-template" defined block. But by creating a simple helper function you can pass as many arguments as you want. Simply add this function to your `FuncMap`:

```go
func(els ...any) []any {
    return els
}
```

And you'll be able to create constructs such as:

```go
{{ template "MyTemplate" (arr "first" 123 .Some.Value) }}
{{ template "MyTemplate" (arr "second" 456 .Other.Value) }}

{{ define "MyTeplate" }}
  {{ $strArg := index . 0 }}
  {{ $intArg := index . 1 }}
  {{ $valArg := index . 2 }}

  This is my str {{ $strArg }} parameter.
  ...
{{ end }}
```

I named `arr` my helper func, but you can call it whatever you want.

Enjoy!