teleren/devto huggingface dataset:
Set new resolution on Linux - Force
Tags: tutorial, beginners, linux, productivity
Published: 2022-03-05 03:20:27

Step 1: Run this command (put it the resolution that you would like) "cvt + resolution + hz":

```
cvt 1920 1080 60
```

Step 2: It will appear this message: 

```
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
```

So you will copy starting after **Modeline.**

Step 3:  Run :

```
xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
```

Step 4:  Run:

```
xrandr --addmode DP-1 1920x1080_60.00
```

Step 5: Run to confirm: `xrandr`

```
Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 16384 x 16384
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1360x768      60.02 +
   1920x1080     60.00*   59.94  
   1280x720      60.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DP-1 connected 1366x768+1920+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1366x768      59.79*+
   1360x768      60.02  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
   1920x1080_60.00  59.96
```

Step 6:  To  put this resolution now, run:

```
xrandr --output DP-1 --mode 1920x1080_60.00
```

Step 7: Save this changes to keep when reboot computer.

Copy the 3 commands that we used previously.(create new resolution, add new mode, apply new mode)
```
xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DP-1 1920x1080_60.00
xrandr --output DP-1 --mode 1920x1080_60.00
```
And goes to the `/etc/profile`. Open with your editor favorite as sudo mode, and paste down of latest fi, like this:
![/etc/profile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iw11km5hkqubm4ngg83i.png)
What Is TypeScript?
Tags: typescript, intro
Published: 2022-03-05 03:16:52

In One sentence, TypeScript is a superset of JavaScript. It was developed by Microsoft in 2012.

Let's see why the TypeScript language exists in this world.
 
TypeScript solves some common problems of JavaScript by adding some additional features on top of the JavaScript language.

We know that Javascript is a dynamically typed language. For this, we don't need to think about data types while writing code. But there is some problem. 

Look at the below code snippet to understand the problem.

```
const add = (a) => (b) => a + b;
add(1)(2) // 3 (expected result)
add(1)('2') // '12' (unexpected result and no error)
```

We can see that when we pass two numbers to the add function it gives us a return value which is number as expected. But when we pass a string and a number it gives us another string as a return value which we are not expecting.

To fix this kind of problem TypeScript implemented the feature of statically typed language in JavaScript. Let's see the above example in typescript.

```
const add: (a: number) => (b: number) => number =
    (a) => (b) => a + b
console.log(add(1)(2)) // 3 (expected)
console.log(add(1)('2')) // Error --> Argument of type 'string' is not assignable to parameter of type 'number'.
```

In the add function, we have defined that parameters a and b will be number. So when we pass two numbers we get our expected result. But when we pass a number and a string TypeScript compiler gives us an error. In modern IDE, the error will be shown instantly after writing the line. You don't need to compile it to catch this kind of error. 

Does TypeScript replace JavaScript?
The answer is no. As browsers still don't understand the TypeScript language, we have to compile our TypeScript code to JavaScript for making the code workable.

We have seen what typescript is in short. But it has some huge topics to explore. Check their [official documentation](https://www.typescriptlang.org/) to know more.
There is also a [playground](https://www.typescriptlang.org/play) to play with the typescript language.
Dedupe your shell paths
Tags: linux, cli
Published: 2022-03-05 02:13:31

---
canonical_url: https://waylonwalker.com/til/dedupe-your-shell-paths/
published: true
series: til
tags:
- linux
- cli
title: Dedupe your shell paths
---

If you have ever ran `which <command>` and see duplicate entries it's likely that you have duplicate entries in your $PATH.  You can clean this up with a one liner at the end of your bashrc or zshrc.

``` bash
eval "typeset -U path"
```
Scheduling Backups on an Oracle Cloud VPS
Tags: backupandrestore, vps, oraclecloud
Published: 2022-05-20 02:42:28

---
title: Scheduling Backups on an Oracle Cloud VPS
published: true
date: 2022-03-05 01:52:23 UTC
tags: backupandrestore,vps,oraclecloud
canonical_url: https://blog.designly.biz/scheduling-backups-on-an-oracle-cloud-vps
---

![Featured](https://cdn-images-1.medium.com/max/1024/1*GK0JNyhpKGnlC9lqvXPQig.jpeg)

If you’ve read my article, [_How to Get a Free NGINX/PHP-FPM Web Server_](https://designly.biz/blog/post/how-to-get-a-free-nginx-php-fpm-web-server), you’re probably going to want to maintain incremental backups of your VPS instance. Thankfully, Oracle Cloud allows you do this within the always-free constraints.

So let’s begin!

First, log into your [Oracle Cloud Console](https://cloud.oracle.com/). Then click the **menu bar** on the top right and select **Storage** and then **Block Storage**.

![Select Storage and then Block Storage.](https://cdn-images-1.medium.com/max/1024/1*Bzcz6vMWjNdTe7eJUoqzCQ.jpeg)
_Select Storage and then Block Storage._

Next, click **Boot Volumes** on the left sidebar and then click on your VPSs boot volume in the list.

![Click Boot Volumes and select your volume.](https://cdn-images-1.medium.com/max/1024/1*-JPA759saZYfs1-YmEUE4Q.jpeg)
_Click Boot Volumes and select your volume._

Scroll down to **Backup Policies** and select **Gold**. The Gold backup policy does an incremental backup every night at midnight, a weekly incremental backup on Sunday and it will retain weekly backups for 4 weeks.

![Scroll down to Backup Policies and select Gold.](https://cdn-images-1.medium.com/max/1024/1*i2FPBD26NdkhrvxDvtnUEg.jpeg)
_Scroll down to Backup Policies and select Gold._

After a day or two, come back to **Block Storage** , click **Boot Volume Backups** , and you should see your backups list populated with your incremental backups.

![Come back to Block Storage and click Boot Volume Backups.](https://cdn-images-1.medium.com/max/1024/1*JeKDPRgbw-vMD3LBP6fi2g.jpeg)
_Come back to Block Storage and click Boot Volume Backups._

If you ever need to restore your VPS from a backup, simply click on the **Backup Name** and then click **Restore Boot Volume**.

![To restore from backup, click Backup Name and then click Restore Boot Volume.](https://cdn-images-1.medium.com/max/1024/1*uZKJjjcf4hyVKJf7dsb51w.jpeg)
_To restore from backup, click Backup Name and then click Restore Boot Volume._

I hope you found this guide useful. For more great information, please visit our [**Blog**](https://designly.biz/blog)!

* * *
GeoNode Advanced Installation In Ubuntu 20.04 Part2
Tags: tutorial, postgres, tomcat, opensource
Published: 2022-03-05 01:42:09

This is a continuation of the First steps in practical installation of GeoNode in Ubuntu 20.04 using advanced method.

GeoNode is an open-source spatial data infrastructure (SDI) that is open source and used to store and manage geospatial data including sharing it over the web. 
In this tutorial we install and configure PostgreSQL/PostGIS and GeoServer components of GeoNode. 

{% youtube OrIvKQJFyJk %}
100 días de código: 81, aprendiendo backend con nodejs
Tags: spanish, 100daysofcode, node, webdev
Published: 2022-03-05 01:20:20

¡Hey hey hey!

Hoy he avanzado con mi aprendizaje creando otra API REST con node y express para una aplicación de agenda telefónica.

Me resulta impresionante lo rápido que se puede crear una API con node, aunque todavía necesito averiguar donde podría montarlo para hacerlo funcional. 

Estoy siguiendo el tutorial de nodejs y express del bootcamp [fullstackopen](https://fullstackopen.com/es/part3/node_js_y_express/) para el aprendizaje de este y me parece un recurso muy completo.

Ahora sigamos con lo que hice...
### Hoy
- Practique como crear una API REST con nodejs.
- Repace los códigos de estatus de las peticiones al servidor.
- Practique Touch Typing.
- Aprendí sobre la seguridad web que tienen los métodos de peticiones http.

¡Espero que tengan mucho éxito con sus proyectos y no olviden sonreirá!
Hasta la próxima.

Foto de [Jed Villejo](https://unsplash.com/@jmvillejo?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) en [Unsplash](https://unsplash.com/s/photos/friends?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).
Are there any good Swedish keymaps (with U.S. layout) for XFCE4?
Tags: arch, linux, help, watercooler
Published: 2022-03-05 01:11:45

I tried a default keymap that comes with `localectl` called `sv-latin1`, it changes the keyboard so much that the layout is impractical for me to use, since I'll just be fumbling around most of the time.
When I pass in the `--no-convert` option, it quasi-removes the keys from my keyboard (skimming through the manual page revealed nothing meaningful to me).

When I used KDE Plasma I was able to use an AltGr key.
Measuring program execution time in PowerShell
Tags: powershell, windows
Published: 2022-03-05 00:32:33

As I was nearing completion of implementing [Ray Tracing in One Weekend](https://raytracing.github.io/) in [Go](https://github.com/killerasus/GoRTIW), I felt the need to measure the time it would take to render a scene<sup><a href=#note1>1</a></sup>.

My day-to-day work is in CentOS, so I was tempted to try `time gortiw` in Windows Terminal, as it already had some improvements over `cmd`, like `ssh` and an alias for `ls`. I was disappointed. There was no easily accessible [time](https://man7.org/linux/man-pages/man1/time.1.html)-like command nor it was an alias.

After searching a little, I got to a solution: using PowerShell's `Measure-Command`. Then I just needed to create a function time in my PowerShell profile and it was done.

## Steps
1. Edit your `Documents\PowerShell\Microsoft.PowerShell_profile.ps1`
2. Add the line
    ```PowerShell
    function time { $Command = "$args"; Measure-Command { Invoke-Expression $Command 2>&1 | out-default} }
    ```
3. Open a new instance or tab of PowerShell to use the new time function.
    Ex: `time gortiw.exe`

Satisfied with the results, the next step will be using a [profiler](https://go.dev/blog/pprof) to check where to improve.

## Notes
<p id=note1>1. Yes, I could have used a timer in Go inside the ray tracer itself, but having a timer like `time` is still useful.</p>
How to Survive a bear market
Tags: cryptocurrency, blockchain
Published: 2022-03-05 00:02:46


What is bear market in crypto

The cryptocurrency market has been bleeding red since the last long periods of 2021; the beginning of 2022 was likewise celebrated in the midst of cries of a market slump.

Bitcoin has shredded close to half of everything of its All- Time High(ATH), exchanging at 37,000 USD; a long way off its ATH of in excess of 65,000 USD in February, April and November 2021.

The initial two ATHs were not random to the IPO of Coin-base and Tesla declaring they have obtained a significant worth of Bitcoin.

However, the once bullish market in 2021 has diverted into a bearish bloodbath from late 2021 to early 2022.

Certainty, this cannot be no different for the crypto market, which has seen a deficiency of more than 620 billion dollars in bitcoin’s market value and over a trillion dollars from the whole crypto market.

If Bitcoin could lose such a sum, one can ponder with what will happen to the altcoin market, which has lost over 30% of its market capitalization, with some altcoins posting losses in twofold digits.

[This article](https://jemmyblog.com) looks to resolve the above questions and will proffer tips on how to survive a bear market. It will likewise give a few pointers on what not to do during a bearish crypto market.

**[how to survive the bear market](https://jemmyblog.com/blog/how-to-survive-a-bear-market/)**

What is a bear Market – Bear market in cryptocurrency

A bear market is portrayed by a sharp fall in the costs of ventures like crypto-assets and stocks over a long period. A market is termed bearish e when the fall in value rings at 20% or more.


The turn into the bear market usually begin with an inescapable downturn, where investors are watching out for figures surrounding joblessness, recruiting numbers, inflation, and so forth
As Pessimism supports the musings, investors lose certainty, and the market starts a pattern of resource sell-offs.

See Original post [here](https://jemmyblog.com/blog/how-to-survive-a-bear-market/)
Regular Expressions Are the Best! s/Best/Worst/
Published: 2022-09-05 09:30:24

---
title: Regular Expressions Are the Best! s/Best/Worst/
published: true
date: 2022-03-05 00:00:00 UTC
tags: 
canonical_url: https://jhall.io/posts/2022-03-05-regular-expressions/
---

Regular Expressions. Regex.

Ya love ‘em or ya hate ‘em, it seems.

In some languages (Perl anyone?) they’re so central to the language, that it’s almost impossible to imagine life without them. In others, they’re tacked on as a cumbersome library.

So should you use regular expressions? Should you avoid them? Does it depend on your language of choice?

I have five simple rules I like to use to help _me_ decide whether or not to use regular expressions:

1. Handling HTML, XML, email addresses, or any other input with complex or irrelgular parsing rules? **Don’t use regex**
2. Is there a library or function to handle parsing/validation/search for you? **Don’t use regex**
3. Are you parsing regular, but complex input, that would be tedious to parse without a regular expression? **Maybe use regex**
4. Is your search/replace pattern provided by a user? **Likely use regex**

I’ve written up a much longer explanation of the thought process behind this list, too, if you’re interested.

[Read the full article now »](https://jhall.io/posts/2022-03-05-regular-expressions/)

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
🦸🏼 How to use wildcard domains with Next.js Image component
Tags: reactnextjsimageprox
Published: 2023-04-22 19:29:00

---
title: 🦸🏼 How to use wildcard domains with Next.js Image component
published: true
date: 2022-03-05 00:00:00 UTC
tags: reactnextjsimageprox
canonical_url: https://bstefanski.com/use-wildcard-domains-nextjs-image-component
---

Some time ago, I was integrating an app with a medium RSS feed, and I ran into a lot of obstacles. Most of them being to the fact that Medium does not want you to use their data. As a consequence, all APIs were deprecated, the API key creation capability was removed, and RSS feeds were proxied by Cloudflare. But, the issue we’re going to cover in this article doesn’t fit in the category.  
<!-- -->I wanted to get four things from the Medium, the title, description, date, and image of the three last articles. After resolving all the unrelated issues, I created a component that uses next/image to render the image, added the image's domain to the config, and discovered a problem. A problem was that each image had a different subdomain.  
<!-- -->For example, The first image could be `https://cdn-images-1.medium.com/imagePath....`, and the second one `https://cdn-images-4.medium.com/imagePath....`. At first, it seemed like the solution is quite simple, just add both subdomains to the next.config.js

```

// next.config.js 

module.exports = {

 images: {

 domains: ['cdn-images-1.medium.com', 'cdn-images-4.medium.com'],

},

})

```

It would work, but it is not reliable since the subdomain is dynamic, it can change anytime when fetching new content. So rather than adding all the domains to the config, we could resolve this issue with a simple regex. So I tried it and quickly found out that it is not supported in next.js. At first, I did not understand why, but then it became clear - it could create a security loophole if the regex was not strict enough.  
<!-- -->So, since both solutions were not enough, I decided to build a custom one, an image proxy that downloads an image and pipes it back to the browser. Of course, with all the validation stuff to make it more secure.

It ended up being big enough to make a library out of it, and here is how you would use it:

```

// pages/api/imageProxy.ts 

import { withImageProxy } from '@blazity/next-image-proxy'

export default withImageProxy({ whitelistedPatterns: [/^https?:\/\/(.\*).medium.com/] })



import NextImage from 'next/image'

export function SomeComponent() {

const actualImageUrl = '<https://cdn-images-1.medium.com/max/1024/1\*xYoAR2XRmoCmC9SONuTb-Q.png>'

return <NextImage src={`/api/imageProxy?imageUrl=${actualImageUrl}`} width={700} height={300} />

}

```

It is written with TypeScript, so you do not have to worry about types, and you can download it through npm:

```

$ npm i --save @blazity/next-image-proxy 

# or 

$ yarn add @blazity/next-image-proxy

```

Github: [https://github.com/Blazity/next-image-proxy](https://github.com/Blazity/next-image-proxy)  
<!-- -->Example: [https://next-image-proxy.vercel.app/](https://next-image-proxy.vercel.app/)
Kiqpo - Build web apps faster than ever
Tags: kiqpo, python, webdev, framework
Published: 2022-03-04 23:37:19

<p align="center">


<h3 align="center" >Kiqpo</h3>
<b align="center">
    <p align="center">Build web apps faster than ever</p>
</b>

### Quick start

> ⚠️ Kiqpo is **Unsuitable for production** as of now.

<sub>Try and contribute | pre-alpha</sub>





- [Install kiqpo](https://github.com/kiqpo/kiqpo/blob/docs/Installation.md)
- [Usage](https://github.com/kiqpo/kiqpo/blob/docs/Usage.md)
- [Contribution](https://github.com/kiqpo/kiqpo/blob/docs/CONTRIBUTING.md)
- [Documentation](http://kiqpo.software)

### About Kiqpo

By making use of [KIQPO](https://github/kiqpo), you can build beautiful, fast, and reliable web applications without relying on [JavaScript](https://github.com/topics/javascript) frameworks, [HTML](https://github.com/topics/HTML) templates, request parsing, or state management. All of this is done using [Python](https://github.com/python) and we're targeting web, [Windows](https://github.com/microsoft), [macOS](https://github.com/topics/macos), [Linux](https://github.com/topics/linux) platforms

### Beautiful user interface
<sub>kiqpo and google's material design </sub>

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework.
that's why we follow [google](https://github.com/google)'s [material design](https://github.com/material-components) system.

### Productive development

Kiqpo offers hot reload, allowing you to make changes to your code and see the results instantly & No HTML/CSS/JavaScript required for Kiqpo

<img width='100%' src='https://i.postimg.cc/c1rXZYxL/output-onlinegiftools.gif' />

<br/>
Kiqpo is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.
Day 543 : The Real
Tags: hiphop, code, coding, lifelongdev
Published: 2022-03-04 23:36:48

_liner notes_:
- Professional : Today was pretty good. Had a group meeting with one of the high up executives that was visiting the London office. He actually remembered me and that I live in a van. haha That was cool. Basically for the rest of the day, I worked on the demo application I've been working on for the week. Also, my manager approved the flight booking I made yesterday. The real is getting real-"er" with this trip happening. Still trying to lock down some dates in some cities. I'm starting to hear back. Hoping to have things nailed down by next week. I need to start booking hotels and travel.

- Personal : Last night, I got a little done on some new designs, work on my side project and tracks for the radio show. Not a bad evening.


![Photo of a snow capped mountain range inTorres del Paine Nat'l Park, Chile taken from across a lake on plain with some shrubbery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wri6v62ryjohe8ztt3ib.jpg)

Got a bunch of stuff to get worked on. Some clothes I ordered came in. Came across this little device that looks like it will add some cool effects to the videos I plan on making while out in Europe. Supposed to come in on Monday. Going to finish working on the radio show. We'll actually be on air tomorrow. Basketball season is over! I also need to reach out to some more folks for this trip.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube -IL1TbZIeL8 %}
About me — Vijay Nallagatla
Published: 2022-03-04 23:34:07


## About me — Vijay Nallagatla

I’m a 30 year old Indian, currently living in Finland with my wife and a job in New Space Technology. A Senior software engineer who code for bread and bed

![[Kedarkantha](https://en.wikipedia.org/wiki/Kedarkantha) is a mountain peak of the [Himalayas](https://en.wikipedia.org/wiki/Himalayas) in [Uttarakhand](https://en.wikipedia.org/wiki/Uttarakhand). Its elevation is 12,500 ft.](https://cdn-images-1.medium.com/max/2160/1*YydqeMkNdNNIlbI0MP6xdg.jpeg)

I am an Engineer willing to contribute my knowledge/experience to build a better digital World.

I started my career in a Healthcare MNC as a Test analyst and quickly recognised my development skills are put aside to do manual tests which I hated the most. Luck and a friend of mine helped me to get an interview with Nokia and finally I got into a proper development role (R&D Engineer, Nokia)

**Why do I write code?**
To answer this, I’ll have to go back to my graduation days and projects I had to work on and amount of time I’ve had spent to make a POC of concepts and represent it in a way people would like it. I always was obsessed with UX/UI and User flow in a system and presentation matters to me. Always used to work tirelessly for hours and actually I enjoyed it thoroughly. That’s when I realised that I like to develop stuff (or Code)

**Where do I work?**
[ICEYE](https://www.iceye.com/), A new space technology for persistent monitoring. I feel it’s really adding value in the way we can monitor our only hospitable Planet Earth. Iceye provides an actionable insights with persistent monitoring. It’s kind of Cool to join the space tech company since I worked on different domains so far (Healthcare, Networking, Cloud).
I work at Iceye as a Senior software engineer in an integration team and we do use [Golang](https://go.dev/) in every possible [microservices](https://microservices.io/).

**Interests and Hobbies**
I like to capture wild animals and spend time in wilderness listening to bird’s chirps and observe nature, animals behaviour and what not. Reading books used to knock me to sleep in couple of minutes in early days but now I’m interested in reading business oriented books, sci-fi and fiction. I do watch a lot of space tech movies, Mars does excites me and I’d see videos about it on YouTube on every free occasion. I am a big time movie buff and watch almost all the top movies and TV series (mostly Sci-Fi, Period drama or Documentary).

**My social Presence**
LinkedIn — [https://www.linkedin.com/in/vijay-nallagatla/](https://www.linkedin.com/in/vijay-nallagatla/)
Twitter — [https://twitter.com/vijaynallagatla](https://twitter.com/vijaynallagatla)
Instagram — [https://www.instagram.com/vijay_nallagatla/](https://www.instagram.com/vijay_nallagatla/)
Facebook — [https://www.facebook.com/Vijai.fb/](https://www.facebook.com/Vijai.fb/)