teleren/devto huggingface dataset:
Tips for Fine Art Photography - From beginner to pro!
Tags: beginners, tutorial, photography, entrepreneu
Published: 2022-03-26 11:52:25

Fine art photography is a challenging and rewarding pursuit. However, you can do a few things to help make your photography more successful. Here are some tips for fine art photography from beginner to pro!

## Get a good camera
An essential thing you can do for your photography is get a good camera. A great camera will help you capture high-quality photos that will show off your work. And, if you want to make the best of your photography, it's also essential to find a good lens.
You don't have to consume a lot of money to get an excellent camera. A primary Panasonic Lumix GH4 camera is plenty capable of capturing high-quality photos. However, if you want the best results, you'll need to invest in a better camera and a better lens.

## Use the right tools.
When you're starting out, it's essential to use the right tools. The right tools will help you create beautiful photos that are both professional and easy to use. You'll need a tripod, a camera, and some essential equipment to make good fine art photography.

##  Practice, practice, practice
When you first start out, it's essential to practice. The more you practice, the better you will get. And the better you get, the more likely you will be to make a good shot. You don't need to be perfect to take great photos; just practice and learn how to use your camera in a way that produces high-quality images.

## Know your light and dark areas
When you're taking pictures in the dark, it's essential to know your light and dark areas. You can use this knowledge to [improve your photos](https://cutoutexpert.com/product-photo-editing-service/). For example, if you have a lot of darkness in your image, you can use a lightbox to lighten up the shot. Similarly, if you have a lot of light in your photo, you can use a darkroom to darken the picture.

## Take the time to focus on your subject.
When photographing your subject, make sure to focus on your subject and not on other things. When you're trying to capture a good photograph, it's essential to focus on what you're trying to capture.
Hello dev.to!
Published: 2022-03-26 11:21:15

As a Software Freedom enthusiast, I care about using platforms that are based on Free/Libre and Open Source software. I have an account on Twitter, LinkedIn, Instagram but also I use Mastodon, Peertube, PixelFed,... I resist making an account on Medium and instead use a Plume instance at fediverse.blog.

I made up my mind to be here. It is not only based on Free/Libre Software but also the software is an AGPL licensed one. I wish it had a federation feature with other Forem instances or even would use ActivityPub to be a part of Fediverse (the universe of free, decentralized, and federated social media instances). That might come in the future but even to that day, it is nice to be in a community of developers which is gathered on a FLOSS platform.

Let's see how it goes.
React: Overriding Browser's Keyboard Shortcuts
Tags: react, javascript, webdev
Published: 2022-03-26 11:08:41

Browsers have many shortcuts. How do I override these shortcuts?

---

```typescript
import { useEffect } from "react";

function App() {
  useEffect(() => {
    const handler = (e: KeyboardEvent) => {
      if (e.ctrlKey && e.key === "1") {
        alert("shortcut");
      }
    };
    window.addEventListener("keyup", handler);

    return () => {
      window.removeEventListener("keyup", handler);
    };
  }, []);

  return <div className="App">App</div>;
}

export default App;
```

*keypress doesn't work in complex shortcuts like `ctrl + Key`, so I used `keyup`.*

This code will make an alert when you press the shortcut `ctrl + 1`. But it won't work because `ctrl + 1` is a reserved key to move to the first tab.

In this case, you can ignore default shortcuts by using `preventDefault` in `keydown`.

```typescript
import { useEffect } from "react";

function App() {
  useEffect(() => {
    const ctrl1 = (e: KeyboardEvent) => e.ctrlKey && e.key === "1";

    const handler = (e: KeyboardEvent) => {
      if (ctrl1(e)) {
        alert("shortcut");
      }
    };

    const ignore = (e: KeyboardEvent) => {
      if (ctrl1(e)) {
        e.preventDefault();
      }
    };

    window.addEventListener("keyup", handler);
    window.addEventListener("keydown", ignore);

    return () => {
      window.removeEventListener("keyup", handler);
      window.removeEventListener("keydown", ignore);
    };
  }, []);

  return <div className="App">App</div>;
}

export default App;
```

When a key that you want to bound is pressed, call `preventDefault`. It will prevent to make a default action.

But it's not possible to override some keys like `ctrl + R`(Refresh).

And if you want, you can make this as a component.


```typescript
import { useEffect } from "react";

const Ctrl1 = ({ onPress }: { onPress: VoidFunction }) => {
  useEffect(() => {
    const ctrl1 = (e: KeyboardEvent) => e.ctrlKey && e.key === "1";

    const handler = (e: KeyboardEvent) => {
      if (ctrl1(e)) onPress();
    };

    const ignore = (e: KeyboardEvent) => {
      if (ctrl1(e)) e.preventDefault();
    };

    window.addEventListener("keyup", handler);
    window.addEventListener("keydown", ignore);

    return () => {
      window.removeEventListener("keyup", handler);
      window.removeEventListener("keydown", ignore);
    };
  }, []);

  return null;
};

function App() {
  return (
    <div className="App">
      <Ctrl1 onPress={() => alert("pressed ctrl1")} />
      App
    </div>
  );
}

export default App;
```

The logic is the same but I think it looks more like the React way.

That's it. Thanks for reading this post.
Good coding :)
Two Sum
Tags: javascript, leetcode, algorithms, beginners
Published: 2022-03-26 11:01:27

Leetcode problem : https://leetcode.com/problems/two-sum/

{% embed https://gist.github.com/vnay-dev/e1091d9d90b23d378057caf36a30bc05 %}

**Brute force solution** : 

1. Fix the first pointer to the first element of the array. 
2. We assume that this element is the first number in our output pair.
3. Now to find the next number of the pair, we can take the difference between the target and the element pointed by the first pointer (first element). 
4. Now to find the location of the second element, take a second pointer and iterate from the second index of the array till its end.
5. If found, we can return the index of both the elements (values of both the pointers).
6. Else, we increment the first pointer and take its difference with the target.
7. Then we iterate the second pointer from the third index till the end of the array.
8. This can be implemented using two for loops and hence takes O(n^2).

**Optimized solution**:

1. We can use an object (or hash map). 
   Why?  Because we can fetch an item from objects at O(n) complexity which is more efficient.
2. Our aim is to implement this solution in a single for loop.

**Intuition** : 

As we iterate through each element in the array, 

1. We need to keep track of the elements that we previously iterated. Hence, we can store the previous elements along with their indices in an object. 
2. We are simultaneously calculating the difference of that current element with the target. We then check whether the object(acts like a store) already has that difference (which is the second number in the output pair). 
3. If yes, return the value corresponding to the difference in the object (first index) and the current pointer (second index) from the loop as an array.
4. If not found, store the current element and the pointer value(which is its index) as a key value pair in the object. As it had become a part of the previously tracked elements.
What is minikube, kubectl and how do you do local development & deployment of apps in Kubernetes
Tags: kubernetes, docker, springboot
Published: 2022-03-26 10:42:16

A Kubernetes cluster is a set of physical or virtual machines and other infrastructure resources that are needed to run your containerized applications.

Each machine in a Kubernetes cluster is called a node and there are 2 types of node in the cluster

Master node(s): this node hosts the Kubernetes control plane and manages the worker nodes and the Pods in the cluster.
Worker node(s): These are the nodes which run your containerized applications

In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.

Control plane is the brain of Kubernetes cluster as it makes all the global decision about the cluster example scheduling or detects and responds to cluster events like spinning a new pod when a deployment's replicas field is unsatisfied

Please check this [blog] (http://belowthemalt.com/2022/03/17/minikube-kubectl-and-local-development-deployment-of-apps-in-kubernetes/)  for rest of the content..
Optimize Wordpress Mobile Website
Tags: wordpress, webdev, beginners, wp
Published: 2022-03-26 10:27:26

Some times our mobile website is very slow in wordpress and we have to optimize our website. Here is some tricks which you can use to optimize your wordpress website. To optimize your website you can disable or remove some elements or modules of your website like sidebar, breadcrumb, footer widgets in your mobile website and to do this use the code given below.

**Here we are showing or removing footer widgets in our mobile site**.

```php
if (wp_is_mobile() == true) {
	# show our footer widgets if mobile...
}

if (wp_is_mobile() == false) {
	# remove our footer widgets if mobile...
}
```
And you can use this condition anywhere in your theme. To show or hide elements or section in your website.

There is also some unused CSS for mobile websites and to optimize your website for CSS you can also read [remove unused css from your website](https://www.w3courses.org/how-to-remove-css-or-styles-in-wordpress/).

There is also some unused JS for mobile websites and to optimize your website for JS you can also read [remove unused js from your website](https://www.w3courses.org/how-to-remove-javascript-or-scripts-in-wordpress/).

You can also remove extra http requests in your website and to remove http requests in wordpress you can read [make fewer http requests](https://www.w3courses.org/how-to-make-fewer-http-requests-in-wordpress/).

---

Please like share subscribe and give positive feedback to motivate me to write more for you.

For more tutorials please [visit my website](https://www.w3courses.org/tutorials/).

Thanks:)
Happy Coding:)
How to remove extra javascripts wordpress?
Tags: wordpress, wp, webdev, beginners
Published: 2022-03-26 10:13:16

Some times we need to remove some javascript from our wordpress website or blog to speed up our website. Here below is a trick which you can use to remove unused js from your wordpress website.

First of all you have to find the javascript file which you want to remove and to find this open your webpage in google chrome and press ctrl+u to view the source code of the webpage, then find the script tag of js file and there you will see the id in the script tag and this is what you need to remove the js. Now paste the code given below in your **functions.php** file located at root_directory_path/wp-content/themes/your_theme/functions.php

And we have used here two wordpress core functions **[wp_dequeue_script](https://developer.wordpress.org/reference/functions/wp_dequeue_script/)** and **[wp_deregister_script](https://developer.wordpress.org/reference/functions/wp_deregister_script/)**.

Here ‘**woocommerce**’ is the id of the script tag which you have found in source code of webpage.

```php
function wra_filter_scripts(){
	
	if( is_home() == true || is_single() == true ){

		wp_deregister_script('woocommerce');
		wp_dequeue_script('woocommerce');
		
	}
	
}

add_action('wp_print_scripts', 'wra_filter_scripts', 100000);
add_action('wp_print_footer_scripts',  'wra_filter_scripts', 100000);
```

---

Please like share subscribe and give positive feedback to motivate me to write more for you.

For more tutorials please [visit my website](https://www.w3courses.org/tutorials/).

Thanks:)
Happy Coding:)
Macys Insite Login
Published: 2022-03-26 09:22:32

employeeconnection net macys insite Login – Macys insite my schedule plus login – Guys!! Here you can get all the information about the “**[Macy’s Insite Login](https://tractorsinfo.com/macys-insite/)**” at employeeconnection.net.

You must be aware of the portal if you are a new user of employeeconnection net macys insite. 

If you have newly joined the employeeconnection.net  portal, you may find all the complete related details of the Macy’s Insite Employee portal.

We will also explain some of the difficulties users face during the Macy’s Insite Employee Login process and how to tackle them.

Below are simple step-by-step Macy’s Insite Login guides on how to access the site at employeeconnection.net.

Let’s get started…

Macy’s Employee Login

Macy’s Insite, an online portal for employees working only at Macy’s or Bloomingdale, provides all HCM features.

Macy’s employees have access to the portal and can manage tasks such as managing schedules, viewing payslips, and so on. Macy’s Insite portal allows you to do all of this.

Retired employees of these two companies can access Macy’s Insite even after they have left their jobs.

Each employee receives a unique employee ID and password that allows them to log in to Macy’s Insite portal.

This means that Macy’s employees and illegal users cannot access the information. They can’t even go to the login page.

It ensures that all employees’ information is protected, regardless of whether they are working for the company. No one can use it to their advantage.
What type of response from Google Map?
Published: 2022-03-26 08:43:13

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lcj0h4w7dk6wpxsl7yz.PNG)
 
**Header**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/374b7mjjdwn3fyvovvwu.PNG)

**Preview**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szxbxs2y0e9dpk5oy8py.PNG)

**Response**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1y6oqwutggya9jmkyl9m.PNG)
Cloudflare automatic DNS update for homelab
Published: 2022-12-09 14:09:50

---
title: Cloudflare automatic DNS update for homelab
published: true
date: 2022-03-26 08:31:40 UTC
tags: 
canonical_url: https://blog.niradler.com/cloudflare-automatic-dns-update-for-homelab
---

First of all, I love Cloudflare, I think they have a great product, I use Cloudflare to manage all my DNS, anyone that has a homelab setup knows you need to figure out a way to keep Cloudflare IP update if your home IP is changed, there are many great solutions out there but I love to create my own tools, so I created [cloudflaresync](https://github.com/niradler/cloudflaresync).

My home lab setup is a set of docker-compose files, everything is dockerized so this was the obvious choice, I'm trying to learn Golang so written in Go, and the code is very simple, but taylormade to my need.

```
# docker-compose
version: '3.4'

services:
  cloudflaresync:
    image: niradler/cloudflaresync
    env_file:
      - .env

```

The code is very straightforward, we get the configuration from a set of env vars, and configure a cron task to run every x time to update DNS records with new IP, I'm also using it to create new records when a new service is created.

```
// main.go
package main

import (
    ...

    "github.com/cloudflare/cloudflare-go"
    "github.com/joho/godotenv"
    "github.com/robfig/cron/v3"
)

....

func main() {
    err := godotenv.Load()
    if err != nil {
        log.Println("Error loading .env file")
    }
    updateRecords()
    log.Println("Start cron", time.Now())
    cronExpression, exist := os.LookupEnv("CRON")
    if !exist {
        cronExpression = "0 * * * *"
    }
    log.Println("cron:", cronExpression)
    c := cron.New()
    id, err := c.AddFunc(cronExpression, updateRecords)
    if err != nil {
        log.Fatal("cron AddFunc error:", err)
    }
    log.Println("cron id:", id)
    c.Start()
    log.Println("Cron Info: ", c.Entries())

    go forever()

    quitChannel := make(chan os.Signal, 1)
    signal.Notify(quitChannel, syscall.SIGINT, syscall.SIGTERM)
    <-quitChannel

    fmt.Println("done")
}

```

Supported env vars:

```
CLOUDFLARE_API_TOKEN=<key>
CLOUDFLARE_DOMAIN=example.com
CLOUDFLARE_SUB_DOMAINS=test,home
CRON=*/2 * * * *
PROXIED=true

```

Running example for raspberry pi.

```
docker run --name cloudflaresync --env CLOUDFLARE_API_TOKEN=<key> --env CLOUDFLARE_SUB_DOMAINS=<app,home> --env CLOUDFLARE_DOMAIN=<example.com> --restart unless-stopped niradler/cloudflaresync:armv7

```
Starting a Business: Week 1
Tags: webdev, career, startup, wordpress
Published: 2022-03-26 08:24:43

**A while ago, I started a business, this series would help you get the most out of my experience.** If you are also thinking about starting a business, I really hope this will help! Note that this is going to be a 3 part series, so stay tuned for more!

**It all started one day when I searched "How To start a Business".** I know, not a very professional approach. Anyway, I found a website called WP-Beginner, and I started following one of their tutorials. It's just the usual type of tutorial, nothing special about that.

**Anyway, I found a great hosting provider called SiteGround, installed the CMS WordPress, and started making my dream business!** Sounds like a great start right? Well, nothing is wrong with how I started my business, it's what I did afterwards, which we'll talk about later.

**So I got an empty WordPress website so far!** Basically, I changed the WordPress theme, wrote some stuff, and got a few views! Perfect, until I forgot all about it and moved on.

**But one day, a few months after I created my business, I suddenly remembered about it.** Well, this time, I took another approach. I won't just write on one platform, I'll write on two platforms, and create some free online tools!

Moral, this isn't how you create a business:
`create-business()`

I know, this isn't a really long article, but I really think writing a series about it can help you out more. So stay tuned for part 2! :)
WN12: What is the best piece of content you found?
Tags: discuss
Published: 2022-03-26 08:01:51

Another week has passed, and here we want to get the best pieces of content you found during the week!

It really can be anything:

- videos
- posts
- tweets
- books
- motivation
- etc.

Share anything that added value to your journey and could add value to other people's journey.

So, what is the best piece of content you found this week?
Today's Daily Humor For Devs - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-03-26 08:00:05

---
title: "Today's Daily Humor For Devs - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258d16351b.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What do you get when you cross a computer and a life guard?

___A:___ A screensaver!
 -->
This week’s newsletter is out! (26-03-2022) - Mozilla’s vision for the evolution of the web
Tags: javascript, tech, webdev, discuss
Published: 2022-03-26 07:38:33

---
title: This week’s newsletter is out! (26-03-2022) - Mozilla’s vision for the evolution of the web
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Mozilla’s vision for the evolution of the web

https://markjgsmith.substack.com/p/mark-smiths-newsletter-26-03-2022?s=w

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Don't just learn it, do it!
Tags: beginners, testing, tutorial, productivity
Published: 2022-03-26 07:27:29

As they say, you can't learn to swim by just watching. I guess it stands true for building a Test automation framework from the scratch as well. No matter how many tutorials you watch online until you get your hands dirty with codes, you have not truly grasped it.

In my current company, I have been assigned to a project to build an automation framework from the scratch in addition to being vigilant manually. Rookie myself was drowned in watching tutorials which led me nowhere because I was still fearful of making mistakes.

Once I let go of that feeling and started writing codes, everything came naturally to me. Well of course all the knowledge that I had gathered watching tutorials and reading blog articles was helping me subconsciously.

Yes, I have made mistakes along the way but to err is human. The more you progress in building an automation framework, the more you know what should you do to make your tests less flaky. I will share the key things that you should keep in mind while building an automation framework soon.

The lesson being; don't just learn it, do it.
How to install Metasploit in termux 2024
Tags: metasploit, termux, msfconsole, linux
Published: 2022-03-26 07:27:08

## Introduction

Metasploit is mostly used exploitation framework . Metasploit Framework is set of open source tools that is used for network enummeration , vulnerability scanning , payload making , exploit etc. 

## Main Components

**1. Auxiliary** 

It is a supporting module , such as scanner , fuzzers , crawlers etc found here.

**2. Encoders**

It is used to encode the exploit and payload to bypass signature based antivirus

**3. Payloads**

Payloads is just a code which is run in target system 

**4. Exploits**

It provides access to the target system .


##Follow Steps From Here 

https://www.h4ck3r.me/how-to-install-metasploit-in-termux/

## In this tool you will get many features

`Metasploit Installation`
`Repair` 
`Backup`
`Restore`

It support android version 4.4 to latest 

{% embed https://youtu.be/en2O12q0zDw %}