teleren/devto huggingface dataset:
Redirect to New Component using Angular 9|8|7 Routing Service
Tags: angular, angular987, routingservice
Published: 2020-01-30 11:38:40

---
title: Redirect to New Component using Angular 9|8|7 Routing Service
published: true
tags: Angular , Angular 9|8|7 , Routing Service
canonical_url: https://www.positronx.io/redirect-to-new-component-using-angular-7-routing-service/
---

Hello folks! Today I am going to talk about how you can redirect to new pages or components using Angular 7 routing service. Usually when your app initializes it redirects to the empty route by default. Angular offers powerful routing system to redirect to your favorite routes. We setup `app-routing.module.ts` file to maintain redirection service in Angular. After setting up `app-routing.module.ts` file we can configure the Angular routing service to redirect to named URLs.

## Step: 1 – Generate App Routing File for Angular Redirection Service


[Click here to read more](https://www.positronx.io/redirect-to-new-component-using-angular-7-routing-service/)
Basic Vue dApp examples with Ethereum, Tron and Qtum
Tags: vue, javascript, blockchain, beginners
Published: 2019-01-02 08:35:26

---
title: Basic Vue dApp examples with Ethereum, Tron and Qtum
published: true
description: Starting point for other developers to develop dApps on Vue
tags: vue, javascript, blockchain, beginners
cover_image : https://thepracticaldev.s3.amazonaws.com/i/a7c7jain1e7zx86bolf8.PNG 
---
## So, What is a dApp?
Typically associated with the Ethereum project, a decentralized application, or dApp, is an application that runs on a peer-to-peer network of computers, as opposed to a single computer. The key benefit of this is, users of the network do not depend on a central computer in-order to send and receive information.

## Examples
I didn’t find a lot of Vue dApp examples, so as a little side project I build some starter packages with the hope that they can serve as examples, starting points or inspiration for other developers!

All projects include:
 - Vue-cli 3.2.1
 - TypeScript (class style components)
 - End-to-end testing
 - Unit testing
 - Smart contract examples writtin in Solidity
 
### Ethereum

{% github https://github.com/marlowl/vue-truffle-starter-dapp %}
{% github https://github.com/marlowl/vue-voting-dapp %}
{% github https://github.com/marlowl/vue-web3-wallet %}



### Tron
{% github https://github.com/marlowl/tron-starter-dapp %}


### Qtum
{% github https://github.com/marlowl/qtum-starter-dapp %}


Enjoy!
Homebrew for Web Development
Tags: webdev, productivity
Published: 2019-04-09 05:08:59

---
title: Homebrew for Web Development
published: true
tags: webdev, productivity
canonical_url: https://kaspars.net/blog/homebrew-wordpress-macos
---

[Homebrew](https://brew.sh/) is an awesome command-line software management solution for macOS (similar to [MacPorts](https://www.macports.org/)). It can install pretty much all software required for web development and keep it organised ([under](https://docs.brew.sh/FAQ)`/usr/local`) and updated with a single command.

## Why is it awesome?

- Installs packages quickly without having to download and run the installers via a web browser.
- Builds everything from source (unless installing from cask) which makes it secure. Compares checksums of the download files against known references.
- Places everything under `/usr/local` and doesn’t use root privileges for added security and limited system access. 

## Use It

Here is how to install some of the most popular packages. In most cases you just need to run `brew install PACKAGENAME` or `brew cask install PACKAGENAME` for packages that are distributed as binaries.

## Development Tools

Install [Node.js](https://nodejs.org/en/) and [npm](https://www.npmjs.com/):

```
brew install node
```

Install [Composer](https://getcomposer.org/):

```
brew install composer
```

## Editors

Install Visual Studio Code:

```
brew cask install visual-studio-code
```

Install Atom:

```
brew cask install atom
```

## Virtual Development Environments

Install VirtualBox:

```
brew cask install virtualbox
```

Install Vagrant:

```
brew cask install vagrant
```

Install Docker and Docker Compose:

```
brew install docker docker-compose
```

## Useful Commands

Update Homebrew and the package information:

```
brew update
```

Update all installed packages:

```
brew upgrade
```

Remove old versions of packages:

```
brew cleanup
```

List all installed packages:

```
brew list
```
New year new me
Tags: newyear
Published: 2019-01-02 07:41:23

---
title: New year new me
published: true
description: new year
tags: new year 
---
New year new me! Sounds like a cliche right? Well sometimes all it takes is one small thing in our lives that can help us change.
 Now one of the biggest things people do is want to hit the gym and get in shape. One of the things I was taught while serving in the United States Army was get into gym clothes while being lazy and just doing that one thing that had to do with exercise made me less lazy and made me go work out. 
 Now this may or may not work for everyone but as soon as you get that feeling of "I should hit the gym and work out!" that's when you need to go and work out before you get into making excuses for why you should wait until tomorrow.
Build Your Own Web Application Development-MintTM
Published: 2019-01-02 07:20:26

---
title: Build Your Own Web Application Development-MintTM

published: True

---

description: We at MintTM having considerable experience in the enterprise web application development and web designs. MintTM offers various services like:
- Website designs
- Graphics Designs
- eCommerce app development
- Python development
- Enterprise web application development
- Digital marketing
- Logo designs
- Internet marketing  
- Android application development

View More Features: https://www.minttm.com/web-app-development. 

tags: 	enterprise web application development, PHP web application development, web app development, web application development services, WordPress developers
Writing React with TypeScript
Tags: react, typescript, webdev, githunt
Published: 2019-01-02 07:05:28

Just a quick note today as I stumbled over a [a nice GitHub repo](https://github.com/sw-yx/react-typescript-cheatsheet):

We've made good experiences writing React Applications with TypeScript -- and I just now stumbled across a good cheat sheet which summarizes many of the lessons learned:

{% github sw-yx/react-typescript-cheatsheet %} 

We've summarized our own best practices at [sandstorm](http://sandstorm.de) in a GitHub boilerplate (created by my great colleague [Robert Baruck](https://twitter.com/jamesalias)), with the best practices summarized [in a GitBook](https://sandstorm.github.io/typescript-react-app-kickstart-guide/):

{% github sandstorm/typescript-react-app-kickstart-guide %}

We've also published [a VSCode Snippet Extension(https://marketplace.visualstudio.com/items?itemName=Sandstorm.vscode-awesome-ts-react-redux-snippets) which helps to write TypeScript/React with little boilerplate.

What are your experiences writing React + TypeScript?

All the best,
Sebastian
Contributors wanted for 10secondsofcode
Tags: contributorswanted, opensource, react, javascript
Published: 2019-01-02 05:31:39

---
title: Contributors wanted for 10secondsofcode
published: true
description: 
tags: #contributorswanted, #opensource, #react, #javascript
---

Hi,

I was working on 10secondsofcode like snippets for javascript, reactjs, but open source and completely free to the awesome community.

The current stack is:

Reactjs 16.6 for frontend
Symfony4 for backend

So I want some help in easily writing the in React and javascript snippets.

I really hope to provide an open source website to the community that have all the features the current non open source website have.

Here is a GitHub organization for 10secondsofcode.

Please if you are interested in contribution reply here, so we can start ;)

** Repo :** https://github.com/10secondsofcode/10secondsofcode
Day 1: Making a swift macOS password manager for people who hate the cloud
Tags: macos, swift, passwordmanager, cloud
Published: 2019-01-02 03:56:02

---
title: Day 1: Making a swift macOS password manager for people who hate the cloud
published: true
description: Watch as I make a password manager for macOS this month
tags: macos, swift, password manager, cloud
series: Making a swift MacOS password manager for people who hate the cloud
cover_image: https://thepracticaldev.s3.amazonaws.com/i/q6r73zbfbm3mpfs98bu5.jpg
---

I'm making a native macOS password manager for old grumpy people who hate the cloud this month and I'm going to blog about my progress every day. Let's get started.

![](https://i.kym-cdn.com/photos/images/newsfeed/001/044/247/297.png)
That's me

## Features

I should probably lay out the features and things because I'm a great planner and I'm really organized too? So that's good. Features:

- one password to rule them all
- swift + xcode + macos only, no js, no electron, no v8, no google, no chrome, no unnecessary battery drain-age, upvotes on hacker news
- no clouds, no servers, all clients!
- OPEN SOURCE because i love making things in my spare time for free!
- $29 one time/lifetime through app store and on website because i love making things in my spare time for $$ and there's really no better way to give 1password the finger than to stop your subscription and give ME your hard earned cash instead!

*BONUS FEATURES*

- ios app (in a month, what am I some kind of swift superhero? yeah right)
- sync to ios over LAN or bluetooth in the background or on demand somehow? <--- not sure if the bluetooth syncing is possible

## What I did today

It's day one (just like at amazon!) everybody, so what have I done today?

- I woke up, drank one cup of coffee, got the beans out for another grind
- made a new project in Xcode
- reviewed the new Apple developer terms of service or agreement or something on developer.apple.com

...and that's all I did today so far, it's 12:09 pm now, definitely making great progress. Cool, tune in tomorrow for more. No I'm kidding, let's keep going.

## Making a screen with a text field

Now that I've actually opened Xcode and started a new swift... ahem Cocoa project, there's nothing quite like a blank canvas for which to [hack and paint](http://www.paulgraham.com/hp.html) on or something. Alright, first step, create a super ugly screen with one textfield representing the single password:

![allyourpasswords v0](https://i.imgur.com/xfty7uR.png)

Of course now that I've done this it makes no sense, because I have to set up a password first and store it in sqlite. It's great being me. I just spent most of my time today trying to get a password field to have larger text, this is the thing Apple makes difficult... great. No wonder people use electron.

Tune in tomorrow, same Sean time, same Sean place for getting the setup page working!
Friends Don't Let Friends Look Dead On The Internet
Published: 2019-01-02 00:18:33

---
title: Friends Don't Let Friends Look Dead On The Internet
published: true
description: 
tags: 
cover_image: https://cl.ly/f5c1f6f4d97c/download/Image%202019-01-01%20at%207.06.20%20PM.png
---

I love that we received six PRs to update all instances of the year 2018 --> 2019! What a fun contribution.

While thinking about this, I came across: http://updateyourfooter.com/. I can't recall if there's a reason we've hardcoded the year. 

That is all 🙃
Importance of `.indexOn` in Firebase
Tags: javascript, firebase
Published: 2019-01-01 22:18:15

---
title: Importance of `.indexOn` in Firebase
published: true
description: The Importance of `.indexOn` in Firebase
tags: javascript, firebase
---

Firebase allows you to do ad-hoc queries on a collection of nodes in your database using any common child key. If you know in advance what your indexes will be, you can use the Firebase Real-time Database Rules to define the indexes for your data using the “.indexOn” rule to improve performance.


## Why should I care?
As your web app or website grows in size, the performance of its query degrades. If you define your indexes on the keys you will be querying, this will help both in performance and in the amount of data used.

Firebase will index using those keys on their servers, improving your queries and amount of data sent. Otherwise without the index defined the sorting will be done on the client side.

Look at this snippet as an example. I will use it to explain how “.indexOn” works with the built in function orderByChild().


![alt text](https://thepracticaldev.s3.amazonaws.com/i/5ivgvvwi1nycgryleqij.png "Logo Title Text 1")


So with this data, I will be querying by the engineSize and/or the year key. Imagine is node is one thousand nodes in length and no index set. It will return all the data to the client.

The names of the cars are already an index so Firebase already optimizes for queries by car names. You can use “.indexOn” to tell Firebase to optimize queries for engineSize and year as well. This will be done on Firebases` servers before it is returned.


![alt text](https://thepracticaldev.s3.amazonaws.com/i/i1os0srcb2zbxt6rk8fm.png "Logo Title Text 1")


The importance of the indexon function is for better performance and querying. So next time you’re designing your Firebase real-time database, take time even if it’s a small hobble app, to define your indexes. As you will see better performance and less bottlenecks on the client side as your database grows.

If you would like to be alerted when I publish new blog posts or coding project. You can follow me on [Github](https://www.github.com/robertjgabriel) and [Twitter](https://www.twitter.com/robertjgabriel).

### Footnotes

- https://firebase.google.com/docs/database/security/indexing-data
- https://stackoverflow.com/questions/33206932/how-to-write-indexon-for-dynamic-keys-in-firebase
- https://stackoverflow.com/questions/40837952/consider-adding-indexon-for-firebase
- https://stackoverflow.com/questions/43260689/adding-and-indexon-value-into-firebase-rules
Async-Ray and alls 2 promise utility libraries are written in TypeScript
Tags: typescript, promise, node, javascript
Published: 2019-01-01 22:17:58

---
title: Async-Ray and alls 2 promise utility libraries are written in TypeScript
published: true
description: Async-Ray and alls, Promise utility libraries in TypeScript 
tags: TypeScript, Promise, nodejs, Javascript
---
Hi EveryOne,
I would like to introduce below 2 libraries. They are written in TypeScript with 100% test coverage.

### Async-Ray:
Purpose of this package is to provide ``async/await`` callbacks for ``every`` , ``filter`` , ``find``, ``findIndex`` , ``forEach`` , ``map``, ``reduce``, ``reduceRight`` and ``some`` methods in Array with easy chaining.
* Repo: [https://github.com/rpgeeganage/async-ray](https://github.com/rpgeeganage/async-ray)
* Chaining Samples: 
	* [https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_1.ts](https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_1.ts)
	* [https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_2.ts](https://github.com/rpgeeganage/async-ray/blob/master/examples/chain_sample_2.ts)

### alls:
Just another library with the sole purpose of waiting till all promises to complete Nothing more, Nothing less. Since ``Promise.all()`` doesn't wait if an error.
* Repo: [https://github.com/rpgeeganage/alls](https://github.com/rpgeeganage/alls)
* Samples: [https://github.com/rpgeeganage/alls/blob/master/test/alls.ts](https://github.com/rpgeeganage/alls/blob/master/test/alls.ts)

Thank you
Turn On localhost Testing Using aXe Core For Chrome
Tags: a11y, frontend, webdev
Published: 2019-01-01 20:08:54

---
title: Turn On localhost Testing Using aXe Core For Chrome
published: true
description: In this blog post, I will demonstrate how to turn on local testing in the aXe Core Chrome extension settings.
tags: a11y, accessibility, front end, web development
---

Hey friends! What is going on? I hope everyone is having a good start to the new year. I can't believe it is already 2019. What better way to celebrate new beginnings than with my very **FIRST** post ever to published on dev.to! Without further ado, let the learning commence.

_This post is just a quick tip._

## aXe Core in Chrome
I ❤️ [Deque](https://www.deque.com/) and I ❤️ aXe Core when it comes to accessibility auditing and testing. It is my go to for testing tools and I advocate for the tool at every conference I speak at. Well, have you ever tried using the aXe Core Chrome extension and received an error that you can't test local files, turn on local files in the settings of the extension? You have? Me too!

I reached out to my friend [Marcy Sutton](https://marcysutton.com/) that works for Gatsby now, but at the time of writing, Deque, and she told me how to fix that error so I could test locally. Below are a couple steps if you run in to the same issue as well.

* Navigate to `chrome://extensions` in Chrome
* Flip the switch on local files, and incognito if you are feeling lucky.

![aXe Core testing localhost fix](https://raw.githubusercontent.com/chrisdemars/dev-to-blog-images/master/axe-settings.jpg)

I hope this was beneficial in testing the accessibility of the experiences you are working on and shipping.
Exporting posts out of Wordpress and into Gatsby!
Tags: gatsby, wordpress, netlify, sideprojects
Published: 2019-01-01 20:00:28

---
title: Exporting posts out of Wordpress and into Gatsby!
published: true
description: 
tags: gatsby, wordpress, netlify, side-project 
---
My friend Eric has been working on a project called [Outreach For Taiwan](https://oftaiwan.org/) for the last five years. It's been a serious labor of love where he travels around to different colleges during his (very limited) vacation days, and gives talks on topics ranging from culture and identity to history and politics. Educating people about Taiwan is something that means a lot to me, so I love and support what he's doing. Recently, the project was losing momentum so I offered to be Eric's official sounding board -- a person to bounce ideas off of. Sometimes you just need an ear or someone asking you questions to stay on track. I'm not sure the project itself has benefited much from my presence, but it's been personally fulfilling to be more 'in the loop' on all things Taiwan. 

Anyway, to the web development part. I wanted to experiment with Gatsby and the Netlify CMS over my holiday break and decided that creating a mock Outreach For Taiwan website would be a fun project. 

I used the [gatsby netlify starter](https://www.gatsbyjs.org/starters/netlify-templates/gatsby-starter-netlify-cms/) and had everything running in no time. I loved Gatsby's documentation, both the [quick start guide](https://www.gatsbyjs.org/docs/quick-start) and [tutorial](https://www.gatsbyjs.org/tutorial/) was well-written and easy to follow. Once the starter was up, I decided it was important to import all existing Outreach For Taiwan blog posts. Don't ask me why, I think I just wanted the satisfaction of 'seeing' all the posts and my whole motivation for this was to try something new and have fun. This led to figuring out how to export wordpress posts into markdown and front matter. 

And that's when I discovered this helpful tool...

{% github https://github.com/SchumacherFM/wordpress-to-hugo-exporter %}

Per the readme, I needed a local instance of wordpress on my machine to install the plugin. Since I've never setup wordpress before, I decided to go the docker route.

{% github https://github.com/wodby/docker4wordpress %}

It took a little time for me to get the instance set up because I'd never touched docker before but once it was up, exporting the posts to markdown was super straight forward. The trickiest part was realizing that I needed to zip up the files in the repo and upload it as a plugin on wordpress. I should probably submit a PR in the readme to make that crystal clear -- it seems quite obvious in hindsight but figuring that out took much longer than I want to admit. 

Holiday time took over the rest of my break so that's all I accomplished. But that's ok! My goal was to get a taste of technologies I don't use on the daily, and this did exactly that. Perhaps on my next break I'll try to get further with this, or try building another mock Outreach For Taiwan site with a totally different set of tools.
JBOSS EAP 7.1 + Spring boot hello world & visualVm observation
Tags: jboss, springboot, visualvm
Published: 2019-01-01 19:40:46

---
title: JBOSS EAP 7.1 + Spring boot hello world & visualVm observation
published: true
description: memory management of jboss after 1st spring boot hello world deployment
tags: JBOSS, springBoot, visualVm
---

#Introduction
In my previous post, we already knew how much jboss-eap-7.1 will eat up your memory by default ( no deployment ). Now time to see how simple deployment spring boot hello world will eat up our memory inside JBOSS.

##tools involved
1. jboss eap 7.1 ( duh )
2. visualVm

##how we did it
1. create a simple hello world spring mvc
2. deploy it into already running jboss eap
3. monitor the visual vm for increase of memory usage

###output

heap size after deployment:
![heap size after deployment]
(https://thepracticaldev.s3.amazonaws.com/i/lsm7z9hso5wk6og0jchp.png)

metaspace after deployment:
![metaspace after deployment]
(https://thepracticaldev.s3.amazonaws.com/i/nu6igcauhqjpps1mw3y0.png)

class loaded after deployment:
![class loaded after deployment]
(https://thepracticaldev.s3.amazonaws.com/i/ev1d9r7wd859mqzxn35t.png)

###some theory on what just happened? 
1. hey this war have bunch of library & class need to be load
2. object creation causing increase in heap size

###things to ponder
1. what if we deploy another war inside same jboss instance? 
2. what if this new war shared same library with the previous war?
Gatsby and WordPress: Keeping it cheap and staying in touch
Tags: wordpress, gatsby
Published: 2019-01-01 18:23:24

_Photo by Billy Huynh on [Unsplash](https://unsplash.com/photos/saS98jKhVjA)_


_This is the start of a blog post series about creating Gatsby site with content pulled in from a WordPress site._

Gatsby is a static site generator based around the JAMStack (JavaScript, APIs and Markup) and uses React and GraphQL to create blazingly fast sites. It’s fast because the sites it creates are static and uses modern web techniques like service worker and webpack. You can pull content from various sources using plugins, once pulled in to Gatsby they can be turned into static assets.

By the end of this series you’ll have learnt:

- How to create a new Gatsby site
- How to configure the WordPress plugin to connect to a WordPress.com blog
- How to adapt the starter site to use the newly created WordPress Posts and Pages nodes
- Automatically publish to Netlify via GitHub
- Finally set up the WordPress.com blog to notify Netlify when a new post has been published to trigger a new build of the Gatsby site

Things you’ll need to follow along:

- A [GitHub](https://github.com) account
- A [Netlify](https://netlify.com) account
- A [WordPress.com](https://wordpress.com) account
- Favourite snacks and beverage

We’ll also assume you understand Git basics, Node (and friends) and are comfortable with the command line. 

If you get stuck you can always check out my reference site on GitHub. At the end of a section, I’ll stick in the commit hash that closely matches the changes we made.

_To go to the next part of the series, click on the grey dot below which is next to the current marker (the black dot)._