teleren/devto huggingface dataset:
Self-hosted Miniflux + Wallabag
Tags: rss, selfhosting
Published: 2021-04-01 11:06:58

---
title: "Self-hosted Miniflux + Wallabag"
tags:
  - rss
  - selfhosting
published: true
canonical_url: https://cri.dev/posts/2021-03-23-private-self-hosted-reading-rss-miniflux-wallabag/
---

**Originally posted on [cri.dev](https://cri.dev/posts/2021-03-23-private-self-hosted-reading-rss-miniflux-wallabag/)**

Found the perfect combination for self-hosting my reading stack: Miniflux and Wallabag, you may now kiss!

---

> Note: This is an update to ["My reading stack"](https://cri.dev/posts/2021-02-09-my-reading-stack-miniflux-rss-pocket/)

## Why?

Primarily for keeping the stuff I read private by self-hosting alternative services.

Additionally, to do all my reading from a web browser, without third party services and apps involved.

Another thing I wanted to experiment with was the interoperability between Miniflux and Wallabag.

## How does it work?

Miniflux acts as my RSS feed reader, which integrates with the Wallabag API.

Wallabag is the alternative I use to Pocket, especially for longer reads.

In Miniflux I set up the integration to my Wallabag instance, so that when I hit "Save article", it sends it to Wallabag so that I can read it later (if it's a long read).

I access both services (under practical dns names) on my own domain (both from phone and PC).

## Benefits

Both Miniflux and Wallabag can be "installed" as a PWA on your mobile device and accessed through a web browser on your PC.

No profiling, no tracking involved.

Extremely lightweight stack.

You use FOSS software, to which you can contribute to (or fork it).

## Downsides

Minimum cost of 5$/month for hosting it on [Linode](https://www.linode.com/?r=a248b42e63f90809eedddafd6bb07f1522e09993) or [DigitalOcean](https://m.do.co/c/880e8f681b50).

You need to make sure your VPS is secured, duh.

So far I didn't see any other downsides.

## How to self-host

Both Miniflux and Wallabag have docker-compose files in their repositories, so the installation is quite trivial.

You'll need to figure out the desired environment variables depending on your needs.

I host mine through caprover, through a Web UI it's a few clicks away.

I plan on writing a detailed how to in the future.


**Originally posted on [cri.dev](https://cri.dev/posts/2021-03-23-private-self-hosted-reading-rss-miniflux-wallabag/)**
How to create your own alias for “php artisan” command on cmder
Tags: laragon, laravel, cmder, alias
Published: 2021-04-01 10:48:08

If there is one out of many pain in the A** laravel developer faces especially when building laravel project is continuously typing **php artisan** command for almost laravel artisan command via terminal. This step also can be applied to any repeatable command you normally type when developing an application or working via terminal. 

Lets get started:-

## STEP 1
=> Get **Cmder**  [Download link](https://cmder.net/) or if you have **Laragon** already installed cmder comes preinstalled.
## STEP 2
=> Go to your Laragon installation folder as for me, I install my laragon app at **C:\laragon** as shown below :-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdzdprshj7a3o7nbmzb8.PNG)

## STEP 3
=> To locate cmder goto `C:\laragon\bin\cmder`
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/203h0szkhs7a0485g25a.PNG)

## STEP 4
=> To add an **alias** `C:\laragon\bin\cmder\config`
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xdojl5xa4z7cpbbw5f3u.png)

Locate a file `user_aliases.cmd` and open it.

##Adding Aliases
You can add aliases using the alias command. Aliases added using the alias command will be immediately available and persist across Cmder sessions. For our case type `pa=php artisan $*` as shown below:-

 ![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/355tmhlfeq3ltjnzlkso.png)
 
After following all the steps above down to writing down all your aliases aka nickname or pseudo-name you can save your changes. Then open your *cmder* and type `pa` as shown below:-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vugin5898v3cabfa69vk.PNG)

Congratulation for solving one pain out of many you have when working with repeatable command on cmder.

Thanks for reading!

Remember the like

Any question? drop it at the comment box let see how we can resolve it....
My hackathon Experience
Tags: mlh, localhackday, hackathon
Published: 2021-04-01 10:26:39

MLH Local Hack Day has been one of the best virtual hackathon experience. Its a week packed with new and awesome daily challenges along with a set of week challenges. Interactive workshops and mini events go on through out the day which keeps us thrilled . The team is always there to support . Overall its one of the best hackathon!
How to Configure Firefox to Use a Proxy Server on a Mac
Published: 2021-04-01 10:24:54

Firefox on Mac uses the Mac system settings to configure the proxy server. This is how you open it.

Click on the Firefox menu and then select Preferences.
Now scroll down till you see the Network Settings section.

Click on the Settings buttons.
This will open up the connection settings dialog. If you haven't set a proxy earlier mostly likely, it will default to system settings as below.
To set the proxy, click on the Manual proxy configuration option.

Enter the IP and port of the proxy against the HTTP proxy. If your proxy supports HTTPS and socks, check the box, as shown below. Please note that Firefox doesn't ask for a username password for the proxy at this stage.
Once you have saved this, browse to any website on Firefox, and the username and password will be prompted if the proxy server needs it. Enter then, and you are good to go.

That saves the proxy settings fully, and you can now navigate Firefox to a service like HTTPBin http://httpbin.org/ip to see if Firefox is using the proxy you typed in or not.
My Experience in LHD by MLH Share-Sakshi Bhalla
Tags: localhackday
Published: 2021-04-01 09:42:58

![Banner](https://res.cloudinary.com/practicaldev/image/fetch/s--y7OEJTx---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/ExklYXaXAAAMIPz.jpg)
 #What is Local Hack Day?

Local Hack Day is a week-long hackathon that takes place annually. Local Hack Day is taking place for the last 8 years(except 2020). It is recognized all over the world. It comprises of daily and weekly events. The complexity of challenges varies and therefore, the candidate attending the event and can do the task according to their own knowledge.

#What is LHD: Share?
Local Hackday Share or LHD: Share is a 3rd part of the local hackday(LHD). Local Hack Day: Share is a week-long celebration of sharing everything you’ve learned as a hacker. If you’ve been hacking with us all year, we’re excited to have you back. If this is your very first event, we’ve got a ton of beginner-friendly challenges for you to complete that’ll have you shipping your hack like a pro in no time. You’ll have your pick of technical, design, and social challenges to complete - each with an emphasis on sharing your work. The more challenges you conquer, the more points you’ll earn. Tune in each day to check out the leaderboards and share what you’ve built.

#What are the Features of Local Hack Day?

1- It’s compatible with a range of people.
2- They have leaderboard updates every single day, to return the enthusiasm to everyone.
3- It has guilds (group) formed from the whole community. And this guild helps every member of the guild to improve. The best and most famous is #BLAHAJGang🍉🦈. 
(I'm a part of Developer Student Community).

#Why I Like to Attend LHD: Share?
*I like the community it has.
*There is a lot of fun in doing that.
*Lots of fun and creative day on Twitch channel.
*MLH always try to empower other hackers and give them lot of opportunities.
*It values fun and learning new things than being a competitive environment.
How to Configure Google Chrome to Use a Proxy Server on Windows 10
Published: 2021-04-01 10:23:54

Here is how you quickly configure Google Chrome on Windows to use a proxy server.

Step 1. On the top right corner of Google Chrome, you will find an icon called Customise and Control. Click on that

Step 2. Now click on Advanced Settings

Step 3. Scroll to the 'Network' area of the settings and click on Change proxy settings

Step 4. Click on the Connections tab inside the Internet Options window. Now click on LAN Settings.

Step 5. Tick the option. Use a proxy server for your LAN

Step 6. Enter the proxy server IP and Port. Also, enter the username and password if needed.

Step 7. Click OK and then click on Apply to save the new settings

That saves the proxy settings, and you can now navigate Chrome to a service like HTTPBin http://httpbin.org/ip to check if Chrome is using the proxy you typed in or not.
Login user using firebase
Tags: vue, webdev, javascript, firebase
Published: 2021-04-01 10:12:06

---
title: Login user using firebase
published: true
date: 2021-04-01 10:10:00 UTC
tags: vue, webdev, javascript, firebase
series: Vue Full Application Build
canonical_url: https://hiltonmeyer.com/articles/series/pantry/9-auth-login.html
---

_Code for this can be found in the [Github Branch](https://github.com/bikingbadger/pantry/tree/9-auth-login)_

In the vuex [auth store](https://dev.to/iarehilton/register-user-to-firebase-4n5e) all that needs to be done is add the login functionality. The great thing about using actions for asynchronous functions and let the mutations handle the state changes is as you can see in this case the mutation is the same whether the user registered or logged in for both success or failure. So firebase does all the heavy lifting of handling the auth which is a world unto its own and we just manage the state using Vuex. The application will then reflect the current state.

```
import firebase from '@/firebase.js';

const userRef = firebase.firestore().collection('/user');

export default {
  async register({ commit }, user) {
    try {
      // Register user
      const registered = await firebase
        .auth()
        .createUserWithEmailAndPassword(user.email, user.password);
      console.log(registered);

      // Create userdata
      const userData = {
        id: registered.user.uid,
        username: user.username,
        email: user.email,
      };

      // Save user to DB
      const createUser = await userRef.add(userData);
      commit('authSuccess', createUser);
    } catch (err) {
      commit('authFail', err);
    }
  },
  async login({ commit }, user) {
    try {
      const loggedIn = await firebase
        .auth()
        .signInWithEmailAndPassword(user.email, user.password);
      console.log(loggedIn);

      const userData = {
        id: loggedIn.user.uid,
        username: user.username,
        email: user.email,
      };

      commit('authSuccess', userData);
    } catch (err) {
      commit('authFail', err);
    }
  },
};

```

The next step will be to add a login form similar to the [registration form](https://dev.to/iarehilton/register-form-k45) and then start creating checks on the routing.
Quick handle CORS with Nginx
Tags: webdev, devops, nginx
Published: 2021-04-01 09:56:15

## Notes

In some cases, you would like to disable the cross origin requests restrictions because it is only allowed for same origin by default.

In my case, I deal with several APIs with differents origins.

## Code

1) GET/OPTIONS endpoint

```bash
  location / {
      # Allow some origins
      #if ($http_origin ~* (https?:\/\/(localhost:8000|myfirstorigin:8000))) {
      #	set $cors "1";
      #}

      # Allow all origins
      set $cors "1";

      # Append CORS headers to any request from allowed CORS domain, except OPTIONS
      if ($cors = "1") {
          add_header Access-Control-Allow-Credentials true;
          add_header Access-Control-Allow-Origin $http_origin;
      }

      # OPTIONS (pre-flight) request from allowed CORS domain. return response directly
      if ($request_method = 'OPTIONS') {
           add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS, PUT, DELETE';
           add_header Access-Control-Allow-Credentials true;
           add_header Access-Control-Allow-Headers 'Origin,Content-Type,Accept';
           add_header Content-Length 0;
           add_header Content-Type text/plain;
           return 204;
      }

      proxy_set_header Host $http_host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_pass https://mysecondorigin/api/;
      proxy_http_version 1.1;
      proxy_read_timeout 600s;
  }
```

2) POST endpoint

```bash
add_header Access-Control-Allow-Origin $http_origin;
```
If (all) else is complicated, switch to switch?
Tags: webdev, programming, javascript, discuss
Published: 2021-04-01 09:52:01

Just a little piece of awesome code I picked up at work: replacing an if else statement with a switch!

```typescript

if(someExpressionA){
  console.log('yes');
} else if (
  someExpressionB && someExpressionC 
  || someExpressionD
) {
  console.log('nope');
} else {
  console.log('maybe');
}

switch(true){
  case someExpressionA: 
    console.log('yes');
    break;
  case someExpressionB 
    && someExpressionC:
  case someExpressionD:
    console.log('nope');
    break;
  default: 
    console.log('maybe');
}

``` 
It feels hacky and awesome at the same time 😂 Do you think it's worth using?
Transform any Kitchen Chair Into a 360º Spinning Chair
Tags: watercooler
Published: 2021-04-01 09:50:30

Say hello to the ultimate tool that brings back mobility to all remote workers who were forced to turn their homes into their offices. With [The Freedom Wheels](https://thefreedomwheels.com) you can now transform every kitchen chair, bench, or stool into a 360° spinning chair, just like in the office.
One-Liner Puzzle - Fill Array with indices
Tags: javascript, puzzles, array, fundamentals
Published: 2021-04-01 09:34:16

### Premise

Write a function `f`, that receives an integer `n` and returns a new Array of size `n` and which contains in each entry the index `i`. For example:

`f(0) => []`
`f(3) => [0, 1, 2]`
`f(5) => [0, 1, 2, 3, 4]`

### Constraints

- all code in one line
- max allowed bytes/characters is 36
- no underscore/lodash/libraries, just vanilla JS
- ES6 is recommended
- assume all inputs of `n` to be greater or equal `0` and lower than `Number.MAX_SAFE_INTEGER`
- no performance considerations for this puzzle

### Spoiler alert

If you like to solve on your own, please avoid the comment section until you solved it or (hopefully not) give up.

<!-- 
you sneaky hackerman found my solution <3 
it's: f=n=>[...new Array(n)].map((v,i)=>i)
-->

### Hints

- you should not target for "clean" code
- omit variable declarations
- remove any whitespace where you can
- start with a working implementation and narrow down
- if you are totally new to this appraoch, try my [introduction to one-liners](https://dev.to/jankapunkt/let-s-solve-a-one-liner-code-puzzle-2351)

## Have fun!
My LHD SHARE 2021
Published: 2021-04-01 09:27:31

What is Local Hack Day?
Local Hack Day is a week-long hackathon that takes place annually. Local Hack Day is taking place for the last 8 years(except 2020). It is recognized all over the world. It comprises of daily and weekly events. The complexity of challenges varies and therefore, the candidate attending the event and can do the task according to their own knowledge.

What is LHD: Share?
Local Hackday Share or LHD: Share is a 3rd part of the local hackday(LHD). Local Hack Day: Share is a week-long celebration of sharing everything you’ve learned as a hacker. If you’ve been hacking with us all year, we’re excited to have you back. If this is your very first event, we’ve got a ton of beginner-friendly challenges for you to complete that’ll have you shipping your hack like a pro in no time. You’ll have your pick of technical, design, and social challenges to complete - each with an emphasis on sharing your work. The more challenges you conquer, the more points you’ll earn. Tune in each day to check out the leaderboards and share what you’ve built.

What are the Features of Local Hack Day?
It’s compatible with a range of people.
They have leaderboard updates every single day, to return the enthusiasm to everyone.
It has guilds (group) formed from the whole community. And this guild helps every member of the guild to improve. The best and most famous is #BLAHAJGang🍉🦈.
How to install CMAKE (lastest version)
Tags: cmake, ubuntu
Published: 2021-04-01 09:17:24

# Let's install openssl before installing cmake.
**1. openSSL install**
homepage download
**[openssl download](https://www.openssl.org/)**
```bash
sudo apt install wget
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
tar openssl-1.1d.tar.gz
cd openssl-1.1.1d
```
build OpenSSL
```bash
./config
make
make test
sudo make install
```

**2.Cmake at lastest version install**

**2.1 홈페이지에서 다운로드**

**[cmake download](https://cmake.org/download/)**


**2.2 wget 으로 다운로드**

```
wget https://cmake.org/files/v3.16/cmake-3.16.2.tar.gz

```

**2.3 압축풀기 및 설치**

```
$ tar -xvzf 해당파일.tar.gz
$ cd 압축풀린폴더
$ ./bootstrap --prefix=/usr/local
$ make
$ make install

```

**2.4 설치 확인**

```
$ cmake --version

```

**만약에 해당 명령어를 찾을 수 없다고 나오는 경우에는**

```
$ vi ~./bash_profile

```

**아래와 같이 패스 수정**

```
PATH=/usr/local/bin:$PATH:$HOME/bin
```

**그 다음 ssh 를 재시작 하면 된다.**
SEO is a lie, here's why
Tags: watercooler
Published: 2021-04-01 09:10:31

When your highly personalized Google search results are tailored to you and you then want to measure the performance of your own stuff, for the love of God don't use your own computer to look it up, if you appear on the first page, that might be because it's very relatable to your searches, the ones you used to research and create this stuff.

A first page result is absolutely no garentee that other people are going to see the same as you. And there is only one way to control what people search, social engineering.

So I think a better metric is, how many people did arrive on your site for a particular bit of content.
Query the DOM using ES6
Tags: javascript, webdev
Published: 2021-04-01 08:50:40

🤔 Why do you need to include the language version? such simple task, you must be thinking.

Yes you,

 I'm talking to you, the one with the haircut that's this long:
![who me?](http://www.reactiongifs.com/wp-content/uploads/2012/12/who-me.gif)

...wait we all have hair like this don't we?

Well believe it or not I'm about to teach you something so blindingly obvious, you'll kick yourself that you didn't spot it, call your relatives and tell them before forgetting about this again.

## Let's query
Why do this?
```js
const username = document.getElementById("#username");
const password = document.getElementById("#password");
```
when you can do this ES6 de-structure that NodeList 
```js
const [username, password] = document.querySelectorAll("#username, #password");
```
One call to query the DOM, but this only works for finite queries which can be determined, you know you have 2 IDs and so should not have any other elements returned, or perhaps you query on some other attribute, as long as the results are predictable this will work nicely.

When are results predictable, forms should be at least?

I submit that this isn't for everything 💜
Add Borders to Cells in Excel worksheets in Java
Tags: java, excel, border, sytle
Published: 2021-04-01 08:37:49

---
title: Add Borders to Cells in Excel worksheets in Java
published: true
description: Java add Borders to excel and set styles and corlors for the borders
tags: java, excel, border, sytle
//cover_image: https://direct_url_to_image.jpg
---
When we work with Excel worksheets, we could add borders to individual cells to emphasize data, mark summarized values, or separate data in cell ranges. Borders can also be formatted with different line styles and colors. This article demonstrates how to add borders to cells in an Excel file by using Spire.XLS for Java.

Firstly, view the screenshot which shows the sample Excel file before adding borders:
![Sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0hw7v9ip3pkzil29ckno.png)

Code snippets of adding borders to Excel worksheet:
```java 
import com.spire.xls.*;
import java.awt.*;

public class AddExcelBorders {
    public static void main(String[] args) throws Exception {
        
        //Load the sample Excel file
        Workbook workbook = new Workbook();
        workbook.loadFromFile("Sample0.xlsx");
        //Get the first worksheet
        Worksheet sheet = workbook.getWorksheets().get(0);

        //Add border for cell range from A1:E4 and set the border style
        CellRange cr = sheet.getCellRange("A1:E4");
        cr.getBorders().setLineStyle(LineStyleType.Double);
        cr.getBorders().getByBordersLineType(BordersLineType.DiagonalDown).setLineStyle(LineStyleType.None);
        cr.getBorders().getByBordersLineType(BordersLineType.DiagonalUp).setLineStyle(LineStyleType.None);
        cr.getBorders().setColor(Color.BLUE);

        //Add border for cell range from A7:E9 and set the border style
        cr = sheet.getCellRange("A7:E9");
        cr.getBorders().setLineStyle(LineStyleType.Thin);
        cr.getBorders().getByBordersLineType(BordersLineType.DiagonalDown).setLineStyle(LineStyleType.Thin);
        cr.getBorders().getByBordersLineType(BordersLineType.DiagonalUp).setLineStyle(LineStyleType.Thin);
        cr.getBorders().setColor(Color.green);

        //Add border for cell range from A12:E19 and set the border style
        cr = sheet.getCellRange("A12:E19");
        cr.getBorders().setLineStyle(LineStyleType.Thick);
        cr.getBorders().getByBordersLineType(BordersLineType.DiagonalDown).setLineStyle(LineStyleType.None);
        cr.getBorders().getByBordersLineType(BordersLineType.DiagonalUp).setLineStyle(LineStyleType.None);
        cr.getBorders().setColor(Color.red);

        //Save the document
        workbook.saveToFile("SetBorder.xlsx", ExcelVersion.Version2010);
    }
}
```

Output after adding borders and set the styles to the border on Excel worksheet:
![Add boraders to Excel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uz8cr2s2xhbujt3i1of.png)
Displaying the capitals of countries on the map with Vue.js.
Tags: javascript, scss, leaflet
Published: 2021-04-01 08:25:54

This project is a project that I made to learn about the capitals of the countries. It is a project I made with SCSS and Pure JavaScript to improve myself and learn about country capitals.

In this project, I used the open-source leaflet map and the population API by making fetch. It is a simple project that will write input in the name of the desired country and show it with a pointer to the country you want on the map.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5cbw9p2h6gkrdgfjvdn.png)

I made the project responsive. It can be used very easily on phones and tablets.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fb4b7po7e3jbyzq1bbku.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yay3zt50n842d8an4is.png)

I added the source code of this project to Github. And I deployed it with the [Github page](https://cihat.github.io/capitals-of-countries/).

The [source code](https://github.com/cihat/capitals-of-countries) of the project is available on my github account.