teleren/devto huggingface dataset:
Mirza Ghalib Poems Collection

Published: 2021-01-04 10:00:24

Deewan E Ghalib by Mirza Ghalib is a collection of poems of Mirza Ghalib and is among the most popular collection of Mirza Ghalib which was quite famous since the last decade. Deewan E Ghalib Hindi Book was originally penned in Urdu but later on was being translated into Hindi.

Today Deeewan E Ghalib is quite popular in foreign countries also and has been published in many languages of Asia and Europe. Mirza Ghalib was one of the most talented and popular name in the Urdu Literature. Few lines of his poetry has been given below –

एक एक क़तरे का मुझे देना पड़ा हिसाब

ख़ून-ए-जिगर वदीअत-ए-मिज़्गान-ए-यार था

-------------------------------------------------------------

कहते हैं जीते हैं उम्मीद पे लोग

हम को जीने की भी उम्मीद नहीं

-------------------------------------------------------------

उस अंजुमन-ए-नाज़ की क्या बात है ‘ग़ालिब’

हम भी गए वाँ और तिरी तक़दीर को रो आए

-------------------------------------------------------------

इतना तो ज़िंदगी में किसी के ख़लल पड़े

हँसने से हो सुकून न रोने से कल पड़े

-------------------------------------------------------------

जज़्बात कहते हैं खामोशी से बसर हो जाए

दर्द की ज़िद है की दुनिया को खबर हो जाए

-------------------------------------------------------------

तुम्हे दर्द से भी इश्क़ होने लगेगा…

अपना कुछ वक़्त मेरे नाम कर के तो देखो..!!
Setup GitHub Actions as CI for Ember addons
Tags: ember, github, travisci
Published: 2021-01-04 10:00:04

Developers creating Ember Addons did not need to care about CI setup when starting a new addon for a long time. Ember CLI generated a ready to be used TravisCI configuration automatically. One click in Travis dashboard to enable it for the new project was enough to get continuous integration up and running.

Sadly TravisCI recently changed their plan for open source projects dramatically. Runners for travis.org were cut. Pipelines stayed in pending state for days. A few weeks later Travis enforced a limit on CI minutes per month for open source projects running on travis.com. The limit is too small for many projects. Long story short: Travis basically dropped their free plan for open source projects.

Luckly GitHub provides a great replacement: GitHub Actions. It is free for open source projects and doesn't have a limit on CI minutes. It doesn't even require the maintainer to manual enable it. Push the configuration file to the repository and you are done. 🚀

But who wants to write such configuration himself? I want to focus on the addon I'm building. Needing to learn more about GitHub Actions might be interesting. But not when I'm trying to build the next great addon for our ecosystem!

If you feel the same I have something for you: [create-github-actions-setup-for-ember-addon](https://github.com/jelhan/create-github-actions-setup-for-ember-addon#create-github-actions-setup-for-ember-addon). 🎉

![Command to run the script](https://dev-to-uploads.s3.amazonaws.com/i/uv4u7018kvyfkntuez0v.png)

It is a small node.js script, which creates a GitHub Actions setup for Ember addons automatically. Run `yarn create github-actions-setup-for-ember-addon` if using yarn or `npm init github-actions-setup-for-ember-addons` if using NPM in your project folder. Commit the created `.github/workflows/ci.yml`. And you are done. 🥳

1. Switch to project folder.

2. Run the script:
    ```sh
    # in a yarn repo
    yarn create github-actions-setup-for-ember-addon

    # in an npm repo
    npm init github-actions-setup-for-ember-addon
    ```

3. Commit the created `.github/workflows/ci.yml` file.

4. See the CI pipeline running.

The script analyzes an existing `.travis.yml` to determine the CI configuration to be used. As Ember CLI still creates a TravisCI configuration the created GitHub Actions workflow will follow the recommendations for the Ember version used by your project.

Create-github-actions-setup-for-ember-addon is still alpha software. It tries to follow latest best practices. But some questions are not finally resolved yet.

But you do no need to worry. It supports later upgrades of the generated GitHub Actions workflow. All you need to do is running `yarn create github-actions-setup-for-ember-addons` and your project will be upgraded to latest blueprints. 💪

Try it out right now!
Protect your SEO when crossposting
Tags: writing, seo
Published: 2021-01-04 09:58:28

Writing something and waiting for people to find it doesn’t work. After publishing something, we need to make others aware of it. Nobody will know about what we’re doing unless we tell them about it. It sounds obvious, but I had to learn that lesson the hard way.

Very few people hang out on my website. Lots of people hang out on services like dev.to, Hashnode, and Medium. I have started crossposting my blog posts and newsletters to these to spread the word. Posting the same content to many sites is fine when we know what we’re doing. When done carelessly, it can negatively impact our SEO scores.

When search engines find the same content under **more than one URL**, they consider it duplicate. They don’t usually show duplicates in search results, so they pick one for us. That might not be the version we want them to use.

On top of that, duplicates weaken each other’s rank in the search engines’ algorithms. Search engines give a value to every page. If a page with a high value links to another page, that increases the value of the page behind that link.

When sites link to the different copies, each duplicate gets just part of the entire link juice.

![Each duplicate gets its own serving of link juice.](https://dev-to-uploads.s3.amazonaws.com/i/2o88xdq9m9doo95tzksy.png) 

To fix this, the duplicates can all point to one main copy and declare it the canonical version. We can do this with a link-tag placed in the `<head>` of an HTML document:

```html
<link rel="canonical" href="https://islovely.co/posts/drop-the-should">
```

All link juice the copies would receive gets passed to the canonical version.

![Copies pass their link juice to the canonical version.](https://dev-to-uploads.s3.amazonaws.com/i/94wvhwawu7qalo69wk39.png)

When crossposting to another service, make sure you’re always pointing back to your own site. It doesn’t matter how many duplicates there are. Their combined link juice now counts towards a single canonical version.

If you blog on any service and don’t have a blog under your own domain yet, **set one up today**. Make the copies on your own site the canonical versions of all your posts. It does not matter if people don’t link directly to your own blog yet. If they link to any copy, you still get the SEO benefits for your own domain.

If you’re not crossposting yet, go ahead and put your content on these other services as well. As long as you’re setting the canonical URLs, your future self and SEO will thank you.

– Dom
javascript headache
Tags: javascript, beginners, firstpost
Published: 2021-01-04 09:47:49

HELLO fellow beginners, I am learning javascript and I am trying to display a 11*11 multiplication table of numbers between 0 and 9:
and i am stuck how to add the extra columns!!
this my multiplication table so far: 

let tableau = document.createElement('table');
document.body.appendChild(tableau);
tableau.style.borderCollapse = "collapse";
for(let i=1;i<10;i++){
let ligne = document.createElement('tr');
tableau.appendChild(ligne);
for(let j=1;j<10;j++){
let td=document.createElement('td');
td.textContent=i*j;
ligne.appendChild(td);
td.style.width="40px";
td.style.border="2px solid #000";
td.style.textAlign="center";
td.style.fontSize="30px";
}
}
Blog Terbaik 
Tags: devops, discuss
Published: 2021-01-04 09:40:53

Kalian harus melihat blog ini, karena blog ini sangat lah bermanfaat, berisi konten yang sangat membuat hidup anda berubah.
Berisi cara cara belajar, pengembangan diri , cerita fantasy dan tutorial teknologi. 
https://allceritaa.blogspot.com
Terminal Image Manipulation
Tags: linux, ubuntu, imagemagick
Published: 2021-01-04 09:38:21

---
title: Terminal Image Manipulation
published: true
description: A collection of recipes for manipulating images from the command line. Using ImageMagick and other tools to rotate and resize images.
tags: Linux, Ubuntu, ImageMagick
canonical_url: https://hadleybradley.com/technical/image-manipulation.html
---

As a web developer there are many instances in which you need to interact with images. Maybe you need to rotate or resize an image before posting it to your web site. In most cases, you'll not need a fully blown image editor like Gimp installed on your machine. With <a href="https://imagemagick.org/">ImageMagick</a> and other command line tools, such as <a href="https://linux.die.net/man/1/jpegtran">jpegtran</a>, you can accomplish a lot from the terminal. Here is a list of the commands I use on a regular basis.

## Get dimensions of an image

``` bash
identify input.jpg
```

Which will return the dimensions like:

``` bash
input.jpg JPEG 3264x2448 3264x2448+0+0 8-bit sRGB
```

## Rotate an image

You can rotate an image through 90 or 180 degrees by using the jpegtran command:

``` bash
jpegtran -rotate 90 input.jpg > output.jpg
```

## Resize an image maintaining aspect ratio

You can use the convert command from the ImageMagic library to resize an image to a specific width while maintaining the aspect ration for the images height. In this example, we resize the input image to a maximum width of 700 pixels. We also reduce the quality of the JPG compression to 80%.

``` bash
convert -geometry 700x input.jpg -quality 80 output.jpg
```

## Prepare an image for a website

To prepare a JPG image which is as small as possible for website performance we should remove all the EXIF data and remove the embedded thumbnail that many cameras generate. The command below does this, while also converting the JPG to use a progressive encoding. The progressive encoding can make the image appear to load faster over slow internet connections, as it renders the image in stages to make it appear it's being streamed in.

``` bash
jpegtran -copy none -progressive -optimize input.jpg > output.jpg
```

## Remove colour from an image

To convert a JPG image to a greyscale black and white photo use the following command:

``` bash
jpegtran -greyscale input.jpg > grey.jpg
```
Hacktober Fest 2020
Tags: hacktoberfest, github, git
Published: 2021-01-04 09:35:29

Participated in #hacktoberfest2020 for the first time and I'm so privileged to receive these amazing gifts. This is just the beginning and rewards like this motivate people like us. Thank you so much DigitalOcean for conducting such an event and of course my college St. Francis Institute Of Technology for letting us know about such events and encouraging us to participate.
How to create an extension method in C#
Tags: csharp, dotnet
Published: 2021-01-04 09:29:36

Extension methods are methods that add additional functionality to any C# type without creating a new derived type or modifying the original type.

#### Format of Extension methods in C#

```csharp
public static class NameOfTheClass
{
    public static ReturnType(this typeOfTheSource source)
    {
        // Extension method definition
    }
}
```
#### Example: Extension Method
.NET provides a static method that indicates whether a specified string is null oe an empty string. We can take this functionallity and wrap it in a custom extension method.
```csharp
public static class StringExtensions
{
    public static bool IsNullOrEmpty(this string source)
    {
        return string.IsNullOrEmpty(source);
    }
}
```
#### Usage
```csharp
string str = "just a string";
if (str.IsNullOrEmpty)
{
    // do something if the string is null or empty
}
```
#### Example: Extension method with additional parameters
The following example demostrates how to generate extension method with additional parameters. The bellow method rounds a given decimal to the given precission.
```csharp
public static class DecimalExtensions
{
    public static decimal Rounding(this decimal dec, int precision)
    {
        return Math.Round(dec, precision);
    }
}
```
#### Example: Generic extension methods
The following extension method take generic value types as parameters and source. This method searches if a given value exists in a given array.
```csharp
public static class StructExtensions
{
    public static bool In<T>(this T value, params T[] parms) where T : struct
        => parms.Any(x => x.Equals(value));
}
```
If you would like to read more stories, check out the <a href="https://www.kapadev.com/" target="_blank">kapadev blog</a>
Monitor Website Spending Time with Ora
Tags: monitoring, webdev, productivity, tools
Published: 2021-01-04 09:28:50

## Features

- Simple Dashboard
- Set limits for each host
- Powerful & flexible rules
- Import & Export data
- 100% Open Source & Local
- Set retention policy that deletes all logs older than a user specified number of days.

![Image](https://github.com/cupcakearmy/ora/raw/master/store/a.png)

## Download

[![Download link for Firefox](https://github.com/cupcakearmy/ora/raw/master/store/download_ff.png)](https://addons.mozilla.org/en-US/firefox/addon/ora-tracker/)


[![Download link for Chrome](https://github.com/cupcakearmy/ora/raw/master/store/download_chrome.png)](https://chrome.google.com/webstore/detail/ora/aghpiipfpgdiadkibmddeinngbboajbl)


## Link

[https://github.com/cupcakearmy/ora](https://github.com/cupcakearmy/ora)
Any person who tell me about ui design services?
Tags: ux, ubuntu, laravel, android
Published: 2021-01-04 09:28:42

Mostly the design teams don’t understand targeted audience, their behaviors or visual preferences. <a href='https://origamistudios.us/ui-design/'>Ui Design Services</a> A poor design can ruin business idea and cost you more in terms of time and money.
Understanding Delayed Expansion in Batch CMD 
Tags: windows, batch, script
Published: 2021-01-04 09:28:35

I always try to avoid writing Batch script files as it's really tedious to maintain them in contrary of other scripting languages like BASH for example. 

![Crying man meme](https://dev-to-uploads.s3.amazonaws.com/i/owivowyumfu0s7n5vj2e.jpg)

But sometimes it's unavoidable to deal with some Batch code. That's why it's really important to understand some concepts specially the "Delayed Expansion" concept in batch files. 

This is a good tutorial of understanding the concept of "Delayed Expansion" in batch files. This is a good concept to know when writing a Batch file that is including relatively not simple code (for example if, for, ..etc) statements. 

Enjoy,

https://ss64.com/nt/delayedexpansion.html
Micro Frontends Patterns#11: Edge Side Composition
Tags: microservices, microfrontends, javascript
Published: 2021-01-04 09:21:02

Edge Side Composition is a technology that combines content at the edge layer, such as CDN.

![1yzrvzfkqdw2qi2a0eutljscqbat](https://dev-to-uploads.s3.amazonaws.com/i/86h8okuiwntckcv8m3kg.png) 

Edge Side Composition here is assumed to be a process that assembles and renders Fragments at the Edge Side.

## Edge Side Includes

The ESI in the previous section can be a kind of Edge Side Composition.

## Edge Side Rendering

In this section, SSR running on the Edge Side are called Edge Side Rendering. For example, Edge Side Rendering [with Next.js using Lambda@Edge and Serverless Framework](https://www.serverless.com/blog/serverless-nextjs), Edge Side Rendering with [Cloudflare Workers using a framework called Flareact](https://blog.cloudflare.com/rendering-react-on-the-edge-with-flareact-and-cloudflare-workers/).

The Edge Side FaaS can take care of the dynamic Backends that the server is usually in charge of, and can also deliver the static content.

## Pros and Cons

### Pros

As the name suggests, Edge Side Composition does not require any server resources for composition. Since everything is done on the Edge Side, there is no need to prepare and manage a computing environment for a simple rendering server. Also, in terms of latency, since it delivers just static contents on the Edge Side, it will have an advantage over a simple Node server.

There are also advantages in terms of scaling. For example, when using SSR with React, the nature of Node.js can cause CPU-bound. Edge Side Composition is designed for serverless computing environments, so it reduces the need for infrastructure scaling considerations. In addition, AWS Lambda, for example, scales horizontally on a per-request basis, so the possibility of CPU-bound can be reduced as well.

### Cons

We will use some kind of FaaS actually. Because it is managed service, its quota can be a disadvantage. For example, in AWS Lambda, the following limitations exist;
 
- Timeout - 15 minutes, 5 seconds for Viewer and 30 seconds for Origin in Lambda Edge
- Response size - 6MB, 40KB for Viewer and 1MB for Origin in Lambda Edge
- Size of the function itself - 50MB, 1MB for Viewer and 50MB for Origin in Lambda Edge

For example, in terms of function size, it is necessary to compactly package modules related to rendering. Also, when using configuration management tools such as CloudFormation, you need to consider the limit on the number of resources and the design of IaC. Cold start is another point that needs to be considered. Thus, when using FaaS, it will be necessary to investigate and agree in advance whether it will meet the actual application requirements.

If you don't want to be bothered by the above limitations, you might want to consider an architecture such as Fargate + CDN, or scaling with ECS or EKS in the first place.

## Summary

Edge Side Composition is a dream architecture that gives JAMstack the weapon of a computing environment, but I think it needs to be used with a good understanding.
How to create custom checkbox
Tags: html, css, javascript, beginners
Published: 2021-01-04 09:09:53

**Hello guys in this tutorial we will create custom checkbox HTML and CSS**
First we need to create two files **index.html** and **style.css** then we need to do code for it.

###Step:1###
**Add below code inside index.html**
```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Simple check box</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" href="style.css" />
    <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap" rel="stylesheet">
  </head>
  <body>
    <div class="lang-selector">
      <div class="flex-field">
        <input type="radio" name="lang" value="eng" id="english">
        <label for="english"></label>
        <span class="label">English</span>
      </div>
      <div class="flex-field">
        <input type="radio" name="lang" value="noneng" id="nonenglish">
        <label for="nonenglish"></label>
        <span class="label">Non English</span>
      </div>
    </div>
  </body>
</html>
```
###Step:2###
Then we need to add code for **style.css** which code i provide in below screen.
```css
* {
  padding: 0; margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
}
body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #f1f2f3;
}
input[type="radio"] {
    display: none;
}
input[type="radio"] + label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #4b00ff;
    position: relative;
    cursor: pointer;
}
input[type="radio"] + label:after {
    content: "";
    position: absolute;
    width: 3px;
    height: 12px;
    left: 0;
    right: 0;
    top: 0;
    margin: auto;
    transform: rotate(45deg);
    border: 2px solid #f1f2f3;
    border-top-color: transparent;
    border-left-color: transparent;
}
input[type="radio"]:checked + label {
    background: #4b00ff;
}
.lang-selector,
.flex-field {
    display: flex;
    align-items: center;
    grid-gap: 10px;
}
```
<a href="https://blog.stackfindover.com/how-to-create-custom-checkbox/" rel="dofollow">Custom checkbox output</a>
What CSS approach do you use in NextJS?
Tags: discuss, nextjs, css
Published: 2021-01-04 09:02:07

---
title: What CSS approach do you use in NextJS?
published: true
description: 
tags: discuss, nextjs, css
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--p3PH2gZq--/c_imagga_scale,f_auto,fl_progressive,h_900,q_auto,w_1600/https://dev-to-uploads.s3.amazonaws.com/i/kh3ntlg6dnemjeaz531z.png
---
NextJS has a nice [built-in CSS support](https://nextjs.org/docs/basic-features/built-in-css-support). I use CSS modules, meaning I don't have to worry about the class names, everything is organized, and associated just with the specific component.

They also have support for SASS, PostCSS, CSS-in-JS solutions like `styled-jsx`, low-level utility frameworks like Tailwind, etc. For global styles, you can import the global CSS file within `pages/_app.js`.

What CSS approach do you use in NextJS?
Serialisation
Published: 2021-01-04 08:58:59

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ckve7tcybz5vq3mic7mr.jpg)

###Previously we talked about  **parsing** data so it could be sent over a network and we used an example code in python. **parsing** is a simple form of serialisation.
**Serialisation** is converting data into a stream of bytes so that it can be stored or transmitted.

#### Remember our example information that was to be sent over the internet that has two data types an integer and a string
```
data1 = “hello” #string
data2 = 123  #interger
``` 
Now we can use **pickle** a serialisation module in python(FYI: marshal, JSON are other python serialisation modules ) to convert this data to bytes and send them over the network.
NOTE: any data type can be serialised with **pickle**
```
import pickle  

data1 = “hello” #string
data2 = 123  #interger

#creating our message as a tuple
message = (data1, data2)

#converting data to a stream of bytes with pickle
msg = pickle.dumps(message)
print(msg)
```

When this message is received it needs to be  deserialised 
```
import pickle 
 
#deserialising
message = pickle.loads(msg)


data1 = message[0]
data2 = message[1]

print(data1)
print(data2)
```
Warning as stated in the [pickle](https://docs.python.org/3/library/pickle.html) documentation deserialisation(unpickling) can be exploited by crafting data to cause arbitrary code execution.
###Hope this gives you a basic understanding on **serialisation** and how to use the **pickle** python module to do it. Please do leave suggestions or questions in the comment box or contact me [@black_strok3](https://twitter.com/black_strok3)

######Photo by Neo from Pexels
Did you know about Facebook keyboard shortcuts?
Tags: facebook, shortcut
Published: 2021-01-04 08:46:50

Recently I was doing some privacy checkups on Facebook and found something interesting. You can browse through your newsfeed without using the mouse. Here is how you can do it. 

## Where you can find the shortcuts?

1. Click on your account.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3x637ywnm28exhiuxet7.png)
2. Then navigate to **Display and accessibility**.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1uw0onz77kjebjxn6t6a.png)
3. Click on **Keyboard**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/q1s6q5k6g9rctxeo8d5n.png)
4. Then **See all keyboard shortcuts**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/riljl8e9m8aocpgpg6ex.png)

Memorize the shortcuts for navigating in your newsfeed.

## List of available shortcuts

### Global shortcuts

|Description|Key|
|----------|---|
|Search Facebook|/|
|Show/hide shortcuts| shift + ? |


### Newsfeed
|Description|Key|
|-----------|---|
|Leave comment|c|
|See more|enter|
|Next post|k|
|Previous post|j|
|Like or unlike post|l|
|Open attachment of post|o|
|Create new post|o|
|Search Messenger contacts|q|
|Share post|s|

### Photo Albums
|Description|Key|
|-----------|---|
|Enter or exit fullscreen|f|
|Previous photo|j|
|Next photo|k|
|Like photo|l|

## Why I use these shortcuts?

As a heavy user of the tiling window manager, I rely heavily on the keyboard for doing my day to day works. So using the mouse is my second option. Sometimes my finger aches after scrolling a long time in the newsfeed :tired_face: . So it's a great relief for me to use these shortcuts for navigating my newsfeed.