teleren/devto huggingface dataset:
Using ngrok to test local websites and APIs
Published: 2021-05-28 08:48:19

---
title: Using ngrok to test local websites and APIs
published: true
date: 2021-04-07 12:00:00 UTC
tags: 
canonical_url: https://www.alexhyett.com/using-ngrok-to-test-local-sites-api/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x73eefe954fu59z75t8x.jpg
---

Often when I am creating a new website, I want to see how it is going to look on an actual device like my phone or tablet. You can use Chrome Web Tools for mimicing a device but it isn’t the same as an actual phone.

Chances are however that if you try and access the service using your IP Address on another device it will likely be blocked by your operating systems firewall. If you want to share the website or API with someone not on your network then you need to jump through lots of hoops such as forwarding the port on your router.

This is where ngrok comes in. It allows you to expose your local service or website over a secure tunnel.

## Installing Ngrok

Ngrok couldn’t be simpler to install.

1. Head over to [ngrok.com and sign up](https://dashboard.ngrok.com/signup) for an account (it’s free).
2. Download ngrok for your operating system. They support Windows, Mac (Intel and Arm), Linux (Intel and Arm) and FreeBSD.
3. Unzip the downloaded zip file
4. Connect ngrok to your account `./ngrok authtoken <auth token here>`

## Using Ngrok

Once Ngrok is installed it is simple to use.

1. First start up your application so that it is running on your local machine. If I run this Gatsby website locally it runs on port 8000.
2. Start a tunnel to your local port (8000 in this case) `./ngrok http 8000`. You should see an output like this:

[![Ngrok Window](https://www.alexhyett.com/static/6d97d5b528ef80ab4d370729d86ac0b7/c0255/ngrok-running.png "Ngrok Window")](/static/6d97d5b528ef80ab4d370729d86ac0b7/5b2ff/ngrok-running.png)Ngrok gives you the http and https address that you can connect to and you will see the incoming HTTP requests on the console.

From their you can access the service running locally on your phone, tablet or even give it to someone else to try out.

[![ngrok on iPhone](https://www.alexhyett.com/static/f7b4ba3978dad28cd28605bcd3f2098e/4d836/ngrok-on-iphone.jpg "ngrok on iPhone")](/static/f7b4ba3978dad28cd28605bcd3f2098e/4d836/ngrok-on-iphone.jpg)

You can also access a Dashboard locally on port `4040` if you want to get a detailed look of the requests and responses going to your service.

[![ngrok dashboard](https://www.alexhyett.com/static/bea627e346f4c59841ec9c457fefd4ac/c0255/ngrok-dashboard.png "ngrok dashboard")](/static/bea627e346f4c59841ec9c457fefd4ac/28b65/ngrok-dashboard.png)

Ngrok is free for single use quick demos, if you need something more such as custom domains then you will need the paid account which starts at $5 per month.

## Final Thoughts

Ngrok is one of those services that every developer should have in their toolbox. The dashboard is especially useful if you want to monitor the requests going to your service without another tool like fiddler. The free plan is good enough for most use cases, if you need more than the paid options are reasonable.
How To Make Drop Down Menu Using HTML And CSS
Tags: html, css, webdev
Published: 2021-04-07 11:55:34

Hello readers, Today in this blog you'll learn how to create a Dropdown Menu Bar using HTML and CSS only. Earlier I have shared how to create a Side Navigation Menu Bar using HTML and CSS. Now it's time to create a dropdown menu bar.

As you know, the dropdown menu is important for any kind of website to show information about the website more and more, which users or visitors need. Every website has a navbar for providing a graphical user interface.

# Video Tutorial of Dropdown Menu Bar using HTML & CSS

{% youtube mjX66MP_9zQ %}

I hope you've understood the basic concept of this Dropdown Menu Bar after watching this video tutorial. I think this video can help beginners to know CSS in depth. If you want to get the source code of this Dropdown Menu Bar. You can easily get the source codes of this program. To get the source codes you just need to scroll down.

I think these codes can help beginners to understand CSS in depth. You can use this program or design on your website or project after a few changes according you want. Also, you can redesign this dropdown and take this program to the next level.

# Dropdown Menu Bar in HTML CSS [Source Codes](https://www.foolishdeveloper.com/2021/04/how-to-create-drop-down-menu-in-html.html)

As always, before sharing the codes of this program (Drop-down Menu Ba), let's a few talks about the main tags and codes of this program. This program is a fully ul and li-based program, that’s why we can create a menu easily.

 As you can see in the video, First, I have created a nav tag and placed all the elements inside it. Then I created ul, li, and an HTML tag. The ul tag defines an unordered (bulleted) list. Use the ul tag together with the li tag to create unordered lists.

In this program, I wrote '#' inside href i.e that means it doesn't indicate any website or it doesn't redirect to any website. If you will put any website link inside href attribute when the user clicks on that link, that user automatically redirects to that particular website which you'll provide inside the href attribute.

There are many things I left. Because I can't say all things in writing. I'm just talking about the main codes of this program. Don't worry you'll understand all codes and programs after getting the source code of this Sidebar.

To create this program (Drop-down Menu Ba). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file. You can also download the source code files through the given link. In the source files, there you also get a background image of this program.

 [Click here to download source code files.](https://www.foolishdeveloper.com/2021/04/how-to-create-drop-down-menu-in-html.html)
Reduce method with an input of a string or an object
Tags: javascript, webdev, beginners, functional
Published: 2021-04-07 11:47:28

The first example is just demonstrating how actually reduce method works behind the scenes and the next two examples how it could be used in a string or an object situation.

#Example 1.

##Calculate the total

In this example we are having an array of numbers and we want to return the total which is 6 in that case.

```js
function Sum(numbers) {
 return numbers.reduce((acc, number) => {
   return acc + number
 }, 0)
}

```

So what actually happens here.
```
iteration: 1     2        3
acc:       0     1        3
number:    1     2        3
return:    1     3        6
```


So on the first iteration the accumulator is 0 as we set it up to 0.

The number on the first iteration is 1.

So the total of acc + number is ``0 + 1`` ``return: 1.``

Now on the second iteration the accumulator is replacing 0 with 1. The ``number is 2`` since we are on the second iteration and the ``return is 3``. 

On the third iteration the ``accumulator is 3`` so our total in the end is ``6``.

#Example 2.

##Find the shortest word.

Let's say we have a function ``findShortestWord()`` which is getting as an input the following string as you see below on console.log. We want to return basically the shortest word which in that case is ``'be'``

```js
console.log(findShortestWord("You can't always be correct."))
```

There are many ways to solve this but my approach with reduce method would be:

```js
function findShortestWord(string) {
    return string.split(' ')
        .reduce((short, total) => (
            short.length > total.length ?
                total :
                short
        ));
}
```

#Example 3.

##Swapping key - value pair of an object

Let's say we have an object and we want to swap the key-values so it should return ``{Vicky: 'name', Vasilopoulou: 'lastName'}``

``console.log(swap({ name: 'Vicky', lastName: 'Vasilopoulou' }))``

My approach with reduce would look like this:

```js
function swap(obj) {
    return Object.keys(obj)
        .reduce((newObj, key) => {
            let value = obj[key];
            newObj[value] = key;
            return newObj;
        }, {});
}
```
I recreated the Google Search page
Tags: css, html, cs50, 100daysofcode
Published: 2021-04-07 11:45:59

I recently started Harvard's CS50 Web Programming with Python and JavaScript course (it's free but on audit only) and the very first project is to replicate Google's search page.

Since I can't really submit the project and be graded for it, I thought I should just share what I made on here and let you guys grade me instead! 😀

I tried to replicate it as closely as I can. Also my first time using SVGs.

{% codepen https://codepen.io/rngueco/pen/QWdqKQR %}

(P.S. I still didn't use BEM methodology. Sorry. ✌)

---

If you found this cool or useful, consider [buying me a coffee](https://ko-fi.com/yanski_).
App Rejection [Need IAP]
Tags: ios
Published: 2021-04-07 11:45:31

Hi, 
Just a quick question:
 
I am basically developing a platform that providing a product promotion feature in my e-commerce app. those feature intend to help promoting my merchant product with 0.01 cent charge per click. 

before my system promoting their product, their need to top up the credits first and enabling promoting product feature, so each time there's a visitor that click their product, the credits will be reduced by 0.01 cent automatically.

and i saw some e-commerce that has a promotion feature, but yet they'r still approved by apple team by using their regional external payment method. but my apps's rejected because not implementing the in-app purchase, does anyone have a clue?


is it actually not allowed develop a product promotion features besides using IAP ??

Thank you
Book notes: Hooked - Chapter 1
Tags: books, design
Published: 2021-04-07 11:32:43

### Chapter 1 - The Habit Zone

This chapter is a 22 pages long sales pitch. I was really annoyed by it. If you plan to extract value from reading this book, you can just skip chapter one.

* Habits are formed from solving our needs, our brain starts to associate actions with pleasant experiences (solving problems) and this might become a behavior.

* Habit-making products increase the amount of cash you can generate from a single customer.

* People are less sensitive to the price of products that are part of their day-to-day life.

* Leaving a product you have formed a habit around is very difficult. 

^ Say you want to stop using Instagram, then you would have to think of another way to store and share your photos with your friends that also use Instagram and think of new ways of contacting them. So Instagram, for being a habit-forming product has you hooked to it.

* To use habit-forming as a strategy you have to focus on increasing the frequency of use of your product and the value you generate each time. Some behaviors are bound to not repeat as much as others, then you would need to focus more on delivering value.
Calendar Interaction in JS
Tags: javascript, html, webdev
Published: 2021-04-07 11:11:57

In most of the web applications, Custom calendar has been used for date picker. In which small interaction added. 

Concepts used: HTML/CSS3/Jquery

For demo and gif animation check below links.

Demo: http://www.dropinks.com/calendar-interaction-design/

Dribbble: https://dribbble.com/shots/15434039-Calendar-Interaction-in-JS
Troubleshooting connection issue between Oracle Database & OpKey
Published: 2021-04-07 11:10:03

<B>Symptoms:</B>

While connecting OpKey with the <a href="https://www.opkey.com/Oracle-EBS-Automation">Oracle database</a>, located on local or remote machine, OpKey users come across such issues:
System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.data: Column ‘InvariantName’ is constrained to be unique. Value ‘Oracle.DataAccess.Client’ is already present.

<B>Cause:</B>
The most common cause of such type of issue is installing or uninstalling of ODAC driver multiple times.
Resolution: The resolution for the above cause is to remove one row from the machine.config file of Microsoft.Net folder.
The machine.config file can be found at the following path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config

<B>The row to be deleted is given below:</B>

“<add name=”ODP.NET, Unmanaged Driver” invariant=”Oracle.DataAccess.Client” description=”Oracle Data Provider for .NET, Unmanaged Driver” type=”Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342″ />

<B>Note:</B>
Check before row deletion: Please check that the row with the above given value exists twice in the machine.config file. Now remove the last row with these values.
Where do you log your errors?
Tags: discuss, logging
Published: 2021-04-07 11:07:18

I personally feel intimidated by the choice of where to log my errors. Mostly, because I have many options and few information about the pros and cons of these:

- console
- process.stderr
- logger
- database
- logfile
- combinations of the above?
- ... what else?

Also - why? How do you profit from the approach you use?
ImageColorSwitcher in Flutter: Part 2-Vector Image Coloring
Tags: flutter, devjournal, android, ios
Published: 2021-04-07 10:59:21


![Comparison of Raster and Vector Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/318k7za3xqa6guf23j6d.png)

🔎 Are you searching for ways to colour an SVG image in Flutter?
🔨 Is it a hard job to find such techniques?
❓ Do you want to know the difference between vector graphics (smooth) & raster images (pixelated)?

Keep calm & read [this article] (https://levelup.gitconnected.com/imagecolorswitcher-in-flutter-part-2-vector-image-coloring-97509fd6a90a) to discover what lessons we got to learn from raster to vector image colouring.
ImageColorSwitcher in Flutter: Part 1 Raster Image Coloring
Tags: flutter, android, dart, ios
Published: 2021-04-07 10:50:09

![Dynamic Image Color Switching](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6daiodljwdl8l2ezrf30.png)

🎨 Do you wish to colour an image using dart code?

⌚ Are you facing failures over time?

🚙 Are you feeling lost?

🏴󠁢󠁳󠁨󠁴󠁿 Well, don’t give up hope yet!

Because [this series of article](https://levelup.gitconnected.com/imagecolorswitcher-in-flutter-part-1-raster-image-coloring-90f2cd0c8788) is focused on providing such techniques.
Respondendo perguntas de iniciantes na área de TI
Tags: mulheresnati, mulheres, tech, womenintech
Published: 2021-04-07 10:45:24

1) "Oi Amanda, tudo bem? quero entrar na área de TI, sei o básico de HTML e CSS, estou estudando online. Eu sei que existem umas organizações que ajudam mulheres a entrar na área. Estou um pouco perdida, teria como você me dar uma direção do que seria melhor?"

Abaixo vão algumas recomendações de sites, comunidades e pessoas que valem a pena você seguir.


Sites primariamente em português:
https://womakerscode.org/
https://twitter.com/perifacode
https://linktr.ee/programaria
https://reprograma.com.br/

Sites primariamente em inglês:
https://www.freecodecamp.org/
https://www.womentechmakers.com/
https://www.adaslist.co/

Mulheres inspiradoras nas redes sociais:
https://twitter.com/biancaxis
https://linktr.ee/glaucia_lemos86
https://twitter.com/JessicaCostaDev
https://twitter.com/keillamenezes_
https://twitter.com/loiane
https://www.instagram.com/thaissa.candella

2) "Como vc fez para aprender css? Trabalho com front há muito tempo ano e só evoluo no JS, css não entra muito na minha cabeça. Já tentei focar em praticar e não funcionou muito, acabo usando o CSS mas o puro não".

Eu fui vendo a necessidade de aprender o CSS no ambiente de trabalho. Eu via que as pessoas sabiam algumas coisas mágicas que eu não tinha nem noção, então a cada coisa que eu não entendia eu procurava algum mini curso seja no youtube, artigos, as documentações e ia aprendendo. Depois de algum tempo assim eu realmente tomei um tempo para ler livros avançados e compreender as especificações e precedências. CSS é mágico e poderoso.

Outro ponto interessante é fazer um projeto pessoal num escopo pequeno e so seu e não dever nada a ninguém. Algo que você conseguiria atingir em um dia, semana e um mês.

Lembre-se que grande parte da programação não é saber algo de cor e salteado e a sintaxe na ponta dos dedos, mas saber como pesquisar algo quando há a necessidade.

Ótimos pontos iniciais para aprender o CSS:
https://developer.mozilla.org/pt-BR/docs/Web/CSS (documentação traduzida meio mal em português mas dá pro gasto)
https://www.w3schools.com/css/ (melhor site da face da terra gratuito com vários recursos)
https://100dayscss.com/  (100 dias de CSS com templates para você ver e tentar reproduzir)
Wednesday Links - Edition 2021-04-07 
Tags: java, jvm, maven, kotlin
Published: 2021-04-07 10:39:54

Google wins in Supreme Court with Oracle 🏛
https://twitter.com/errcraft/status/1379116652025892866

Maven internals 🔬
https://blog.soebes.de/blog/2021/04/05/maven-plugin-configuration/

Microsoft strengthen JVM support 🥳
https://devblogs.microsoft.com/java/announcing-preview-of-microsoft-build-of-openjdk/

JVM 16 is no longer so dynamic 🧨
https://blog.frankel.ch/changing-field-type-recent-jdks/

Ki: new interactive shell for Kotlin 🎮
https://blog.jetbrains.com/kotlin/2021/04/ki-the-next-interactive-shell-for-kotlin/

Run your swing app in browser 📽
https://blog.jetbrains.com/blog/2021/03/11/projector-is-out/

SQL Server can deadlock 😱
https://vladmihalcea.com/sql-server-deadlock-trace-flags/
Car Service and Car Repair Dubai
Tags: carservice, carrepair, carwash, carmantenanace
Published: 2021-04-07 10:24:02

Now that you have a car , thoughts of car repair, car wash ,car service, or even choosing a one stop place for car maintenance, are probably giving you a headache. At Carcility, we  sought to bring you the best car maintenance services you can afford in town. We are at the forefront to make your car repairing most economical. Choose from every garages in town & connect with professional car servicing through Carcility !!
How Mobile App Will Become The Main Channel To The Business Growth? 
Tags: mobile, android, ios, devjournal
Published: 2021-04-07 10:13:19

We live in a mobile-driven world. Today, mobile apps have become the primary channel for bringing automation and transforming business processes. Every day, we depend more on customized apps for performing daily activities. As per an official survey, more than 70% of individuals use mobile phones for finding services online, and out of which 50% prefer customized mobile apps associated with the products or services they want to get.

Irrespective of the size and business model of your enterprise, the [mobile app development company](https://www.suriainternational.com/) can make a customized and feature-rich app to meet your requirements in the best possible way. A customized app can attract more customers and assist you to grab new opportunities to grow your business.

Let’s go through the key reasons why you should build an app for your business.

Why Customized Apps are Beneficial for Your Business

An app with user-friendly features and excellent functionality can take your business to a new level in a short time. It can give a higher ROI over the period while offering the major benefits including

Increase in Sales

Customer experience is directly related to sales. If you can offer a rich experience to your customers, chances are high that your sales will exponentially increase over the period. A mobile app with customer-friendly features can keep your business more customer-centric and attract new customers while retaining existing ones. You can either consult a reliable Android or [iOS app development company](https://www.suriainternational.com/ios-app-development-company/) to make an app-based sales strategy.

Enhanced Efficiency

A mobile app with desired features can bring automation in repetitive processes and simplify complexities. It can handle several processes effectively and as a result, your staff can focus more on other productive tasks. Also, a [customized mobile app](https://www.suriainternational.com/custom-app-development-company/) gives you and your staff access to confidential corporate data as and when necessary. It further boosts the efficiency and productivity of your enterprise.

Read More: https://www.suriainternational.com/how-mobile-app-will-become-the-main-channel-to-the-business-growth/
Hiring: Senior Configuration Manager. 100% Remote (UK)
Tags: hiring, servicenow, config, uk
Published: 2021-04-07 10:05:01

## About the Opportunity

An exciting opportunity has arisen for a talented Configuration Management SME to join a well-established Fortune 500 company and take responsibility for driving key deliverables both for strategic initiatives and operational support activities for the Enterprise Configuration Management team.

This is a fantastic opportunity to fulfil a key, hands-on technical role in a global team using industry-leading technologies to enable strategic solutions such as Event Management toward achieving Artificial Intelligence Operations. The deliverables of the team have visibility to the top of the organisation and the successful candidate will have the opportunity to make an impact that is Enterprise wide.

## Role & Responsibilities

- Contribute to the organisations analytical capabilities
- Develop and apply data driven insights to identify opportunities to improve quality
- Drive strategy through design and implementation of Configuration Management processes
- Develop and apply data driven insights to identify opportunities to improve quality through data, process, policy, training or technical changes to systems.
- Use process and data analysis from multiple sources to develop and measure KPIs that improves the health of the CMDB and promotes value to consumers and stakeholders.
- Day to day analysis of multiple complex data sets using different analytical methods
- Use process and data analysis from multiple sources to develop and measure KPIs that improves the health of the CMDB
- Proactively drive continuous improvement
- Participate on the appropriate IT Service Management process boards and steering groups and builds relationships with key stakeholders.

## Skills & Experience

- Extensive experience of applied Configuration Management concepts, governance and practices
- At least 3 years’ experience of applied process and data analysis preferably in a technical environment
- Expertise in at least one of the following: ServiceNow, BMC Remedy or Cherwell
- Advanced Excel skills (including Charting, Pivot Tables, VLOOKUP, INDEX & MATCH)
- Ability to establish, manage and leverage relationships with internal and external partners
- Operate independently and effectively in a team-based environment
- Creative problem solver, curious and inquisitive – can progress tasks with limited direction
- Ability to create compelling visualisations to support effective communication with stakeholders
- ITIL and Service Management process experience
- Leadership skills
- Experience of server platforms (Linux or Windows)
- Network infrastructure knowledge
- Six Sigma Green belt or higher
- Knowledge of SACM portfolio of tools

## How To Apply

Email your CV or any questions to Ashleigh Roberts at Berkeley Square IT (Ashleigh.Roberts@BerkeleySquareIT.com)

_Please feel free to share_