teleren/devto huggingface dataset:
Slack notifications on Azure budget consumption
Tags: azure, slack, costs, cloud
Published: 2021-04-21 09:46:33

In my free time (I don't have too much free time, to be honest 😋) I help my colleagues in the open-source project where juniors can learn something useful for their career. I started to deliver some infra for that stuff on Azure, but due to the fact that I'm paying for resources from my pocket, I want to have some nice notifications if something consumes a big amount of money and burns the budget. For AWS costs we have a dedicated channel on Slack where daily money consumption is sent. I would try to add an Azure budget alarm there too.

# How to integrate?

For achieving my aim I will use the Incoming WebHooks app on Slack. There I will able to send messages to the chosen channel via webhook.

![Incoming WebHooks Slack App](https://wachulec.me/images/posts/2021-04-21-slack-notifications-on-azure-budget-consumption/incoming-webhook-app.png)

We already have added that app and webhook for sending info about costs, so to avoid reaching the limits of the Incoming WebHooks app, I reused the existing webhook and channel for used for costs notification purposes.

# Budget

The next step is to create the budget for the subscription.

![Azure Budget creation](https://wachulec.me/images/posts/2021-04-21-slack-notifications-on-azure-budget-consumption/budget.png)

In the next step, we have to configure notifications and alarms.

![Azure Budget alarms page](https://wachulec.me/images/posts/2021-04-21-slack-notifications-on-azure-budget-consumption/budget-alarms.png)

There I added a new action group where I added sending email in the Notifications section. In the Actions section, I added a webhook URI.

After that, I could add alarms:

![Azure Budget alarms ready](https://wachulec.me/images/posts/2021-04-21-slack-notifications-on-azure-budget-consumption/budget-alerts.png)

The budget was created.

![Azure Budget created](https://wachulec.me/images/posts/2021-04-21-slack-notifications-on-azure-budget-consumption/ready-budget.png)

[Original post](https://wachulec.me/posts/slack-notifications-on-azure-budget-consumption/) you can always find on [my blog](https://wachulec.me/)!
Where do you like to travel the most? 🏔🏝
Tags: watercooler, discuss, showdev
Published: 2021-04-21 09:36:00

---
title: Where do you like to travel the most? 🏔🏝
published: true
description: What's your favourite tourist place and why? 
tags: watercooler, discuss, showdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0hgng8plb9uxvubhqmgd.jpg
---

As post-vacation, most of the countries are going back to normal. Most of us can travel to close tourists destination keeping precautions in mind. Few of us are even able to do remote work from such places. 

I'm myself in Himachal (India 🇮🇳) since this month, work from there. I have spent most of my vacations here only. It's my second home and every time there is something new that you can find and experience here.

{% twitter 1384718460110794758 %} 

What's your second home? Where do like to spend most of your vacations and why?
 
![](https://media.giphy.com/media/OO2HHTfQkPvJlrZqx3/giphy.gif)
Add Conditional Style to Link with active route with NextJs and Tailwind
Tags: tailwindcss, react, routing
Published: 2021-04-21 09:33:01

Check how to apply a certain format to a link depending on the active route. The typical use case for these is in navbars or menus. Like:

![Highlight this link that matches with the route](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ok9vjp12gdickvgxkgm1.gif)

You can easily use the built-in router from next and apply a certain format. 

What I did here is to render my Navbar using an object (in my case "menuItems.js". This is what this file looks like:

```javascript
import {
  UserIcon,
  ResumeIcon,
  PortfolioIcon,
  HomeIcon,
  BlogIcon,
  ContactIcon,
} from "../components/Icons";

const MenuItems = [
  {
    label: 'Home',
    url: "/",
    icon: <HomeIcon />,
    active: true,
  },
  {
    label: 'About Me',
    url: "/about-me",
    icon: <UserIcon />,
    active: false,
  },
  {
    label: 'Resume',
    url: "/resume",
    icon: <ResumeIcon />,
    active: false,
  },
 {
    label: 'Contact',
    url: "/contact",
    icon: <ContactIcon />,
    active: true,
  },
];

export default MenuItems;

```
Each of these objects is an item of my Navbar. This allows me to introduce additional information I need to render. Like the icon I want to be displayed, the route it must go to and also if it has to be rendered or not (active: true).

After that, then it's easy to apply a conditional style to an item by checking if the 'url' property of the item matches the current route. 

For checking the current route we can use the built-in 'useRouter' hook provided by Next, and the Link object. Just check this by tackling into the `asPath` property of the router. 

Checkout the code:

```javascript
import MenuItems from "../utils/menuItems";
import Link from "next/link";
import { useRouter } from "next/router";

export const Navbar = () => {
  const router = useRouter();
  
  return (
    <div className="mt-10">
      {MenuItems.map((item, index) => {
        console.log(item.url);
        return (
          <>
            <Link href={item.url} key={index}>
              <div
                className={`w-24 h-24 text-center border-b-2 border-secondary-500  mt-3 cursor-pointer  ${
                  router.asPath === item.url
                    ? "text-primary-500"
                    : "text-secondary-300"
                }`}
              >
                <div className=" hover:text-primary-500 w-10 mx-auto pb-2">
                  {item.icon}
                </div>

                <p className="text-secondary-300">{item.label}</p>
              </div>
            </Link>
          </>
        );
      })}
    </div>
  );
};

export default Navbar;
```

This is a simple example of how to apply this to a Navbar, but you can actually use this to conditionally style any object in the page. 

Peace and Code
Nadine
Laravel 8 Autocomplete Search using Typeahead JS Example
Tags: laravel, php, tutorial, javascript
Published: 2021-04-21 09:12:51

Today,I will learn you how to create autocomplete search using typeahead js in laravel 8. We will show example of laravel 8 autocomplete search using typeahead js. We will share with you how to build search autocomplete box using jQuery typehead js with ajax in laravel 8.i will use jQuery typehead js plugin, bootstrap library and ajax to search autocomplete in laravel 8 app.
more...
https://itwebtuts.blogspot.com/2021/04/laravel-8-autocomplete-search-using.html
Chrome Dino Game using Python...
Tags: codenewbie, productivity, beginners, python
Published: 2021-04-21 09:07:23

**A Replica of the hidden Dinosaur Game from Chrome Browser Offline mode so you don't have to be offline to play it...😂😂**

### Introduction:

-	The Dinosaur Game, also known as the **T-Rex Game, Steve the Jumping Dinosaur, or Dino Runner** and initially codenamed Project Bolan, is a built-in browser game in the **Google Chrome Web Browser**. The game was created by **Sebastien Gabriel in 2014**, and can be accessed by hitting the space bar when in offline mode on Google Chrome.

### About:

-	The following represents a recreated version of the famous Dinosaur Game from Chrome Browser Offline mode implemented using **Python and PyGame**. The project file contains **Image Files** and a python script **(chromedino.py)**.
-	A simple and easy-to-use GUI is provided for better gameplay. The gameplay design is so simple that the user won’t find it difficult to use and understand. Different images are used in the development of this simple game project, the gaming environment is just like the original Chrome Dino Run game. For demo of the project, have a look at the GIF below.

![Dino GIF](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmqwaosjf703c2gnrjba.gif)

### Installation:

-	First of all, **clone the repository** using:
```
git clone https://github.com/dhhruv/Chrome-Dino-Runner.git
``` 
**OR**
Download the Zip and extract it's contents.

-	Then download the dependencies in your Command Prompt OR Terminal using:
```
pip install requirements.txt
```

### Usage:

-	After installation, just run the [`chromedino.py`](https://github.com/dhhruv/Chrome-Dino-Runner/blob/master/chromedino.py) using
```
python chromedino.py
```

### Input:

| Keys              | Actions                                                       |
|-------------------|---------------------------------------------------------------|
|  `Any Key`        |    Press any key to Start the Game.                           | 
|   **&#8593;**     |    Press `Up Arrow` to jump and avoid cacti.                  |
|   **&#8595;**     |    Press `Down Arrow` to duck and avoid pterodactyls.         |

So, stay tuned for further updates on GitHub:
{% github dhhruv/Chrome-Dino-Runner no-readme %}

### References:
-	http://www.pygame.org/docs
-	https://en.wikipedia.org/wiki/Dinosaur_Game
-	Various articles and videos.
AWS browser extension tsmash
Tags: aws, cloud, devops, extensions
Published: 2021-04-21 09:00:01

I'm a big fan of using the [AWS extend switch roles extension](https://github.com/tilfinltd/aws-extend-switch-roles) which allows you to easily switch AWS roles when using the management console in your browser. 

I was using the console the other day to cleanup some old buckets, dynamo tables etc in a test account that I use for proving some CDK deployments and really disliked having to enter in the varying words "delete", "delete me" or the bucket name every time...so...I figured I'd make an extension.

### What is it?
[tsmash](https://github.com/talkncloud/tsmash) is a firefox and chrome extension that simply looks for delete buttons in the console and when you click the button it looks for the input box and what text to enter. Once found it populates the input box. Done. Nice and simple.

It is opensource, it is on github, you can go through the code and see whats happening, feel free contribute.

https://github.com/talkncloud/tsmash

### Browser extension store
I have added the extension to the firefox and chrome extension stores so you can just go ahead and search for it. Both firefox and chrome have reviewed and approved the release.

https://addons.mozilla.org/en-US/firefox/addon/tsmash-for-aws/

https://chrome.google.com/webstore/detail/tsmash/domdhiedcmknajdmhcfbplcahpmkmnff?hl=en-GB

### Woah, but isn't this a bad idea
I'm not saying this is for everyone, people might be thinking, I like entering the text, it's not that bad and I like the added protection. It's totally up to you, I have added a small configuration option to add accounts where you don't want this to run. So, if you want to keep the default of entering the text manually it will bypass the script for specific accounts.

### More details
I have done a full write up on my blog if you want more info about this one. I am keen to hear if this has been useful or any changes you might like.

https://www.talkncloud.com/auto-filling-aws-delete-text-with-tsmash-browser-extension/

Thanks.
Developers Dilemma - Storing Passwords
Tags: discuss, database, rails, ruby
Published: 2021-04-20 19:07:21

We have all heard of the leaks major corporations can have and don't hear at all about the **30 million** [cyber attacks](https://purplesec.us/resources/cyber-security-statistics/#:~:text=In%202018%20there%20were%2080%2C000,30%20million%20attacks%20per%20year.) each year. 

Which leads us developers to get cold feet when it comes to storing users sensitive data. 

## What Do I Do?
Personally I have started using gems such as Omniauth and forcing users to use their provider of choice as the *secure entry point* into my own application.

Why spend time and resources storing their sensitive information when we can authenticate them via a third party application? (Who most likely has spent more time and money keeping their users safe.)

Thus coming to my conclusion...

All we need is a users email, their third-party login of choice, and that returned UID from said third-party. 

* Fully authenticated user
* We get more information than a user would have to input themselves
* No blame on you if a third-party has compromised passwords

## Discussion
What are your thoughts on this matter?

* Do you prefer using third-party authentication systems for your applications? 
* Do you disagree with me and think we should still be storing user sensitive passwords?
* How do you go about securing your application users data?
6 MOBILE APPLICATION SECURITY TIPS TO IMPROVE SAFETY OF DEVICE
Tags: mobileappsecurity, devicesafety, anroidappsecurity, iosapplicationsecurity
Published: 2021-04-21 08:48:03

Article Summary: This article on Mobile Application security tips will cover all the points that will help you keep your mobile app safe from any cyber attack. Also, it will help you in future if you look forward to develop other apps too.

We are living in an era where the smartphone has become a basic necessity for every person. Our lives are totally dependent on it. It provides our every basic need like texting, calling, our medium to search any question at any moment, track our fitness, shop, work remotely, and many more. It has basically improved our lives.

But, where the good comes, obstacles come hand-in-hand with it. The way technology is bringing an improvement in everyone’s life, threatening to disturb that environment comes with it by the name of “Cyber Attack”.

Since the pandemic of Covid-19 took over the world in 2019, with the increase in usage of the various mobile applications; a high increase in cyber-attacks took place since then.
Important Fact: Large businesses are still risking jeopardy of their application, their personal systems, reputation, and their customer’s personal information by applying highly efficient security. Cyber attackers use COVID-19 as a bait to imitate brands and confuse employees and consumers; an increase in phishing attacks, ransomware attacks, and Malspams.

But not everyone is a cybersecurity expert. Thus, you are the one who will have to take precautions for your own safety. You can make your Mobile App secure using these tips.
How open-source library should allow for almost every kind of customization 🔧
Tags: opensource, publicapi, library, 5days5blogposts
Published: 2021-04-21 08:28:27

**Any feature in your open source library will be customized sooner or later by someone in a way you never dreamed about. And there is nothing worse for your library consumers than realizing that your library doesn’t allow for X, when they desperately need X. You should somehow allow for almost every kind of customization. But you need to find a good balance: how much *you* implement vs. how much you force *library consumers* to implement.** 

### Common customizations

Every common type of customization should be supported by a *simple configuration*. It’s for consumers convenience. The more they are happy with your library, the more popular your library might become. 

### Probable customizations
 
Less frequent type of customizations, but still quite probable ones, can be unsupported by default in your library, but they must be feasible in an easy way. For example you might expose an extensibility mechanism that *require a consumer to write a little custom code* (i.e. overwrite a default method).

### Edge cases

Edge case customizations must be also reachable, but you’d rather not invest time to implement them in your library. Just ensure that there exists some extensibility mechanism that allows for that edge case. It’s fair enough that it *forces a consumer to write a lot of custom code (i.e. overwrite one or few whole classes).*

### Don’t implement too much!

You should not implement every feature requested by the community members, but only the most often requested features. For less frequently requested features, just expose extensibility points. Supporting too many edge case customizations by default might result in unpleasant consequences both for you and your library consumers:
- more complex shape of the public API (i.e. owerwhelming configuration) - less convenient for consumers
- more complex source code - harder to maintain
- need to test and support more things at the same time (including cross-feature compatibility)
- need for a bigger documentation 
- enlarging the surface of the public API. When it's too big, it’s more likely you'll have to make a breaking change just to fix a small bug (beware that library consumers are not fond of often breaking changes, but like bugs to be fixed quickly).
Css Web-kit property
Tags: css, webdev, webpack, discuss
Published: 2021-04-21 08:12:36

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbnih1yt80ig792eotqp.png)
 
##What is WebKit?

The word ‘webkit’ has become more popular in recent times when talking about CSS and web design. However, there is still quite a bit of confusion relating to the term ‘webkit’ in terms of what it means and how it is used when coding CSS. Webkit refers to the browser rendering engine used for Apple’s Safari and Google’s Chrome browsers. It is also the CSS syntax used for CSS3 modules

######For example, in the CSS3 code below the green square widens horizontally over a period of 2 seconds when the mouse hovers over it:

 ```CSS 
.div { 
width: 100px;
height: 100px; 
background: green;
/*Start transition effect*/ 
transition-property: width;
transition-duration: 2s; 
}
.div:hover { 
width: 300px; 
}
```

In order for the same transition effect to render on browsers using the WebKit engine, the CSS code will be as follows:
```CSS
-webkit-transition-property: width; -webkit-transition-duration: 2s;
```
The –webkit- code will be ignored by other web browser rendering engines
[Explore more](https://developer.mozilla.org/en-US/docs/Web/CSS/WebKit_Extensions#webkit-only_properties) on this topic...
🔥Complete Roadmap for Python🔥
Published: 2021-04-21 08:01:38

*In this tutorial, you will see basic to advance roadmap for python programming.*

##[Step 1.Introduction](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 2.Basics Concept](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 3.Data Structure in Python](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 4.Functional Programming](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 5.Python Modules and Packages](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 6.Exception Handling](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 7.File Handling](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 8.Advance Concept in Python](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 9.Object Oriented Programming](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 10.Popular Frameworks](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 11.Best Python Libraries](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 12.Best Python Libraries For Machine Learning](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)
##[Step 13.Python Projects for Beginners](https://codexashish.blogspot.com/2021/12/complete-roadmap-of-python-programming.html)

[Student Management System] (https://youtu.be/QCseldsUGq8)
[University Management System] (https://youtu.be/AzBTUkZ1HAg)
[Contact Management System] (https://youtu.be/pfXOYmYUkKM)
[Bank Management System] (https://youtu.be/4_M3aqnqJ00)
[Contact Book Project in Django] (https://youtu.be/wJExlPfKOVU)

####🎥💡🔥AND Subscribe to Our YouTube Channel [bestcodecreator] (https://www.youtube.com/bestcodecreator) 


###Conclusion:###
*Thank you for reading
How Can I Fix COX Webmail Not Working on iPhone Issue?
Tags: coxwebmail, cox
Published: 2021-04-21 07:44:35

COX is one of the largest mail service providers serving in more than 15 countries across the globe. It has some amazing features, which makes it one of the best ESP. COX email enables you to access emails on its server through a web-based client. COX email is convenient, easy to use, and is very helpful in providing a great platform to interact and perform business work. It provides you with reliability and security. However, there are times when iPhone users have to confront certain issues such as <a href="https://contactemail.us/cox-email-not-working-problems/">cox webmail down</a>, etc. The COX webmail not working on the iPhone issue is quite persistent. However, this issue can be solved if the troubleshooting is done in a proper manner.
How to fix the issue
Here are some of the fixes mentioned below which can help you solve the cox webmail not working on iphone issue:

●	Port Settings

Check the port settings because settings have a direct impact on the email sending and receiving. To check and change the port settings, open the Settings and then scroll down to passwords and accounts. Next, find the Cox email account and just hit the account option, and go to the advanced option.

●	Internet Settings

Ensre that the internet connection is functioning properly. This is because Cox will not work if there are obstructions in the internet connection. Also, if you aren’t connected to the internet in a proper manner, an email will not work even then. So make sure to have a proper internet connection.

●	Incorrect credentials
You must ensure that the login credentials you are using are correct. These login credentials include the username and password. So, if you are entering the wrong email or password, you won’t be able to use the email on your iPhone. Hence, check the login credentials.

●	Incompatible browser
Ensure that the browser is perfect as browser compatibility matters a lot. People usually use the Safari browser while using the Cox email with iPhone, and it’s not the correct browser. That’s why it is suggested to use the Google Chrome browser.

So, these were some of the fixes trying which you can solve cox webmail not working on iphone issue. Hope you find them helpful.

Read also - <a href="https://contactemail.us/cox-email-sign-in/">Cox email sign in</a> , <a href="https://contactemail.us/cox-email-error-codes-how-to-troubleshoot-it/">Cox email error</a>
🖇 Linux Server Commands
Tags: linux, server
Published: 2021-04-21 07:23:01

**Shutdown:**

`sudo poweroff`

**Restart:**

`sudo reboot`

**Check on 80 port number if something is listening via netstat:**

`sudo netstat -plnt | grep ':80'`

**JBoss bind offset port number:**

`...\bin\standalone.bat -Djboss.socket.binding.port-offset=100`

**nginx - nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)**

`sudo pkill -f nginx & wait $!`

`sudo systemctl start nginx`