teleren/devto huggingface dataset:
Never run `bundle exec` or use `bin/` again with these two easy steps
Tags: ruby, rails, tutorial, productivity
Published: 2021-12-09 07:30:01


## Step one:

**Add `PATH=".git/safe/../../bin:$PATH"` to your PATH**

If you're using bash or zsh:

```zsh
echo 'PATH=".git/safe/../../bin:$PATH"' >> ~/.$0rc
```

If you're using fish,

```zsh
fish_add_path -p ".git/safe/../../bin"
```

## Step two:

In your Ruby project directory, and any subsequent Ruby project directories, run `mkdir .git/safe`.

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

Voila! Props to @thorncp for telling me about this and props to the legendary Tim Pope for coming up with it (I believe)
App & Future
Published: 2021-12-09 07:29:31

App:

If I could build an app, it would be an artificial intelligence powered therapy app. Depression and anxiety is prevalent these days and some disadvantaged populations couldn't afford therapy. With the AI-powered conversational therapy app they will find comfort and peace. The app will take the user's income level, nationality, race, gender, sexual orientation marital status, educational attainment, job, age, health status, income level into account to deliver personified therapy services. The user can first choose their problems from several board categories and then start chatting with the therapy bot. The user can also choose the style of their digital therapist. The input of this app would be tens of thousands of therapy records and therapy tactics taught in medical schools. There will also be real therapists options if the app doesn't work. The app will also provide online support groups for people with similar backgrounds and problems. Each of these groups will have professional licensed therapists serving as coordinators. Weekly group therapy will be held based on the information in the group chat. This service can greatly reduce the cost of therapy compared to individual ones. The recent metaverse hype can also be useful building the app. People can interact with people with similar backgrounds in the virtual reality environment to reduce their loneliness.

The major constraint for this app is that the AI-powered part of the therapy might not be able to produce satisfying results. But I believe with more and more feedback from the users and expert therapist, combined with efforts from computer scientists, the app could be more and more efficient and useful for the patients. 


Future:

If income did not matter, if time did not matter, if all careers were all valued the same, then I would want to be a human gene researcher for the rest of my life. Because humans are complicated and delicate creature with many aspects not well understood by today's scientists. Understanding human's genetic composition have the potential to revolutionize our life and our society. 

There are ethic and moral concerns around gene editing but I believe if those problems are solved there is a lot of potential in that technology. For example, we might be able to eradicate some fatal disease such as cancer. We might also be able to extend our life or prevent dementia and Alzheimer's in the older population. I believe there is a lot of potential in human gene research. Also it would be very interesting to understand the mechanism of yourself's body. Human gene research can also tell us more about human history and how we evolved to our current status. It remains somehow mysterious how we evolved step by step. Human gene research can further decode that history and help us understand ourselves better.
HTML tags | object
Tags: html, tags, object
Published: 2021-12-09 07:27:02

It represents an **external resource**, which can be treated as an image, a media player, a nested browsing context or a resource to be handled by a plugin. It can only `<param>` elements.

The `<object>` tag was originally designed to embed browser Plug-ins.
Most browsers no longer support Java Applets and Plug-ins. ActiveX controls are no longer supported in any browser. The support for Shockwave Flash has also been turned off in modern browsers.

* To **embed a picture**, it is better to use the `<img>` tag.
* To **embed HTML**, it is better to use the `<iframe>` tag.
* To **embed video or audio**, it is better to use the `<video>` and `<audio>` tags.

It can have three **implicit ARIA roles**: `application`, `document` or `image`.

## Attributes

### data
The address of the resource as a valid URL. At least one of `data` and `type` must be defined.

### form
The form element, if any, that the object element is associated with (its form owner). The value of the attribute must be an ID of a `<form>` element in the same document.

### height
The height of the displayed resource, in CSS pixels (absolute values only. NO percentages).

### name
The name of valid browsing context (HTML5) or the name of the control (HTML 4).

### type
The [content type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the resource specified by `data`. At least one of `data` and `type` must be defined.

### usemap
A hash-name reference to a `<map>` element; that is a `#` followed by the value of a `name` of a map element.

### width
The width of the display resource, in CSS pixels (absolute values only. NO percentages).

- Type: *block*
- Self-closing: *No*
- Semantic value: *No*

[Definition and example](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object) | [Support](https://caniuse.com/mdn-html_elements_object)
Contralert
Tags: actionshackathon21
Published: 2021-12-09 07:19:38

## Contralert
[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon 2021, please fill out all sections.)

{% youtube JXIDHynqHH4 %}

### My Workflow
Contralert is a utility device which produces different sound tones for every issue created, pull request opened, and pull request closed using Github Actions
[Note]: # (Please make sure the project links to the appropriate GitHub Actions repository, and includes [an open source license](https://choosealicense.com/) and README.)


### Submission Category: 
Interesting IoT


### Yaml File or Link to Code
{% github mayankofficial999/Contralert %}
[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)


### Additional Resources / Info
[Figma Link](https://www.figma.com/file/EAmoVJHJ0qbHAsxvfnhcMP/Contralert?node-id=0%3A1)

[Youtube Link](https://youtu.be/JXIDHynqHH4)
When your parents already predicted your future career :')
Tags: beginners, programming, tutorial, career
Published: 2021-12-09 07:02:54

You can be a programmer too! Here in Zuitt, we believe that coding is for everyone. Schedule a live consultation with us to learn more about our Developer Career Program.
 
Visit https://zuitt.co/global/?referral=2112-mdp-cnb and click apply now!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytblzsmmwl677sexe9vi.jpg)
How to Implement Fonts in Lit
Published: 2021-12-09 06:50:09


Fonts are an important factor when creating a web application. They play an important role when it comes to the appearance of your website.

To access fonts, you can write your own code or use a third party service.

Font Family
p {
font-family: Helvetica, "Trebuchet MS", Verdana, sans-serif;
}

Traditionally, fonts can be applied using HTML's font-family property. The system will traverse through the list of font-family values until it finds the one the coder identified. The downside is that the font choices are limited.

You can also import fonts in your CSS file. You can either use the CSS @import or HTML tag.

< link href="https://fonts.googleapis.com/css?family=Kaushan+Script&display=swap" rel="stylesheet">
Building a Web Component
Published: 2021-12-09 06:47:55

There are a lot of thing to consider creating a new web component. Elements, attributes, properties, accessibility for disadvantaged people, security, flexibility, functionality and stylization are all important aspects in a web components. In this post, I will go through some of these aspects and the process with an example.

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

As shown in the cards above, one card can be breakdown into several elements:

- the icon
- the banner with a header and sub-header and filled color
- slotted html content below the 

Project Gauge
As an outside view, creating this card component seems pretty manageable. One of our criteria is to implement the slot feature and we already have experience with that in our button project. My main concern is working with HAX. I don't have experience with HAX so there may be a learning curve for me there.
Solidityの数値の明示的な型変換の仕様をRustで試してみた
Tags: solidity, rust
Published: 2021-12-09 06:40:09

Solidityのドキュメントの[ここ](https://docs.soliditylang.org/en/v0.8.10/types.html#explicit-conversions)に書いてある内容について、Rustも同じ仕様なのか？などを試してみました。

### マイナスのintをuintに変換する

```rust
let a:i8 = -3;
println!("a:{}", a as u8);
```
#### 結果
a:253

Solidityと同じ結果でした。256を足すと答えが出るみたいになってる。

---

### u32をu16に変換する

```rust
let b:u32 = 0x12345678;
let c:u16 = b as u16;
println!("b:{}({:#x?}) -> c:{}({:#x?})", b ,b, c, c);
```

#### 結果
b:305419896(0x12345678) -> c:22136(0x5678)

Solidityと同じ結果でした。

---

### u16をu32に変換する

```rust
 let d:u16 = 0x1234;
 let e:u32 = d as u32;
 let f:u32 = 0x00001234;
 println!("u16:{:#x?} u32:{:#x?} u32:{:#x?}", d, e, f);
```

#### 結果
u16:0x1234 u32:0x1234 u32:0x1234

Solidityと同じ結果ってことかなと思いました。器が大きくなっただけなので、値自体は全く変わっていない、と認識しました。

---

### bytes2からbytes1にする

Solidityのドキュメントのこれです。
![Solidityのドキュメント](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/401y12fm482zly5cpi0s.png)

int, uintの場合は、容量を減らすと大きい数値がなくなり小さい方が残りますが、byte列の場合は、大きい方が残ると認識しました。

Rustには、bytes2とかbytes1といった型は標準では多分なく、[u8; 2]みたいなu8型の配列やvectorで表すのかなと思います。下記は上記のSolidityの仕様と同じになるように、Rustでやってみたものです。

```rust
let g: u32 = 0x04030201;
let h: [u8; 4] = g.to_be_bytes();
let mut i: [u8; 2] = [0; 2];
i.clone_from_slice(&h[..2]);
let k: u16 = u16::from_be_bytes(i);
println!("{}({:#x?}) -> {:?} -> {}({:#x?})", g, g, h, k, k);
```

#### 結果
67305985(0x4030201) -> [4, 3, 2, 1] -> 1027(0x403)
Phase-1
Tags: javascript, html, css, project
Published: 2021-12-09 06:06:47

Phase-1 has been fast yet calm, you get new things thrown at you that at first you are like what is this but once you expand on it and get aha moment it starts to click and this happened over and over sometimes that aha moment never came and the imposter syndrome came in.(I consider what I went through a successful and humbling expirence)
How to convert NSF files to PST format without any Data loss
Tags: convertnsffiles
Published: 2021-12-09 05:11:47

If you want to convert NSF Files to PST format without any loss in your data then you can use **DRS [NSF to PST Converter](https://www.data-recovery-solutions.com/nsf-to-pst-converter.php)** tool. It is an advance utility that help users to convert NSF files into different other file formats and email clients. The tool is very easy to use and can be easily operated by any common user. With the help of this software users can remove duplicate emails at the time of file conversion . It is a powerful tool that is designed with innovative functionalities so as to provide complete satisfactory result to its users. If you want to check its efficiency , then you can use its free demo version and check its beneficial attributes. And in case of any doubt you can take help from tech support team at any time.
Create a Balance Reminder with Vonage Account API and Google Apps
Tags: automation, javascript, webdev, programming
Published: 2021-12-09 05:06:28

Being a freelancer, I have helped a couple of local businesses in India implement Vonage products. Recently, one of my clients asked if they can get a reminder email when the Vonage balance is below a specified limit as they don't want to hamper their operations because of insufficient balance. Almost all of my clients use Google Workspace, so I decided to create an integration of Vonage and Google Apps Script to create this workflow.

Google Apps Script allows us to manage all of Google apps using one platform in the cloud. The best part is that the authentication is baked into the platforms and many businesses in the market use Google Workspace – formerly known as G-Suite.

In this blog post, you'll learn how to create custom notifications when your Vonage Account balance is below a specified limit. The post is aimed at those Vonage developers who want to manage their client base effectively by sending them reminders about the Vonage Account balance.

Read the full blog on [Vonage](https://learn.vonage.com/blog/2021/06/08/create-a-balance-reminder-with-vonage-account-api-and-google-apps/).

Thanks for reading 💜

---

I publish a [monthly newsletter](https://www.ravsam.in/newsletter/) in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I come across while surfing on the web.

Connect with me through [Twitter](https://twitter.com/ravgeetdhillon) • [LinkedIn](https://linkedin.com/in/ravgeetdhillon) • [Github](https://github.com/ravgeetdhillon) or send me an [Email](mailto:ravgeetdhillon@gmail.com).

— [Ravgeet](https://www.ravgeet.in/), *Full Stack Developer and Technical Content Writer*
Infinite Loops in Javascript
Tags: loops, infiniteloops, javascript, abhidevelopssuntech
Published: 2021-12-09 05:02:03

Hi Everyone!
In this post I will be showing you what Infinite Loops are and how to avoid them while writing Javascript.

I have created many Javascript programs that include for or while loops and have messed up a lot. Most of the times I put the wrong operator in the loop which causes an Infinite Loop and my computer crashes. 

I am going to show you an example of a `for()` infinite loop.
```javascript
for (let i = 1; i >= 0; i++) {
    console.log(i)
}
```

Just those 3 lines of code will make you have to restart your computer.

Here is another Infinite Loop example but it is a `while()` loop.
```javascript
   const count = 1;
   while(count > 1) { 
       count++;
       console.log(count);
}
```

Those lines of code can also crash your computer.

Do you want to know how to infinite loops?
The answer is: PUT THE CORRECT OPERATOR IN THE LOOP!!!

A Correct `for()` Loop:
```javascript
for (let i = 1; i <= 0; i++) {
    console.log(i)
}
```

A Correct `while()` Loop:
```javascript
   const count = 1;
   while(count < 1) { 
       count++;
       console.log(count);
}
```

I hope you enjoyed this post. Please remember to follow me for more posts.

Byeee👋!
GitHub Actions: Angular & Firebase
Published: 2021-12-09 04:34:45

### My Workflow

Recently I've been working with Angular applications and deploying them to firebase. I wanted to set up GitHub actions so that whenever any code is pushed into the repository, it'll automatically deploy the updated application.

### Submission Category: 
DIY Deployments

### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
```
name: CI

on:
  push:
    branches:
    - master

jobs:
  firebase-deploy:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master
    - uses: actions/setup-node@master
      with:
        node-version: '14.x'
    - run: npm install
    - run: npm run build:prod
    - uses: w9jds/firebase-action@master
      with:
        args: deploy --only hosting
      env:
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
```
[GitHub Repository link](https://github.com/anika-001/angularfirebaseaction)
### Additional Resources / Info

You can check the action usage on this sample project:
[GitHub Repository](https://github.com/anika-001/angularfirebaseaction)
Your Getting Started Template Repository for Continuous and Automated Machine Learning Project with GitHub Actions
Tags: actionshackathon21
Published: 2021-12-09 04:23:59

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon 2021, please fill out all sections.)

A starting template for continuous ML projects where data kept growing, models kept learning and services deployed continuously.

You can use this template for:
- Initiate your ML projects
- Set `.dvc` to track data & save models
- Set `cml` to automate training and track experiment by pull requests
- Set model serving to endpoint and frontend example then deploy your models continuously

### My Workflow
[Note]: # (Please make sure the project links to the appropriate GitHub Actions repository, and includes [an open source license](https://choosealicense.com/) and README.)

#### Motivation

! Mention:
- model stuck in research
- model didn't get to production, repetitive task on modelling
- machine assignment for training, mention cheaphead machine that burns when using their own machine for training
- experiment tracking for reliability
- data and models that grows time to time that needs its own version control

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcaz0928ulanr47smebt.png)
 
Had to have a reliable getting started template for machine learning project since most of project that had data version control, experiment management, deployment as a service, serving to sample frontend and collaboration with a _yaml_ hyperparameter tuning file to ease experiment tracking.

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

Deliver actions diagrams, how it works specifically and how it would help with automating the project on specific events on repository.

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

Using github script, definition, and how it compares to another framework

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


### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)

**DIY Deployments/Wacky Wildcards**


### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)

{% github https://github.com/sanggusti/cml-streamlit-template %}

### Additional Resources / Info

[Note:] # (Be sure to link to any open source projects that are using your workflow!)
- https://github.com/sanggusti/write-docker-actions
- https://github.com/iterative/cml_dvc_case
- https://dvc.org/doc/start/data-and-model-versioning
- https://lab.github.com/

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. )

[Reminder]: # (Submissions are due on December 8th, 2021 (11:59 PM PT or 2 AM ET/6 AM UTC on December 9th).
How to Enable AWS Security Hub?
Tags: aws, security, securityhub, demo
Published: 2021-12-09 04:11:19

## What is a security Hub?
AWS Security Hub provides you with a comprehensive view of your security state in AWS and helps you check your environment against security industry standards and best practices.

Security Hub collects security data from across AWS accounts, services, and supported third-party partner products and helps you analyze your security trends and identify the highest priority security issues.

`Here is a Demonstration video on AWS Security Hub👇👇`
[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g9237dma3dfx71sjdike.png)](https://www.youtube.com/watch?v=ah0emDdVbaM&t=331s)

## Benefits of AWS Security Hub
Reduced effort to collect and prioritize findings
Automatic security checks against best practices and standards
Consolidated view of findings across accounts and providers
Ability to automate remediation of findings


## Enable AWS Security Hub
Once you have logged into your AWS account and enabled AWS Config, we need to enable Security Hub. Navigate to the AWS Security Hub console. Alternatively, you can just search for Security Hub and select the service.
In the AWS Security Hub service console you can click on the Go to Security Hub orange button to navigate to AWS Security Hub in your account.
Additional information is provided regarding Security standards and AWS Integrations. You can read more here. Now select Enable Security Hub.
With AWS Security Hub now enabled in your account, you can explore the security insights AWS Security Hub offers.

---
▬▬▬▬▬▬ WANT TO LEARN MORE? ▬▬▬▬▬▬
Full Terraform tutorial ► [https://bit.ly/2GwK8V2](https://bit.ly/2GwK8V2)
DevOps Tools, like Ansible ► [https://bit.ly/3iASHuP](https://bit.ly/3iASHuP)
Docker Tutorial ► [https://bit.ly/3iAT9Jx](https://bit.ly/3iAT9Jx)
AWS Tutorial ► [https://bit.ly/3iAT9Jx](https://bit.ly/3iAT9Jx)
GCP Tutorial ► [https://bit.ly/3mwh412](https://bit.ly/3mwh412)
Jenkins Tutorials ► [https://bit.ly/3iHnfv4](https://bit.ly/3iHnfv4)
Second PR for Telescope project
Tags: opensource, redis, javascript, node
Published: 2021-12-09 04:02:54

# Issue
In the last Release 04 of the OSD600 course, I decided to work on implementing the `/feeds/delayed` route for the Telescope project and finishing the `/feeds/invalid` route. In general, there are feeds that have been flagged as delayed in the Redis server and the project owners want to see them from new endpoint in the Posts service. So, the new endpoint will return a JSON array of objects containing feeds Id, URL and the time to live of the feed.

## Planning
The first part is finding the keys with the delayed suffix on the Redis server. This issue is similar to issue 2412 that I have sent a PR. I realized that I could utilize the getFeedKeysUsingScanStream in the old PR to find the delayed keys.

The second part is retrieving the information of the founded keys. The issue also requires finding the time to leave the delayed feeds. Luckily, prof. David has given detailed instructions about the time to live of delayed feeds on the issue. I will research `ttl` command and finish this task soon.