teleren/devto huggingface dataset:
Z library, The Best Website for e-Books and Articles
Published: 2021-12-03 04:47:57

[Z library](https://annualeventpost.com/z-library-the-best-website-for-e-books-and-articles/) has been helping people since 2009 with their free books. The best thing is they have a domain related to every country. Just sign up, and you will get z-library by your location, which helps you search relevant books and articles. Have you ever had trouble locating a specific book on the internet? The Z Library is the ideal answer.

Either for school projects or just for fun, everyone wants an eBook edition of their favorite book to read whenever they want. If the book’s writers haven’t created an eBook edition, finding one will be difficult, and if you discover it through a third-party source, they will cost you money.
Building a CI/CD Workflow for my CFML/Vue.js Application
Tags: actionshackathon21, github, opensource
Published: 2021-12-03 04:40:54

---
title: Building a CI/CD Workflow for my CFML/Vue.js Application
published: true
description: My submission to the GitHub Actions x DEV Hackathon 2021!
tags: actionshackathon21, github, opensource
---

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


### My Workflow

The goal of my project was to create a CI/CD workflow for a full-stack application written in CFML ([Lucee](https://www.lucee.org/)) and Vue.js, running in Docker. 

**CI**

Here is a simplified outline of my CI workflow.

1. Start a database service using the MySQL Docker image
2. Build the Docker image for my application
3. Run the newly built Docker image and connect it to the MySql database service
4. Execute back-end API integration testing using [Testbox](https://www.ortussolutions.com/products/testbox)
5. Execute [Cypress](https://www.cypress.io/) front-end and end-to-end tests

**CD**

My deployment process is triggered when a Github release is created using a [semver](https://semver.org/) tag. Here is the general outline.

1. Build a multi-platform Docker image. (I am utilizing the free trial of t4g.micro AWS EC2 instance so I need to run it on ARM64 architecture.)
2. Push the image to Dockerhub using a semver tag.
3. Connect to the server and trigger a Docker service update to pull down the new image and start it up.

**Github Actions I am using**

Since my application is running with Docker I am utilizing several Actions from Docker. 

- [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) (Buildx allows for building multi-platform images)
- actions/cache (With buildx I can use Docker layer caching to speed up subsequent builds)
- [docker/build-push-action](https://github.com/docker/build-push-action) (This action builds the images and optionally pushes them to a repository)
- [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) (This is needed for building images for other platforms)
- [docker/login-action](https://github.com/docker/login-action) (Login to Dockerhub so it can push the image)



### Submission Category: 

DIY Deployments


### Yaml File or Link to Code

{% github https://github.com/jsteinshouer/movie-list-app %}

CI - [main.yml](https://github.com/jsteinshouer/movie-list-app/blob/main/.github/workflows/main.yml)

CD - [release.yml](https://github.com/jsteinshouer/movie-list-app/blob/main/.github/workflows/release.yml)


### Additional Resources / Info

Here are a few of the resources I used for setting up my workflows.

- https://github.com/metcalfc/docker-action-examples
- https://github.com/BretFisher
- https://github.com/Ortus-Solutions/docker-commandbox
Is ES6 just javascript at this point?
Tags: javascript, discuss
Published: 2021-12-03 04:40:07

---
title: Is ES6 just javascript at this point?
published: true
description: A query to the community
tags: javascript,discuss
//cover_image: https://direct_url_to_image.jpg
---

So ES6 released in 2015 giving us some amazing features, such as arrow functions, class syntax and let/const. The many useful features in ES6 caused the development community to rapidly adopt ES6 into their toolkit for writing javascript. 

What do you all think? Is knowing the ends and outs of ES6 required to claim to "know javascript" in 2021? What about ES7...8? Curious to hear everyone's thoughts on when/how a language advancement becomes a benchmark for proficiency.
Using axios globally in a Vue 3 with provide/inject (composition API)
Published: 2021-12-03 03:58:56

In a Vue 2 we had to use `Vue.prototype` in order to add global properties to a Vue instance. But in a Vue 3 we got "Composition API".

So, using a composition api, recommended way to add global properties, is by using provide/inject. Because `config.globalProperties` considered as an [escape hatch](https://github.com/vuejs/vue-next/issues/1074#issuecomment-621427943)

Let's get started.

## 1. Create a file called http.ts (you can name it as you wish):

```ts
import axios, { AxiosInstance } from 'axios'

const apiClient: AxiosInstance = axios.create({
  baseURL: 'https://api.openbrewerydb.org',
  headers: {
    'Content-type': 'application/json',
  },
})

export default apiClient
```

It's our global Axios instance with the options.

## 2. Create a file symbols.ts

```ts
import { InjectionKey } from 'vue'
import { AxiosInstance } from 'axios'

export const AxiosKey: InjectionKey<AxiosInstance> = Symbol('http')
```

This is required to type our Provide/Inject.

## 3. Go to main.ts

```ts
// libs
import http from '@/http'
import { AxiosKey } from '@/symbols'

const app = createApp(App)

app.provide(AxiosKey, http)
```

We're providing our Axios instance globally here, using `InjectionKey` - **AxiosKey**, so it's typed now. Otherwise you would have to provide types every time you use `inject()`

## 4. Create a function to deal with undefined values, when you use `inject()`:

```ts
import { inject, InjectionKey } from 'vue'

export function injectStrict<T>(key: InjectionKey<T>, fallback?: T) {
  const resolved = inject(key, fallback)
  if (!resolved) {
    throw new Error(`Could not resolve ${key.description}`)
  }
  return resolved
}
```

It was found in this useful [blog post](https://logaretm.com/blog/type-safe-provide-inject/#dealing-with-undefined)

## 5. Using our global axios instance inside a component:

```vue
<script setup lang="ts">
import { ref, onMounted } from 'vue'

// typing inject
import { injectStrict } from '@/utils/injectTyped'
import { AxiosKey } from '@/symbols'

interface Breweries {
  id: string
  name: string
}

const http = injectStrict(AxiosKey) // it's typed now
const breweries = ref<Breweries[]>([])

onMounted(async () => {
  const resp = await http.get<Breweries[]>('/breweries')
  breweries.value = resp.data
})
</script>
```
AWS re:invent 2021 - AWS CEO Adam Selipsky's Keynotes Announcement Summary
Published: 2021-12-03 03:48:38

AWS re:invent 2021 - AWS CEO Adam Selipsky's Keynotes Announcement Summary

Please Welcome CEO of AWS, Adam Selipsky...

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

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

WOW!!! Hello Everyone Welcome to AWS reinvent...

Thank you so much for joining us, it is great to be back here with all of you on 10th anniversary of reinvent and 15th anniversary of aws.

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



**You still needed more...**, so, **I am really pleased to announce....**

* Graviton3

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

* C7g Insurance for EC2

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

* Trn1 insurance for EC2

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

* AWS mainframe modernization

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

* AWS Private 5G

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

* Row and cell-level security for Lake Formation
* Transaction for governed tables in Lake Formation

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

* Serverless and on-demand analytics

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

* Amazon SageMaker Canvas

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

* AWS Training Programs

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

* Amazon FinSpace

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

* Goldman Sachs Financial Cloud for data

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

* AWS IoT TwinMaker

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

* AWS IoT FleetWise

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

It was a great presentation with real case study examples from a few AWSome partner customers along with new exciting announcements.

Thank you so much to Adam Selipsky and his team for great presentation with lots of exciting things. Thank you so much to AWS and AWS re:invent team for such great event.

AWS CEO Adam Selipsky's Keynotes See full video here: https://www.youtube.com/watch?v=WGA2P_oH5Xc
Local certificate configure
Tags: react
Published: 2021-12-03 03:28:06

Need to configure and use localhost development with 

> https

I tried the below updates in the workspace.json file but still when I do `yarn start`, it opens only with 

> http://localhost:443

`"ssl": true,
"sslKey": "config/key.pem",
"sslCert": "config/cert.pem",
"port": 443`

Can somebody help me to sort this out please?

Thanks in advance!
Use pprof for golang program memory analysis
Tags: go, programming, monitoring
Published: 2021-12-03 03:23:42

When using golang to write complex projects, it is often useful to use multi-coroutine concurrency scenarios. At this
time, it is easy to cause the problem of coroutine leaks due to negligence, and then produce similar memory leaks. This
article focuses on the investigation of coroutine leaks, and provides ideas and practices for visual analysis of golang
program memory.

## Introduction to pprof

pprof is a tool for visualization and analysis of profiling data.  
pprof reads a collection of profiling samples in profile.proto format and generates reports to visualize and help
analyze the data. It can generate both text and graphical reports (through the use of the dot visualization package).

## How to use pprof

### Add monitoring code

First, we need to add monitoring code in the golang program, and expose it through the http interface.

```golang
package main

import _ "net/http/pprof"
import "net/http"

func main() {
	go func() {
		_ = http.ListenAndServe("0.0.0.0:8081", nil)
	}()
	// your code
}
```

Then we start the program that needs to be analyzed, and we are ready to analyze it.

### How to check the memory size of each module

By analyzing the size of the memory occupied by each module and function, memory leaks can be found very effectively.

#### Command line method to generate visual analysis images

```powershell
go tool pprof -alloc_space -cum http://localhost:8081/debug/pprof/heap
```

After the command is run, enter `web` in the console and press `Enter`, and a svg picture will be opened with the
default viewing software of `.svg`, showing the memory usage diagram of each module. If you enter `web` and report an
error of `Failed to execute dot. Is Graphviz installed? Error: exec: "dot": executable file not found in %PATH%`, it is
because `Graphviz` is not installed on the computer, which is a component that image generation depends on. The solution
is: Open https://graphviz.gitlab.io/download/ and follow the prompts to download and install. After the installation is
complete, for Windows, add the `bin` folder of the Graphviz installation path after setting the environment variable
path.

#### View specific data list in web browser

```
http://localhost:8081/debug/pprof/heap?debug=1
```

### How to view the number of coroutines created by each module

By analyzing the number of coroutines created by each module and function, coroutine leaks can be checked very
effectively. If there is coroutine leaks, the number of coroutines in the corresponding modules is astonishing.

#### Command line method to generate visual analysis images

```powershell
go tool pprof http://localhost:8081/debug/pprof/goroutine
```

After the command runs, enter `web` in the console and press `Enter`.

#### View specific data list in web browser

```
http://localhost:8081/debug/pprof/goroutine?debug=1
```

## Summary

The above is an introduction to the simple use of pprof, I believe it will be helpful to troubleshoot memory leaks and
coroutine leaks in golang. If you need more detailed usage, please refer to the official pprof documentation.
Open Source news api for developers
Tags: news, python, programming, opensource
Published: 2021-12-03 03:23:00

## News Api is created using python `django rest framework`


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

**Using this the developer can get the realtime news which is scraped from different websites and sources such as `google news` and `India today`**

Api Link: [VISIT_API](https://newsapi-abipravi.herokuapp.com/)

github repository link: [View Source code](https://github.com/pravee42/newsapi)

#### _Documentation_:

`url/news` -> **To get the top news and head lines news**
`url/tech` -> **To get the Technology news**
`url/search/<search_keyword>` -> **Search News**

like wise there are more to get the news 

#### Main feature is there is no need to register on owr website you can use the API privately 

For Documentation Visit: [Docs](newsapi/docs)

#### Thanks for reading

**If you like you post** Connect us on

<a href="https://github.com/pravee42">
Github
</a>

<a href="https://www.instagram.com/praveenkumar_abipravi/">
  Instagram
</a>

<a href="https://twitter.com/ABIPRAVI1">
  Twiter
</a>

<a href="https://www.linkedin.com/in/praveen-kumar-9b09441b7/">
 Linked In
</a>

<a href="https://abipravi.medium.com/">
 Medium
</a>
Common operations of Git
Tags: git, devops
Published: 2021-12-03 03:22:57

### Commit code

```bash
git add .
git commit -m "feat: xxxxxx"
```

### How to revoke after commit

```bash
git reset --soft HEAD^
```

This successfully revoked the commit. Note that only the commit operation is
withdrawn, and the code modification remains.

#### git reset parameters

`--mixed`
do not delete the workspace to change the code, cancel the commit, and cancel the `git add .` operation. This is the
default parameter.

`--soft`
do not delete the workspace to change the code, cancel the commit, and do not cancel the `git add .`.

`--hard`
delete workspace change code, revoke commit, revoke `git add .`. After completing this operation, it is restored to the
last commit state.

### How to migrate git repository to another git

```bash
git remote set-url origin remote_git_address
git push
```

This method will only migrate the current branch to the new git.

### How to save username and password of git in Ubuntu

```bash
nano ~/.gitconfig
```

Edit the config file and set this config:

```
[credential]  
    helper = store
```
Install Node.js on Linux
Tags: node, linux, ubuntu, devops
Published: 2021-12-03 03:22:31

## Using NodeSource

Refer to the [NodeSource documentation](https://github.com/nodesource/distributions/blob/master/README.md) for more
information on the available versions.

### Node.js v14.x:

```bash
# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
```

### Upgrade npm

```bash
npm install -g npm
```
Monitor status of nvme ssd in Ubuntu
Tags: ubuntu
Published: 2021-12-03 03:21:57

Install nvme-cli

```
sudo apt-get install nvme-cli
```

List disks

```
sudo nvme list
```

View the details of the hard drive

```
sudo nvme smart-log /dev/nvme0
```

Auto refresh status

```
sudo watch -n 1 nvme smart-log /dev/nvme0
```

Only view the temperature info

```
sudo nvme smart-log /dev/nvme0 | grep "^temperature"
```
Animated Profile Card Using HTML CSS & GSAP
#
html
#
javascript
#
webdev
#
beginners
Hello Guys,


Published: 2021-12-03 03:19:15

Thank you guys for my last post response. Today I Created an Animated profile card using HTML CSS & GSAP Animation. I use the simple card and use GSAP timeline() to animate the card using gsap.from() you can animate a card. I hope you like this also comments about your thoughts
Monitor the temperature and health status of nvme ssd in Ubuntu
Tags: ubuntu, linux, devops
Published: 2021-12-03 03:14:54

Install nvme-cli

```
sudo apt-get install nvme-cli
```

List disks

```
sudo nvme list
```

View the details of the hard drive

```
sudo nvme smart-log /dev/nvme0
```

Auto refresh status

```
sudo watch -n 1 nvme smart-log /dev/nvme0
```

Only view the temperature info

```
sudo nvme smart-log /dev/nvme0 | grep "^temperature"
```
Imporve your Ubuntu Desktop's performance
Tags: ubuntu, linux, devops
Published: 2021-12-03 03:14:24

When you install the Ubuntu system on a physical machine, don't forget to do these things to improve your computer's
performance.  
My experiments found that the improvement was very noticeable, based on Ubuntu 20.10.

## use s-tui to monitor and test your max CPU frequency

![s-tui](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9e5lxaxmog3u7ztixk90.png)
 

### how to install

```bash
sudo apt install python3-pip stress
sudo pip3 install s-tui
```

### how to use

```bash
sudo s-tui
```

You can use the arrow keys and space bar to switch between Monitor mode and Stress mode. The Stress mode performs a
stress test on the CPU.

## use indicator-cpufreq to set your CPU frequency

![indicator-cpufreq](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xis5ptxfvkb4nul99ig0.png) 

### how to install

```bash
sudo apt install indicator-cpufreq
sudo reboot
```

### how to use

Look at the status bar icon in the upper right corner and click on the emerging icon to set the CPU's performance mode.
Open files FAST from zsh | or bash if thats your thing
Tags: linux, bash, zsh
Published: 2021-12-03 03:12:20

---
title: Open files FAST from zsh | or bash if thats your thing
tags: ['linux', 'bash', 'zsh']
published: true
description: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmzqmxp5ss52m9soffg2.png
canonical_url: https://waylonwalker.com/fuzzy-edit-zsh/
---



{% youtube PQw_is7rQSw %}

I am often in a set of tmux splits flying back and forth, accidentally close my editor, so when I come back to that split and hit my keybinds to edit files I enter them into zsh rather than into nvim like I intended.  Today I am going to
sand off that rough edge and get as similar  behavior to nvim as I can with a couple of aliases.


Make sure you check out the YouTube video to see all of my improvements.

## what's an alias

If you have never heard of an alias before it's essentially a shortcut to a given command.  You can pass additional flags to the underlying command and they will get passed in.  Most of the time they are just shorter versions of commands that you run often or even like in this case a common muscle memory typo that occurs for you.


## My new alias's for fuzzy editing files from zsh

Here are the new aliases that I came up with to smooth out my workflow.  These give me a similar feel to how these keys work in neovim but from zsh.

``` bash
# fuzzy select file to edit
alias p='nvim `fzf --preview="bat --color always {}"`'

# give me the same syntax as edit while in neovim
alias :e='nvim '
```

Follow the [YouTube channel](https://youtube.com/waylonwalker) or the [rss
feed](https://waylonwalker/rss/) to stay up to date.


## Related links

* [playlist for my dotfiles challenge](https://www.youtube.com/playlist?list=PLTRNG6WIHETAj0nR_WYAxxGjd7kXch5zj)
Create socks server on Ubuntu 20.04
Tags: ubuntu, tutorial, devops
Published: 2021-12-03 03:11:33

In daily life, we may need to create a socks server to provide network for other hosts.   
I summarized the method of creating socks service through dante-server under Ubuntu 20.04.

### install dante-server

```shell
sudo apt install dante-server
```

### add user for dante-server

Use this method to create a user to prevent it from logging in.

```shell
sudo useradd -s /sbin/nologin dante-socks
```

### Edit the configuration file

```shell
sudo nano /etc/danted.conf
```

minimal configuration for dante-server

```
logoutput: syslog stdout
internal: ztuku335yr port = 1080
external: ens3
user.notprivileged: dante-socks
clientmethod: none
socksmethod: none
#allow connections from local network
client pass {
        from: 10.0.0.229/24 to: 0.0.0.0/0
        log: error # connect disconnect
}
socks pass {  
        from: 0.0.0.0/0 to: 0.0.0.0/0
        command: bind connect udpassociate
        log: error # connect disconnect iooperation
}
socks pass {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        command: bindreply udpreply
        log: error # connect disconnect iooperation
}
```
Create a private Ubuntu mirror
Tags: ubuntu, tutorial, devops
Published: 2021-12-03 03:10:57

To create a private Ubuntu image, the commonly used tools are debmirror and apt-mirror.  
As of today, these two tools have their own advantages and disadvantages.

## debmirror

[debmirror document](https://help.ubuntu.com/community/Debmirror)  
debmirror has many downloading methods, and it will compare the local file with the file on the server before
downloading so that only the missing files are downloaded. However, it does not seem to support multi-threaded
downloading. Debmirror is downloaded one by one, so the download speed is relatively slow.

## apt-mirror

[apt-mirror document](https://apt-mirror.github.io/)  
apt-mirror supports 20 threads to download at the same time by default. If you choose a suitable mirror station, the
download speed can reach the maximum of my network. However, it does not seem to make a comparison. Although it can
speed up the download start speed, sometimes some files may be lost, resulting in an incomplete mirror, so the client
cannot be updated.

### how to write the config file

In order to download the complete package, we need to modify the configuration file in `/etc/apt/mirror.list`. Use this
format to ensure that the i386 package will be downloaded.

```
deb-amd64 http://mirrors.aliyun.com/ubuntu focal main restricted universe multiverse
deb-i386 http://mirrors.aliyun.com/ubuntu focal main restricted universe multiverse
```

## Combine them together

Therefore, in order to achieve a balance between efficiency and completeness, we can combine apt-mirror and debmirror.
We can first use apt-mirror to download quickly, then we can use debmirror to check and download the missing packages.
Maybe this is the best way to download the Ubuntu mirror.