teleren/devto huggingface dataset:
Best Black Friday & Cyber Monday WordPress Deals in 2021
Tags: wordpress
Published: 2021-11-24 03:25:28

##. **WooLentor** - WooCommerce Page Builder Elementor Addon

With 76 Elementor elements, page templates, & more, you can quickly create professional-looking WooCommerce-based online stores using this page builder plugin. Also, 27 plugins are included in the Agency Pack.

Discount: 70% OFF
Date: Until December 05 2021
Deal URL: [View Details](https://woolentor.com)
Coupon Code: No Required

##. **HT Mega** – Absolute Addons for Elementor Page Builder

HT Mega is an incredible add-on for Elementor that includes 80+ elements and 360 blocks with unlimited variations. With this plugin, you can bring endless possibilities to your site in order embellish it!

Discount: 70% OFF
Date: Until December 05 2021
Deal URL: [More Details](https://hasthemes.com/plugins/ht-mega-pro/)
Coupon Code: No Required

##. **Move Plugin** for Elementor

The Move Addons plugin for Elementor Page Builder is a unique and massive plugin that ensures a pleasant experience with your expanding WordPress website. It has a stunning design  coupled with 80+ Elementor widgets.

Discount: 70% OFF
Date: Until December 05 2021
Deal URL: [More Details] (https://moveaddons.com)
Coupon Code: No Required

##. **Whols** – WooCommerce Wholesale Prices
Whols is the perfect plugin for WooCommerce stores. It enables you to set wholesale prices on your products and show special deals only available through wholesalers!

Discount: 70% OFF
Date: Until December 05 2021
Deal URL: [More Details] (https://hasthemes.com/plugins/whols-woocommerce-wholesale-prices)
Coupon Code: No Required

##. **Elite Licenser** - Software License Manager for WordPress

Protect your software and applications from unauthorized usages with Elite Licenser plugin. With this tool, you can easily manage licenses of any digital products - including WordPress Themes, Plugins, Joomla or any CMS, PHP application, .net application, java or android application- so that only those who have paid the price may use them!

Discount: 70% OFF
Date: Until December 05 2021
Deal URL: [More Details] (https://hasthemes.com/elite-licenser)
Coupon Code: No Required
Copy To Clipboard JQuery Example
Tags: javascript, php, programming, webdev
Published: 2021-11-24 03:20:00

In this tutorial I will explain you how to copy to clipboard jquery example, many time we have requirement to copy text value one field to another field, like current address and perminant address etc. If you are working with inputs or textarea or div, you might need to create a button like "Copy to Clipboard" to copy all contents of input or div to user's clipboard using jquery or javascript.

So, here I will give you some piece of code how to copy to clipboard using JQuery.

```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Copy to clipboard using jquery example - techsolutionstuff.cpm</title>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script>
    $(document).ready(function(){
        $("button").click(function(){
            alert("Success");
            $("textarea").select();
    		document.execCommand('copy');
        });
        
    });
</script>
</head>
<body>
  <h3>Copy To Clipboard JQuery Example - techsolutionstuff.com</h3>
    <textarea id="comment" rows="5" cols="62"></textarea>
    <p><button type="button">Copy To Clipboard</button></p>
    <p><strong>Note:</strong> Type something in the textarea and click the button to see the output.</p>
</body>
</html> 
```
 
---

> **_[Read More : How To Check Array Is Empty Or Null In Javascript](https://techsolutionstuff.com/post/how-to-check-array-is-empty-or-null-in-javascript)_**

--- 

You will get output like this :

![copy to clipboard jquery example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/da6mq996zf2mweegfbnv.jpg)
 
---

You might also like :

- **_[Read Also : How To Generate QRcode In Laravel](https://techsolutionstuff.com/post/how-to-generate-qrcode-in-laravel)_**

- **_[Read Also : How To Add Toastr Notification In Laravel](https://techsolutionstuff.com/post/how-to-add-toastr-notification-in-laravel)_**

- **_[Read Also : Laravel 8 Google Recaptcha Example](https://techsolutionstuff.com/post/laravel-8-google-recaptcha-example)_**
JSON vs JavaScript Object Literal
Published: 2021-11-24 02:39:55

### What is Js Object Literal?
The standard definition would be: it is a comma-separated list of name-value pairs wrapped in curly braces. You can think of it as a 'container' for datas, for example:

```Javascript
const myObject = {
    stringProp: 'value',
    numberProp: 2,
    booleanProp: false,
    arrayProp: ["hello.jpg","smile.png"],
    positionProp: {
        x: 40,
        y: 200
   },
   someAction: function(){
      //action logics
   }
};
```
### What is JSON?
JSON stands for JavaScript Object Notation, which is a lightweight format for storing and transporting of data. Data is usually fetched from a server to the browser in this format. The syntax looks very similar to Js Objects.

In JSON format:
```JSON
{
    "firstName":"John",
    "lastName":"Doe"
}
```
In JavaScript Object:
```Javascript
const person = {
    firstName:"John",
    lastName:"Doe"
}
```
Comparing to a JavaScript Object, the not-so-obvious difference is that both the name and value are doubled-quoted in JSON but only the value is doubled-quoted in Js Object.

### Conversion
JavaScript has built-in support  to convert between JSON and Js Object. 

To convert an _Object_ to JSON Data:
```Javascript
JSON.stringify(Object)
```

To convert a JSON _data_ to an Object:
```Javascript
JSON.parse(data)
```
JavaScript Object will be displayed as the following on browser, thus the need to be converted to JSON.
```Javascript
[object Object]
```
For React users, sometimes we will forget to convert an Object to JSON and will often see this error message when we try to render it:
![Error Msg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uq2gxjwn5lp0g99gq11p.jpg)

That's all! Thanks for reading my short post.
Fast hardware breeds slow software.
Tags: mac, apple, hardware, software
Published: 2021-11-24 02:26:09

---
title: Fast hardware breeds slow software.
published: true
description: 
tags: mac, apple, hardware, software
//cover_image: https://direct_url_to_image.jpg
---

Just like highways breed cars -- fast hardware breeds slow software.

I recently got a new mac book pro and wondering how long it will last before I need to upgrade it again? 

It's been  5 years since I got my last machine. At that time I was going for 16 Gb RAM, and 2 Tb SSD -- I thought I was going to run full Ethereum node. 5 years prior to that I had 4Gb system and it seemed like a lot back then.

This time I went up to 64Gb RAM and stayed with 2Tb SSD. My current drive is only half full, so it will probably still last for a while -- I'm certainly not going to run full Ethereum node, it's just not practical these days. 

Although some Apple fans stated, that with M1 architecture you will never need more than 16Gb RAM, because, even if it swaps -- it will be so lightning fast, you will not know the difference. Well, I object -- swapping, no matter how seamless it might be, will reduce the life span of your SSD. Yes, SSD has limited number of  write cycles. So, I choose more RAM, but want my system to last little longer. 

Generally speaking, I'm very satisfied with my current configuration. 

I run  VS Code, react-native dev environment, few iOS and Android simulators, couple of dozens of Chrome tabs, few Safari tabs, plus email client etc... In about a week of uptime my system gets close to start swapping, but, if I close and re-open the apps -- everything gets back to normal again. 

Just wondering, will I need 256Gb in the next 5 years?

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

Originally posted https://www.echowaves.com/post/fast-hardware-breeds-slow-software
Day 18 of #100daysofcode: Head Down
Tags: 100daysofcode, react, python, beginners
Published: 2021-11-24 02:12:14

As I mentioned in a previous post, I am really going to be stretched thin the next few days. Don't worry, I am still putting in my #100daysofcode time! 

## Today
* Worked on some Leetcode problems
  * Learned about LRU Cache and how Doubly LinkedLists can actually be useful! 
  * I'm going to do a bit more research on the uses of LinkedLists in general, as they are a data structure I generally avoid in implementations outside of HashMap collision handling
* Worked through some of the FreeCodeCamp Regex tutorials
  * I still think Regex is some of the driest, least interesting things to do in the entirety of the Computer Science field, but I want this JS Certificate dang it!

## Upcoming
Expect a bunch of random facts that I learn in the next few days, I spend my mornings learning or working on Leetcode. In the absence of heavy project work, I will be sharing these tidbits!
* **Finals and final project sprints**
* Iron out details regarding the Study Aid app (I really need to name this thing)
  * Flask vs Django
  * Should I change how I deploy? Should Docker get in the picture?
  * Are there any other systems I should think about using as a part of this project?
* Learn more about Material UI, I will probably use Material UI a little bit in my (ongoing) school project. 
* Start the Study Aid app!


### Resources
[JS Course - FreeCodeCamp](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/)
[Material UI](https://mui.com)
[Regex Tutorial - FreeCodeCamp](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures#regular-expressions)
From the Archives – Re-posting Old Blog Posts
Tags: development, content, flow, powerautomate
Published: 2022-06-15 17:20:11

---
title: From the Archives – Re-posting Old Blog Posts
published: true
date: 2021-11-24 01:05:00 UTC
tags: Development,content,flow,PowerAutomate
canonical_url: https://barretblake.dev/2021/11/from-the-archives-re-posting-old-blog-posts/?utm_source=rss&utm_medium=rss&utm_campaign=from-the-archives-re-posting-old-blog-posts
---

Once you've built up some content, one of the ways to keep your social media presence more active is to re-share your older blog posts. For long time followers, it can remind them of previous content. And it can help bring in new followers who didn't see that content previously.

The post [From the Archives – Re-posting Old Blog Posts](https://barretblake.dev/2021/11/from-the-archives-re-posting-old-blog-posts/) first appeared on [Barret Codes](https://barretblake.dev).
3 more apprenticeship programs to consider
Published: 2021-11-24 00:36:45

4. [Twilio Hatch](https://www.twilio.com/company/diversity/hatch)
  - This is a 6-month software engineering apprenticeship program with a diversity focus. It's geared towards underrepresented minorities and non-traditional developers (bootcamp grads, self-taught, etc). 
  - Apprentices can expect to be paired with "an engineering manager with support from one or more technical mentors". Unlike most apprenticeship programs, this program hires apprentices in full-time positions (rather than contractors) and provides additional support for them to thrive. If you're interested in applying to Hatch, you can reach via this email: hatch@twilio.com.

5. [Pinterest](https://www.pinterestcareers.com/blogs/stories-by-pinterest-engineering-on-medium/launching-your-career-as-an-apprentice-engineer-at-pinterest)
  - Another 6-month apprenticeship. I'm not sure if the Pinterest apprenticeship has been postponed due to COVID or terminated completely.
  - The apprenticeship website is no longer up, though you can learn more about it from the 2020 blog post referenced above. I would say keep an eye out for the next cohort.

6. [Airbnb Connect](https://careers.airbnb.com/)
  - Connect is a  6-month program for nontraditional developers. If you're self-taught or a bootcamp grad, this is a great opportunity to get your foot in the door.
  - While the last Connect cohort was listed as 2020, the program might be on hiatus due to the Coronavirus. According to [TechCrunch](https://techcrunch.com/2020/04/17/airbnb-lays-off-contractors-and-cancels-summer-internships/), Airbnb canceled internships, laid off contractors, and delayed hiring junior devs last year. But keep an eye out for any 2021 updates!
100 días de código: 21, tres semanas del reto y metas semanales del Sprint.
Tags: spanish, 100daysofcode, webdev
Published: 2021-11-24 00:27:40

¡Hey hey hey!
Bienvenidos al día 21 del reto 100 días de código. No puedo creer que ya hayan pasado 3 semanas desde que comencé el reto. 

Hoy haré un plan similar a lo que se hace en Scrum para esta semana que me ayudara a analizar mis logros y mejorar en base a las dificultades que pasen en la semana.

### Metas de Sprint semanales:
- Terminar con el diseño y codificación de mi pagina web.
- Avanzar hasta la `conclusión` del curso `Fundamentos` en The Odin Project.
- Terminar la pagina del mes de la pagina que tengo con mi pareja.
- Escribir una entrada diferente a el reto en DEV.
- Comenzar a aprender TypeScript.

La verdad es que es una semana muy ambiciosa de mi parte pero si no hay reto no me lo tomare totalmente enserio y quiero hacerlo.

Ahora si volvamos con la sección regular...

### Ayer:
- Termine con los ejercicios de la sección Fundamentos parte 4 de javascript en The odin project.
- Practique 30 minutos de Touch Typing.
- Mejore mis habilidades en TDD.
- Termine con la mejora de diseño en móviles.
- Avance hasta la sección Manipulación del DOM en The odin Project.

### Hoy:
- Practique 15 minutos de Touch Typing.
- Avance en la guia de The odin Project.
- Aprendí sobre el método para un elemento del DOM llamado `classList.toogle()` el cual te permite alternar entre eliminar o agregar donde, si esta presente en las clases del elemento seleccionado este método la eliminara y si no, entonces la agregara. Para mas información sobre el método [aquí](https://developer.mozilla.org/es/docs/Web/API/Element/classList).
- Termine con el diseño móvil completo de la sección de presentación de mi pagina personal en Figma.
- Termine con la creación de los wireframes de la pagina de mi relación.

Y bueno esto ha sido todo por hoy mis queridos colegas.

Espero que tengan mucho éxito en sus proyectos y que les vaya super bien en este comienzo de semana.
Adiós mundo!
Uploading files with ASP.NET Minimal APIs
Tags: dotnet, dotnet6
Published: 2021-11-25 18:13:06

---
title: Uploading files with ASP.NET Minimal APIs
published: true
date: 2021-11-24 00:00:00 UTC
tags: dotnet, dotnet6
canonical_url: https://gsferreira.com/archive/2021/uploading-files-with-aspnet-minimal-apis/
---

With the .net 6 release, I was extremely excited to play with **[Minimal APIs](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0)**.

One of the first things that I've done was to move an existing project to .net 6 and convert my Controllers into a Minimal API.

I've found the process easy, but **I was surprised when the tests for an Upload endpoint failed**.

My implementation after converting into Minimal API Endpoint was this. 👇

```csharp
app.MapPost("/upload",
    async Task<IResult>(IFormFile request) =>
    {
        if (request.Length == 0)
            return Results.BadRequest();

        await using var stream = request.OpenReadStream();

        var reader = new StreamReader(stream);
        var text = await reader.ReadToEndAsync();

        return Results.Ok(text);
    });
```

And the test this. 👇

```csharp
await using var application = new Application();
using var client = application.CreateClient();

using var formData = new MultipartFormDataContent();
await using var file = File.OpenRead("text.txt");
var streamContent = new StreamContent(file);
formData.Add(streamContent, "file", "text.txt");

var response = await client.PostAsync("/upload",
    formData);

response.StatusCode.Should().Be(HttpStatusCode.OK);
var data = await response.Content.ReadAsStringAsync();
data.Should().Be("\"Hello World!\"");
```


The expected _200 OK_ status code was now a _415 Unsupported Media Type_ 🤔

That was strange. My first thought was that I was missing to define the content type accepted by that endpoint.

```csharp
.Accepts<IFormFile>("multipart/form-data");
```

I realized I was stupid by thinking that since the code above is just about adding OpenAPI Metadata. 😅

Then, finally, I got it. Minimal APIs will try to bind attributes with the assumption that content is JSON.

## So, how do I handle it?

I had to **receive the HttpRequest request as an argument**.

Then, I was able to read the Form and look for files.


```csharp
app.MapPost("/upload",
    async Task<IResult>(HttpRequest request) =>
    {
        if (!request.HasFormContentType)
            return Results.BadRequest();

        var form = await request.ReadFormAsync();
        var formFile = form.Files["file"];

        if (formFile is null || formFile.Length == 0)
            return Results.BadRequest();

        await using var stream = formFile.OpenReadStream();

        var reader = new StreamReader(stream);
        var text = await reader.ReadToEndAsync();

        return Results.Ok(text);
    });
```

In the end, it requires a lit bit of extra effort, but it's not a big deal. Maybe in a future version, we may have a simple way of accomplishing it.

I hope that this was useful! To get more tips like this, follow me on [Twitter (@gsferreira)](https://twitter.com/gsferreira) and let's keep in touch!
Enabling Emoji Shortcodes in Eleventy Markdown Files
Tags: 11ty, emoji, markdown
Published: 2023-07-25 16:26:11

---
title: Enabling Emoji Shortcodes in Eleventy Markdown Files
published: true
date: 2021-11-24 00:00:00 UTC
tags: 11ty,emoji,markdown
canonical_url: https://goulet.dev/posts/emoji-shortcodes-in-eleventy/
---

In moving my blog from hugo to eleventy I noticed my emoji shortcodes (ie: writing `:fire:` and having the 🔥 emoji show up in the generated page) weren't working. 😦

Some quick internet searching didn't turn up a direct result (thus this blog post), but I did stumble upon the answer in the [eleventy docs around markdown](https://www.11ty.dev/docs/languages/markdown/#add-your-own-plugins). We need to tell eleventy to use the markdown-it-emoji plugin with a couple simple steps.

Step 1: Install markdown-it and the markdown-it-emoji plugin

```shell
npm i -D markdown-itnpm i -D markdown-it-emoji
```

Step 2: Update `.eleventy.js` config file and register the emoji plugin

```js
module.exports = function (eleventyConfig) {
  // setup markdown to use emoji plugin
  const markdownIt = require("markdown-it");
  const markdownItEmoji = require("markdown-it-emoji");
  const markdownLib = markdownIt({ html: true }).use(markdownItEmoji);
  eleventyConfig.setLibrary("md", markdownLib);
};
```

Now emoji shortcodes work! 💪 🔥 💥
Setup PostgreSQL for Linux, Windows and macOS using GitHub Actions
Tags: postgres, github, actions, ci
Published: 2022-09-17 14:26:12

---
title: Setup PostgreSQL for Linux, Windows and macOS using GitHub Actions
published: true
date: 2021-11-24 00:00:00 UTC
tags: postgresql, github, actions, ci
canonical_url: https://kalnytskyi.com/posts/setup-postgres-linux-windows-macos-gh-actions/
---

GitHub Actions is a CI/CD platform that is widely used among open-source software hosted on GitHub. If you happened to host your software there, you may end up needing a SQL server to test your application. PostgreSQL is the most common choice nowadays.

As of today (Nov 24, 2021), there's only one [action on the marketplace](https://github.com/marketplace/actions/setup-postgresql-for-linux-macos-windows) to setup a PostgreSQL server for Linux, Windows and macOS action runners. If you among those who want to test their software on all major platforms, you have no option but to use [ikalnytskyi/action-setup-postgres](https://github.com/ikalnytskyi/action-setup-postgres). Below is the typical usage example:

```
steps:
  - name: Setup PostgreSQL
    uses: ikalnytskyi/action-setup-postgres@v1
    id: postgres

  - name: Run tests
    env:
      CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
    run: pytest -vv tests/
```

So why use that exact action and no other?

- Runs on Linux, macOS and Windows action runners.
- Fast! Preinstalled binaries are used.
- Easy to audit, just [4 steps YAML](https://github.com/ikalnytskyi/action-setup-postgres/blob/v1/action.yml)!
ConsoPY - A terminal like python program 
Tags: terminal, python
Published: 2021-11-23 23:57:53

ConsoPY ? Yh its a program which acts like a console .
So lets start with a preview !

![](https://user-images.githubusercontent.com/87514488/142975683-2ebc128f-3aad-4823-9c92-689ccc4b7c4c.png)

It have some utility commands which can be used in the console . 

Now its only supported in Windows.

I have included a batch file , an exe file and the main python file in Github repo . Use any of these methods to use ConsoPY

{% github httpanand/ConsoPY no-readme %}

<h3>Available Commands</h3>
<ul>
<li>date     - Shows current date</li>
<li>python   - Execute a python file</li>
<li>list     - List current directory</li>
<li>color    - Changes text color</li>
<li>ipc      - Returns IP and HOSTNAME</li>
<li>spec     - System specifications</li>
<li>gendir   - Generate a new directory</li>
<li>exit     - Exits this program</li>
<li>cpu?     - Returns current CPU usage</li>
<li>ram?     - Returns current RAM usagee</li>
</ul>

NB: This is not a GUI app.
[Release0.3]Code Reviews
Tags: codereview, documentation, opensource
Published: 2021-11-23 23:45:13

As a part of Release0.3, I reviewed two internal PRs opened by other students. 

[First code review](https://github.com/Seneca-ICTOER/IPC144/pull/104#pullrequestreview-810492913) was a documentation update for IPC144. It was made by Antonio Bennett.I looked for other documentations in the repo, and the documentation guide that was created as an [issue](https://github.com/Seneca-ICTOER/IPC144/issues/18). It was first time reviewing the documentation and following documentation convention of the whole project is very important for the readers and contributors. I reviewed and comment in the PR, and it seems like the updates were looking good. While I was reviewing the code, I had one curiosity in the styling and commented those and got answered. 

[Second code review](https://github.com/Seneca-ICTOER/IPC144/pull/102#pullrequestreview-810501210) was a similar change with the first one, but it seems like it had more tables and I commented about the styling of the documentation. Because it had a lot of tables and list in the document, it supposed to have unified design for all of the content, while it has little more work left to do on those. First part of the documentation was having all of its content aligned left, while other contents are centred. And I looked for other documentation that has tables, and the styling seemed it does not match with other documentation. 

Since it was my first time doing the code reviews for the project that was not written by me, it was very interesting and got study the code and other conventions of the project by reading some documentation of the project. To do a proper code review, I should know what is the issue correctly, and what should be a good change.