teleren/devto huggingface dataset:
Git error "Your push would publish a private email address"
Tags: github, git
Published: 2021-11-10 09:30:37

So I hit an error trying to do my first pull request (PR) into the Octopus Deploy Documentation.   I had forked the repository and was working on it locally on my own machine within VS Code.

The push to my fork kept failing and I initially thought, oh it's probably my setup, I probably haven't linked VS Code/GitHub together, but when I read the error I was a bit baffled.

It was telling me:

```
Error "Your push would publish a private email address
```

I did remember making sure my email addresses on GitHub private when I left Microsoft.

On investigating the issue I realised there were two solutions.  Make my email addresses public again or use the randomly generated email that GitHub give you for these situations.

## Find your GitHub email address
Your GitHub no reply address is in your GitHub Personal Settings → Emails.  It is mentioned just below the Keep my email address private checkbox.

![GitHub no reply email address](https://techielass.azureedge.net/images/githubnoreplyemail.png)

## Configure Git to use your GitHub email address
You want to open VS Code or a Windows Terminal or your chosen IDE for using with GitHub and configure this new email address to be used for your commits.

The following command will set the email address to be used for every repository that you have on your computer:

```
git config --global user.email "{ID}+{username}@users.noreply.github.com"
```

However, if you only want to use the email address for a single repository then this is the command you should use:

```
git config user.email "{ID}+{username}@users.noreply.github.com"
```

Reset the author information on that last commit
You now need to reset the author information on that commit that just failed for you.  

```
git commit --amend --reset-author
```

## Push that commit
You can now push that commit and it will be successful and future commits will use the no reply email address as well.
為什麼你的個資會外洩？談社交工程
Tags: 社交工程, 詐騙
Published: 2021-11-10 09:30:33

## 廣義的社交工程

社交工程由來已久，在早年資訊不發達的年代，就已經有商業間諜藉機認識目標企業內的重點人士，透過各種檯面下的手段或欺騙來取得想要的情報，甚至不惜動用社交工程的進階版—性交工程來達到目的，當然性交工程不用非得自己出馬，可能來些[性招待](https://zh.wikipedia.org/wiki/%E9%99%AA%E7%9D%A1)就可以。不過下面要談的社交工程更侷限在近年較常發生的個資外洩與後續的詐騙，它們的根本原因其中就包括社交工程。

## 現在的社交工程

這邊講的社交指的是透過一些欺騙的手段把惡意程式植入目標電腦，以 EC 營運方業主來說，最常面臨到社交手段的來源就是客服，客服大哥大姐們每天日常的工作都會收到數十封的顧客信件，一旦資安心態稍微有點鬆懈，或者毫無資安意識的情況下，很容易就陷入釣魚信的陷阱，以實際發生的例子來說，壞人會偽裝成顧客向客服詢問問題，並且在後續的信件往來中，藉故夾帶惡意程式，而這些惡意程式往往會偽裝成圖片檔，例如 photo1.jpg.exe 這樣的檔案，並且再用難以被掃描的帶密碼的 RAR 格式壓縮，以躲過郵件系統的安全偵測，一旦客服被釣到，把附檔解開，而那 photo1.jpg.exe 又因為萬惡的 Windows 預設不顯示副檔名，因此客服只會看到一個帶 JPEG 圖示的 photo1.jpg，並在毫無戒心的情況下猛擊執行，自此壞人順利的在客服電腦內植入木馬程式。

具體這支木馬程式的行為，藉由刑事局的協助我們可以一窺究竟：

![社交郵件樣本分析](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyz22cjmwk7wiri0eyun.png)

## 處理

身為經營者或經理人，不過是想做點 EC，卻被壞人有針對性的攻擊，往往是收到大量客服案件才意識到自家的資安意識有多薄弱，我知道很多人都自詡為危機管理大師，這些大師也深受老闆重用，可是老闆往往忽視事前的防範比事後的管控更重要，而遺憾的是，事前的防範需求一定有人曾經提出，也往往一定不被重視，所以即便有再多的幕僚在剛愎自用的頭家被鬼遮眼的情況之下也是無用。

扯遠了，下面還是列一下應該建立起的可實行的制度：

- [發正念](https://big5.minghui.org/mh/articles/2001/12/9/21123.html)。
- 建立員工的資安意識，這點最重要也最困難，那些大哥大姐不是你教了就有效果的。
- 建立更嚴格的郵件掃描規則，惡意程式為了避免被掃到都會包成帶密碼的 RAR，在郵件規則上，凡是無法掃描的壓縮檔一律不收。
- 員工不允許使用 Administrator 權限。
- 管制員工的 port。
- Windows 副檔名一律開啟。
- 對 EC 後台強制開啟二段式認證。

這些制度只有第二點是真正有價值的，其它都只是玩魔高一尺道高一丈的遊戲而已，這些被動的應變措施是列舉不完的，又會讓員工覺得「好麻煩」，真正值得投資的還是建立員工的資安意識，而這又牽扯到頭家的心態，建立資安意識絕對只會是 top-down 的策略，頭家不對內宣示對資安的重視程度與相關教育作為，就不可能期待員工會有相對的資安意識，老闆都不重視了，我幹嘛花時間自我精進老闆不重視的事情！
How to find Starbucks Locations?
Tags: starbucks, near, me, locations
Published: 2021-11-10 09:25:24

<a href="https://starbucksnearme.net">Starbucksnearme.net</a> helps you find the nearest Starbucks location int town. As the website conatins list of worldwide Starbucks stores. Just moved to locator page and search for the area or city or country name where you want to locate the store. 
Along with the location, it gives you map directions to the location, opening hours, phone number and much more. 
User reviews are also shown at the end of each location. Give reviews about the Starbucks store and read old reviews before visit.
ReactJS Tips & Tricks: Avoid Nested Render Functions
Tags: react, javascript, webdev, frontend
Published: 2021-11-10 09:22:00

A common thing I noticed in a lot of projects I worked on is the `Nested Render Functions` approach to render UI elements.

Let's dive into this approach and how to change in a better way.

## What are Nested Render Functions?

Basically, it is when you declare a part of UI render in a function inside of a component, such as:

```js
const Component = () => {
  function renderSection() {
    return <section>This is my section.</section>
  }

  return (
    <div>
      {renderSection()}
      ...
    </div>
  )
}
```

Since components are just functions, it is the same as declaring new components inside the current `Component`.

## Extracting to a New Component

It is much better to extract to a new component, it will help you to create unit tests more easily and isolated to the component.

Let's re-create the example I mentioned before, like the following:

```js
const Section = () => <section>This is my section.</section>

const Component = () => (
  <div>
    <Section />
    ...
  </div>
)
```

Instead of using closures, now you have a pure function for `Section` component, that's more readable and easy to give their props.

## Wrapping Up

With this approach, you will create more deterministic components taking the benefit of React pure component.

It will help you to test the component and create isolated behaviour for every component.
ReactJS Tips & Tricks: Avoid Short-Circuit Conditional UI Rendering
Tags: react, javascript, frontend, webdev
Published: 2021-11-10 09:21:00

The goal of this articles is to share with you some insights that I have learned
over the last few years that I have been working with ReactJS.

I will start with a common one that is called **Short-Circuit Conditional** unexpected UI rendering.

## What is a Short-Circuit conditional?

This conditional is a concise way to render UI components.

Example of the **Short-Circuit conditional** approach:

```js
const Component = ({ number = 0 }) => number && <div>Current: {number}</div>
```

The component I mentioned before will backfire a `0`.

## Why does it render zero instead of the empty UI?

The comparison operators in JavaScript don't return boolean values, they return one of the compared values.

In the case mentioned above, when we check the `number` value it will render `zero`.

## How to avoid the unexpected UI rendering

The way to avoid this issue is using the **ternary comparison** to be explicit about what will return in both scenarios.

Fixing the `Component` using the **ternary comparison** such as:

```js
const Component = ({ number = 0 }) => (number ? <div>Current: {number}</div> : null)
```

Considering the value of `number` variable is zero, it will return `null` that is the second option from the ternary on this case React won't render because it is a `null` value.

## Wrapping Up

If you think this series of articles is helpful to you, or do you want to discuss some programming topics, feel free to reach out to me at [@helderburato](https://helderburato.com/).

Thanks! ⚡️
Yet another JS framework(HYDROGEN)
Tags: javascript, discuss, opensource, nextjs
Published: 2021-11-10 09:13:43

[Shopify](https://www.shopify.com/) have recently released a [React](https://reactjs.org/) based JavaScript framework called [HYDROGEN](https://hydrogen.shopify.dev/). Just like [Next.js](https://nextjs.org/) its focused on **SSR**(Server Sider Rendering) components. But if we already have Next.JS why do we need another framework similar to it?
**HYDROGEN** is made to create fully customizable shopify based E-Commerce web apps. Since its based on Nex.JS we have features of nextjs available to us and it also comes with many predefined components and hooks to ease your development.
It also comes with built-in cache defaults support for non-blocking data-fetching, ensuring a fast shopping experience.
![Hydrogen perfomance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29ntbp4p8dxbna1v501m.png)
And it uses [Vite](https://vitejs.dev/) for bundling instead of [Webpack](https://webpack.js.org/)
![Vite logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjpciq26g4z5ax9advd0.png)
Hydrogen also uses shopify's GraphQL api to steam data easy and efficiently.
![Shopify hydrogen graphql](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jctg8hknooltbj0irg57.png)
Shopify is also going to launch a hosting service for Hydrogen APPs called Oxygen.
![Oxygen hosting for hydrogen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phn5yaxkiays7j8jikbk.png)

## Final thoughts
> Hydrogen is react(next.js) based framework, so if you already know react and you develop custom storefronts it might be a great idea to leverage the extra powers that Hydrogen gives you on top of Next.JS

### Make sure to checkout my other articles and YouTube channel.
{% user 0shuvo0 %}
Options in Quick Access Toolbar in Microsoft Excel!
Tags: exceltutorials, quickaccesstoolbarop, excel
Published: 2021-11-13 03:09:16

---
title: Options in Quick Access Toolbar in Microsoft Excel!
published: true
date: 2021-11-10 09:09:00 UTC
tags: ExcelTutorials,QuickAccessToolbarOp,Excel
canonical_url: https://geekexcel.com/options-in-quick-access-toolbar-in-microsoft-excel-365/
---

## Quick Access Toolbar in Excel:

This article will guide you to learn the available  **options in the quick access toolbar**  in Excel 365.

The  **Quick Access Toolbar**  contains the most commonly used Excel commands. We can perform any task using this toolbar without knowing the shortcuts for any command in Excel. It makes our work fast and straightforward. Let’s see the various options in the quick access toolbar provided by Excel.

## Default Options in Quick Access Toolbar:

The below-given image clearly shows the options available in the quick access toolbar by default in Excel.

![](https://geekexcel.com/wp-content/uploads/2020/07/s3.png)

## How to Change the Quick Access Toolbar Location?

Here we will change the quick access toolbar location by moving it to below the ribbon in Excel.

To move this, you need to follow below steps:

- Click the ** down arrow**  in the quick access toolbar to open the drop-down list.
- Select the  **Show Below the Ribbon**  option.

![](https://geekexcel.com/wp-content/uploads/2020/07/s4.png)

- Now, quick access toolbar placed under the ribbon.

![](https://geekexcel.com/wp-content/uploads/2020/07/s5.png)

## How to Add and Remove Commands in Quick Access Toolbar?

### Add Commands to the Quick Access Toolbar:

- Click the  **down arrow**  at the right of the quick access toolbar to open the  **dropdown**  list.
- Select  **the More**   **Commands**  option from that list.
- Click  **the All**   **Commands**  option from the  **Choose commands from**  the dropdown menu.
- Select a  **new command**  which you want to add to the quick access toolbar for your use.
- Click the  **Add**  button.
- To rearrange the order of the commands, use the  **Up**  or  **Down**  arrow.
- Hit the  **Ok**  button.

![](https://geekexcel.com/wp-content/uploads/2020/07/s6.png)

![](https://geekexcel.com/wp-content/uploads/2020/07/s7.png)

### Remove commands from the Quick Access Toolbar:

- **Right-Click** on the command that you want to remove from the quick access toolbar.
- Click **Remove from Quick Access Toolbar** on the menu.

![](https://geekexcel.com/wp-content/uploads/2020/07/s8.png)

## Use Quick Access Toolbar Commands With Shortcuts:

- To use the commands with the help of shortcuts, you have to press**( ALT + Number(s) ).**
- It will show the numbers that are associated with specific commands.

![](https://geekexcel.com/wp-content/uploads/2020/07/s9.png)

## Conclusion:

In this article, we guided you to learn about the **quick access toolbar option** in Excel 365. Leave your **feedback** in the comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!
How to leverage a private modules in your YAML Pipelines
Tags: uncategorized, modules, pipelines, python
Published: 2021-11-29 21:32:46

---
title: How to leverage a private modules in your YAML Pipelines
published: true
date: 2021-11-10 09:00:00 UTC
tags: Uncategorized,modules,pipelines,python
canonical_url: 
---

I’ve made no secret about my love of DevOps, and to be honest, over the past few months it’s been more apparent to me than ever before that these practices are what makes developers more productive. And taking the time to setup these processes correctly are extremely valuable and will pay significant dividends over the life of the project.

Now that being said, I’ve also been doing a lot of work with Python, and honestly I’m really enjoying it. It’s one of those languages that is fairly easy to pickup but the options and opportunities based on it’s flexibility take longer to master. But one of the things I’m thankful we started doing was leveraging python modules to empower our code re-use.

The ability to leverage pip to install modules into containers creates this amazing ability to separate the business logic from the compute implementation.

To that end, there’s a pretty common problem, that I’m surprised is not more documented. And that’s if you’ve built python modules, and deployed them to a private artifact feed, how can you pull those same modules into a docker container to be used.

### Step 1 – Create a Personal Access Token

The first part of this is creating a personal access token in ADO, which you can find instructions for [here](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page). The key to this though is the PAT must have access to the packages section, and I recommend read access.

### Step 2 – Update DockerFile to accept an argument

Next we need to update our Dockerfile to be able to accept an argument so that we can pass that url. You’ll need to build out the url your going to use by doing the following:

https://{PAT}@pkgs.dev.azure.com/{organization}/{project id}/\_packaging/{feed name}/pypi/simple/

### Step 3 – Update YAML file to pass argument

This is done by adding the following to your docker file:

```
ARG feed_url=""
RUN pip install --upgrade pip
RUN pip install -r requirements.txt --index-url="${feed_url}"
```

The above will provide the ability to pass the url required for accessing the private feed into the process of building a docker image. This can be done in the YAML file by using the following:

```
- task: Bash@3
  inputs:
    targetType: 'inline'
    script: 'docker build -t="$(container_registry_name)/$(image_name):latest" -f="./DockerFile" . --build-arg feed_url="$(feed_url)"'
    workingDirectory: '$(Agent.BuildDirectory)'
  displayName: "Build Docker Image"
```

At this point, you can create your requirements file with all the appropriate packages and it will build when you run your automated build for your container image.
How to Install and Uninstall Tmux on Linux - Tmux Cheat Sheet
Tags: ubuntu, tooling, linux, development
Published: 2021-11-10 08:40:48

[Tmux](https://github.com/tmux/tmux) is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. Tmux can be disconnected from a screen and left running in the background, then reattached later. 

This guide will help you **install Tmux Ubuntu** and other Linux distributions (Fedora, CentOS / RHEL, Arch Linux). This one also helps you how to **Uninstall Tmux** and Cheat Sheet that you can need. Choose a way for your Linux device.

Read more: [How to Install and Uninstall Tmux on Linux - Tmux Cheat Sheet](https://linuxtus.com/install-tmux-linux-cheat-sheet/)
Load external libraries dynamically in Angular
Tags: angular, typescript
Published: 2021-11-10 08:27:22

To be able to load external libraries it is good to have a service which is responsible to load those scripts!


It will be looks like this

```typescript
@Injectable({providedIn: 'root'})
export class ExternalLibrariesService {
  static injectLib(src: string): void {
    const script = document.createElement('script');
    script.src = src;
    document.body.appendChild(script);
  }
}
```


With that service we can easily add external libraries as much as we want!


Example usage

```typescript
@Component({
  selector: 'app-root',
  template: ``,
})
export class AppComponent implements OnInit {
  private externalLibs = [
    'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js',
    'https://code.jquery.com/jquery-3.6.0.slim.min.js'
  ];
  ngOnInit(): void {
    this.externalLibs.forEach(libSrc => ExternalLibrariesService.injectLib(libSrc));
  }
}
```


#### Ability to add other important attributes

When we want to use libraries like `bootstrap` and `jQuery` CDN, on their site we can see they are using this attributes `integrity` and `crossorigin` on the script tag. Let's add these two to our method like this

```typescript
static injectLib(src: string, integrity?: string, crossOrigin?: string): void {
    const script: HTMLScriptElement = document.createElement('script');
    script.src = src;
    if (integrity) {
      script.integrity = integrity;
    }
    if (crossOrigin) {
      script.crossOrigin = crossOrigin;
    }
    document.body.appendChild(script);
  }
```


And now let's introduce interface for external libraries in the app, like this

```typescript
interface IExternalLib {
  src: string;
  integrity?: string;
  crossOrigin?: string;
}
```


Now we can update our usage example like this

```typescript
@Component({
  selector: 'app-root',
  template: ``,
})
export class AppComponent implements OnInit {
  private externalLibs: IExternalLib[] = [
    {
      src: 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js',
      integrity: 'sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo',
      crossOrigin: 'anonymous'
    },
    {
      src: 'https://code.jquery.com/jquery-3.6.0.slim.min.js',
      integrity: 'sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=',
      crossOrigin: 'anonymous'
    }
  ];
  ngOnInit(): void {
    this.externalLibs.forEach(lib => ExternalLibrariesService.injectLib(lib.src, lib.integrity, lib.crossOrigin));
  }
}
```

Thank for reading, hope you like it 🙏🏽
Java/Convert PDF to XPS and Vice Versa
Tags: java, pdf, xps, api
Published: 2021-11-10 08:23:02

XPS (XML Paper Specification) is a fixed-layout document format designed to preserve document fidelity, providing device-independent document appearance. This article will introduce how to convert PDF to XPS and XPS to PDF in high quality using Free Spire.PDF for Java.

###Import JAR Dependency###
**Method 1:** You can download the [free library](https://www.e-iceblue.com/Download/pdf-for-java-free.html) and unzip it. Then add the Spire.Pdf.jar file to your project as dependency.
**Method 2:** Or you can directly add the jar dependency to maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
    <repository>
        <id>com.e-iceblue</id>
        <name>e-iceblue</name>
        <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.pdf.free</artifactId>
        <version>4.4.1</version>
    </dependency>
</dependencies>
```

###Convert PDF to XPS###
The **PdfDocument.saveToFile()** method offered by Free Spire.PDF for Java allows you to save the input PDF document to other file Formats. All you need to do is load the PDF document using **PdfDocument.loadFromFile()** method and then save it to .xps file format.
```java
import com.spire.pdf.*;

public class PDFtoXPS {
    public static void main(String[] args) {
        //Load the PDF file
        PdfDocument pdf = new PdfDocument();
        pdf.loadFromFile("sample2.pdf");

        //Save to XPS
        pdf.saveToFile("ToXPS.xps", FileFormat.XPS);
    }
}
```
![ToXPS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r08sg7ix76tx73na0ziu.jpg)



###Convert XPS to PDF###
```java
import com.spire.pdf.*;

public class XPStoPDF{
    public static void main(String[] args) {
        //Load XPS 
        PdfDocument pdf = new PdfDocument();
        pdf.loadFromXPS("ToXPS.xps");

        //Save to PDF
        pdf.saveToFile("toPDF.pdf", FileFormat.PDF);
    }
}
```
![ToPDF](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yj9hy7trsmzalf8x6r0h.jpg)
Deep dive into MongoDB Aggregation Framework
Tags: mongodb, database, datascience, cybersecurity
Published: 2021-11-10 08:13:54

Complex usage of the MongoDB aggregation framework to retrieve documents from multiple collections using an aggregation pipeline query that will perform much faster than the existing functional Map-reduce models.

https://deeptiman.medium.com/deep-dive-into-mongodb-aggregation-framework-25978d3319f9
Installing Python 3.10 on openSUSE Leap 15.3
Tags: python, opensuse
Published: 2021-11-10 07:53:31

---
title: Installing Python 3.10 on openSUSE Leap 15.3
published: true
description: 
tags: python,opensuse
//cover_image: https://direct_url_to_image.jpg
---

## Prerequisites

```
sudo zypper install gcc-c++ make gcc automake autoconf libtool aclocal
sudo zypper si -d python3
```

## Download and unarchive

Download Python-3.10.0.tar.xz; tar xJvf Python-3.10.0.tar.xz; cd Python-3.10.0

## Configure

I got this error message by running ./configure

```
./configure: line 10530: PKG_PROG_PKG_CONFIG: command not found
```

So I ran this:

```
docker run --rm --pull=always -v $(pwd):/src quay.io/tiran/cpython_autoconf:latest
```

Still configure cannot find g++, so I added CXX=c++ in front of configure.

So this was how I used configure:

```
CXX=c++ ./configure --enable-optimizations --prefix=/opt 2> elog > log
```

## make 

This step has no problem.

```
make -j8
sudo make install
```


## Running python

pip3.10 and python3.10 cannot run since it can't find readline.

So I ran this.

```
ln -s /opt/lib64/python3.10/lib-dynload /opt/lib/python3.10/lib-dynload
```

Then python3.10 works now.

P.S. Thank every one who provide answers on issue trackers and forums. I should have kept URLs to those. Sorry that I didn't.
192.68.l.254
Tags: javascript, python, devops, html
Published: 2021-11-10 07:47:20

First, you would like to ascertain whether or not the web affiliation works by connecting the coax cable on to your portable computer or PC. <a href="https://192168l254.com.mx/ES"> 192.168.l.254</a>
In the second row, you want to take away the router and also the user manual with the router. after you flick through the manual, you'll see that your manual ought to contain the user name and positive identification for the default information science address.
In the third step, we tend to raise you to attach the router to the ability provide and boot. this could take a while. you'll see the inexperienced lightweight flashing once the device is prepared to be used.
In the fourth and final step, the method are complete after you connect the local area network / broadband / subscriber line electronic equipment / ISP entree cable.