teleren/devto huggingface dataset:
Eleventy — Using A Layout As A Partial (The Most Useful Things...)
Tags: eleventy
Published: 2020-09-17 09:31:15

---
title: Eleventy — Using A Layout As A Partial (The Most Useful Things...)
published: true
date: 2020-06-08 11:50:00 UTC
tags: [eleventy]
canonical_url: https://www.denizaksimsek.com/2020/11ty-layout-as-partial/
---

[data cascade]: https://www.11ty.dev/docs/data-cascade/
[Bantu Tu]: https://www.youtube.com/channel/UCjknfwYaYZvv94AjL10NO0Q
[missing-semester]: https://www.youtube.com/watch?v=a6Q8Na575qc
[also-getcollectionitem]: https://www.11ty.dev/docs/filters/collection-items/\#also-getcollectionitem
[template inheritance]: https://mozilla.github.io/nunjucks/templating.html#template-inheritance

 <ins>**Update 2021-02-08:** This article mentions things about my website that are no longer true. The technique explained, however, still works fine.</ins>

On this website, I have both a Notes page and pages for each individual note. I wanted to use the same template for both, but I ran into an issue: accessing frontmatter data.

In Eleventy, frontmatter data for the current page is merged into the [data cascade][] and made available on the template global scope, whereas collection items have a `data` property. This made it hard to write templates that work with both the `page` object and collection items.

## Solution

> [...] the most useful things are usually cloaked in an air of nonchalance, even in documentation.
>
> <cite>YouTube user [Bantu Tu][], commenting on [Missing Semester: Lecture 3: Editors (vim) (2020)][missing-semester]</cite>

The solution to my problem was right there in the Eleventy docs, staring at me, its description phrased such that it couldn't possibly be of use to anyone.


> ### Also `getCollectionItem`
>
> For completeness, a `getCollectionItem` filter is also included that fetches the current page from a collection.
>
> <cite>[Eleventy docs][also-getcollectionitem]</cite>

With this filter, all my problems were solved. I prepended the following to my `note.njk` template (similarly for `post.njk`):

```liquid
{%set item = note | d(collections.note | getCollectionItem(page))%}
```

When using `note.njk` as a partial, the caller assigns the variable `note`. When using it as a layout, no such variable will exist and the default (`d()`) will be used.. The beauty of this configuration is that in both situations, `item` will be a collection item with a `data` property.

One caveat is that because I'm using this as a partial, I can't use frontmatter, and therefore can't set a layout for my layout (maybe I could use template data files...). Instead, I use Nunjucks' builtin [template inheritance][].

```liquid
{%if not note%}
{%extends "base.njk"%}
{%endif%}
...
{%block content%}
{%set item = note | d(collections.note | getCollectionItem(page))%}
...
{%endblock%}
```
Hp Wireless Printer Setup
Tags: hpprinterconnectwifi, hpwirelessprintersetup, printwifidirect
Published: 2020-06-08 11:42:36

<a href="https://www.hpprinterconnect.com/hp-printer-connect-wifi/">Hp Printer Connect WiFi</a> becomes a straight forward task with hp software tools. Hp offers you the innovative quality of printers due to the task of hp wireless printer setup hassle-free. Maybe, your operating system not up to date or facing some network issues that become the task of <a href="https://www.hpprinterconnect.com/hp-printer-connect-wifi/">hp printer setup wifi</a> full of technical Hassles. Hp Printer Connect provides you some simple steps to help <a href="https://www.hpprinterconnect.com/hp-printer-connect-wifi/">print wifi direct</a> quickly.

You are going to unbox your hp printer first time. You got an instruction manual or hp printer driver CD. In case, your hp printer driver CD lost, or maybe it’s not working with your CD ROM. As a result, you can set up your printer without CD wireless with your network. First of all, keep the patient and follow the giving instruction and <a href="https://www.hpprinterconnect.com/hp-printer-connect-wifi/">hp wireless printer setup</a>.

Hence, before setup or install your hp printer successfully, you must confirm almost you have the following material and information for the hp printer setup wifi with a wireless network.

First, A Device running with the latest version of operating system firmware like( windows 7, windows 8, windows 10, MAC, Android Device.)
Second A Common wireless network, make sure your computer device connected with the same network in which you want to connect your printer. Your network router setup on 2.4 GH if it does not then change your network router setting and configuration on 2.4 GH.
Finally, an active internet connection and your wireless network password or key if it required in your network.

<a href="https://www.hpprinterconnect.com/hp-printer-connect-wifi/">Hp Printer Connect WiFi</a>
Top 10 Best EDB to PST Converter Software
Tags: software, edbrecovery, pstconverter
Published: 2020-06-08 11:30:05

In this blog we are discuss about best edb to pst converter software which is most popular in 2020. 

SysTools EDB to PST Converter Tool
Kernel EDB to PST converter tool
Stellarinfo EDB to PST converter tool
Aryson EDB to PST converter tool
Sysinfo EDB to PST converter
Edbmails EDB to PST converter.
KDE tools EDB to PST converter.
Datainfotools EDB to PST converter
Vomikas EDB to PST converter.

Read More - https://www.firevista.com/top-10-edb-to-pst-converter-software/
Passed the AWS Certified Developer Associate
Tags: aws, career, beginners
Published: 2020-06-08 11:25:23

Just passed the Developer Associate exam, studied for about 3 weeks.

This was my second Associate level exam after Solutions Architect.

**Resources:**

-   @andrewbrown's free course on [FreeCodeCamp YT](https://www.youtube.com/watch?v=RrKRN9zRBWs).

-   [Stephane Maarek's](https://twitter.com/StephaneMaarek) Developer Associate course on [Udemy](https://www.udemy.com/course/aws-certified-developer-associate-dva-c01/).

-   Jon Bonso's practice tests for [Developer Associate](https://www.udemy.com/course/aws-certified-developer-associate-practice-exams-amazon/).

**Important Topics:**

-   Dynamo DB

-   Elastic Beanstalk

-   API Gateway

-   Lambda

-   ECS

-   Elastic Cache

-   Cloud Formation

-   AWS SAM

-   Cognito

-   CI/CD (CodeCommit, CodeBuild, CodeDeploy, CodePipeline)

-   Encryption/Decryption (S3, KMS)

Overall I found the exam easier than solutions architect associate. Also would like to thank the [#AWSCertfied](https://www.freecodecamp.org/news/awscertified-challenge-free-path-aws-cloud-certifications/) challenge, it really help for the preparation and kept me motivated to get my 3rd AWS certification.

Feel free to check out my [notes.](https://rishabkumar7.github.io/CloudNotes/)
how to master competitive programming?
Tags: python, algorithms
Published: 2020-06-08 11:17:24

---
title: how to master competitive programming?
published: true
description: 
tags: #Python #Algorithm
---

Hi folks , i tried a couple of things to learn algorithm and data structure and then apply them into hackerRank or leetcode .etc .
But there is a problem i overhelmed from many exsting many resources and advices , first of all please help me to find good reaource to learn algorithm and data structure and finally help me how I can master at competitive programming challenges like HackerRank or leetcode ? How can I apply an algorithm to those challenges?
How To Download Instagram Video And Images
Published: 2020-06-08 10:58:27

Do note, this method only lets you download Instagram videos and photos from public accounts. Now, follow these steps:

1. Open Instagram on your smartphone or computer and choose a photo or video that you wish to download. 
2. Now tap the three-dots icon which is on the top-right of the post > tap Copy Link.
Next, open any browser on your phone or computer and open https://instagram-video-downloader.com/.
Once the website is loaded, paste the link you just copied from Instagram in the search bar and hit Download.
A Download image/ video button will now appear right below the Download button. Hit it to save the file on your phone or computer.
J’ai construit un outil pour analyser google play
Tags: android, showdev
Published: 2020-06-08 10:56:37

L’outil est disponible ici: [afternoon-castle-88983.herokuapp.com](afternoon-castle-88983.herokuapp.com)

J’aime Android et j’aime essayer de nouvelles applications. Au cours des dernières années, j’ai publié des centaines de critiques. On me demande souvent comment je les crée. J’utilise différents outils ASO pour collecter les données et un mélange d’Excel et de scripts Python (Jupyter) personnalisés pour les étendre et les analyser. Cela rend difficile pour la plupart des gens de recréer mes résultats. Lorsque les gens suggèrent que je regarde un mot clé ou un compte spécifique, je dois souvent refuser et indiquer aux guides comment le faire eux-mêmes ou leur demander de me payer pour faire l’examen.

La recherche d’applications aide les utilisateurs à analyser les commentaires Google Play les plus pertinents pour une application spécifique. Ouvrez simplement la page et tapez **com.instagram.android** et appuyez sur **commentaires utiles**. Sans avoir besoin d’utiliser des abonnements ASO payants ou de faire défiler des tonnes d’avis, vous obtenez les dernières plaintes ainsi que des commentaires majoritairement sur Google Play. Il permet de comprendre le degré d’attention de l’application en ce moment. Ainsi que pour comprendre un sentiment général. Ces paramètres ne sont pas en corrélation avec le nombre d’installations ou une note moyenne. Étant donné que même les applications les plus populaires ont constamment des problèmes et que les gens sont confrontés à des bugs sur leurs téléphones intelligents haut de gamme.

Pour trouver un nom d’application dans Google Play. Ouvrez une page correspondante. Jetez un œil à la barre d’adresse. Une valeur **id** de paramètre est celle dont vous avez besoin. Comme **com.ohmconception.trainsweateat**, etc.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/w0n37hr060dk2onch58i.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/y419cujry23phocsd7wr.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/79yl6u6kt29zjic3ujlw.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/monmxykgpsmckgzct06t.png)
Automated package management
Tags: apt, linux, bash, packages
Published: 2020-06-08 10:22:25

---
title: Automated package management
published: true
description: My experience in automating package management on Linux
tags: apt,linux,bash,packages
---

> My experience in automating package management on Linux

I installed Linux Lite recently on a laptop. I have been meaning to automated the installation and updating of dependencies, so I took the chance to use Ansible to do most of the APT installation and adding of Deb dependencies.

I found that while Ansible was easy enough to figure out generally, it adds friction to the process, especially since it abstract over things so you don't actually know what it is doing.

- https://github.com/MichaelCurrin/ansible-playbooks

So then I went with a simpler route. Bash scripts which can run repeatedly to configure, install and update packages on Linux.

- https://github.com/MichaelCurrin/os-genesis

Specifically, I'd recommend looking at the [install.sh](https://github.com/MichaelCurrin/os-genesis/blob/master/genesis/install.sh) script.

I hope my repos will be useful for others. 

If anyone has found or created something similar to share, please comment here.
Laravel Check If Relationship has Loaded or Not
Tags: laravel
Published: 2020-06-08 10:11:48

One of the nice things of Larave is eager loading. Now, sometimes if you need to check whether the model has loaded the eager loading or not, then you need to check with ``relationLoaded()``.

Here is my original code.

```php
$users = App\User::with('profile')->first();
```
Now, I want to check whether $user load the relationship profile or not.

```php
$users = App\User::with('profile')->first();

if ($users->relationLoaded('posts')) {
    // yes, it has been loaded
    // now, place your logic here
}
```
🚀 An Introduction to Vue | Free online workshop
Tags: vue, beginners, webdev, tutorial
Published: 2020-06-08 10:10:51

---
title: 🚀 An Introduction to Vue | Free online workshop 
published: true
description: An introduction to Vue 
tags: vue, beginner, webdev, tutorial
cover_image: https://imgur.com/ixUDOQN.png
---

### Online workshop via my MeetUp by the awesome [Chris Dixon](https://twitter.com/chrisdixon161). 

[Replay here](https://youtu.be/DxWaajau2jw)

For more workshops visit the MeetUp [here](https://www.meetup.com/codu-community).

[Chris Dixon](https://twitter.com/chrisdixon161) has been creating online courses for over 5 years and is one of the best out there when it comes to teaching. He is just finishing up his brand new course platform (in Vue.js) and has been kind enough to give us an introduction to Vue.js!

[Chris](https://twitter.com/chrisdixon161) has been mentoring me and helping me up my game with getting all of the content online so I really respect Chris and if you haven't come across his stuff you will love this event! Thanks, Chris 💜

If you haven't seen his courses you can find them all here:
🔗 https://chrisdixon.io/courses

Or some free content on his YouTube:
🔗 https://www.youtube.com/channel/UC3uVPUIjPBeGW3UDSeadJ3Q

Twitter:
🔗 https://twitter.com/chrisdixon161

Website:
🔗 https://chrisdixon.io


Link to the event https://youtu.be/VkgfOXmmdnw

Hopefully will be useful to all levels, beginners are welcome 💜


Prerequisites:

- A laptop with a web dev environment

- A cheerful and inquisitive attitude

---

[Follow me on Twitter](https://twitter.com/nialljoemaher)

Subscribe on [Codú Community](https://www.youtube.com/c/Cod%C3%BACommunity)
How do you stay inspired, motivated, and productive while living in a super active home?
Tags: motivation, developer, discuss, beginners
Published: 2020-06-08 10:09:31

---
title: How do you stay inspired, motivated, and productive while living in a super active home?
published: true
description: Curated answers to a question from the Code Connector community Slack channel.
tags: #motivation #developer #discuss #beginners
//cover_image: 
---
1. Realize some days will be more than others so try to adjust your estimations. Designate routine & area as much as possible. Shifting your hours to when no one is awake helps.

2. Anything you can do to train your brain to know 'this is work time' will be beneficial. Specifically regarding the current work from home scenario, keep your routine as close to the 'in office' version of work will be helpful.

3. It is a 100% must that at certain times you can't be interrupted. Cooperation from the family is required.

4. A busy home means that I don't have ultimate control. Writing code has taken the place of writing poetry for me. There is beauty that can exist in both the form and the content.

5. My home is a cyclone of destruction and non-stop emotional outbursts. I stay inspired by building things that catches my family attention and motivated by knowing that a better tech job will support my family.

6. My house is super active. I have very big goals that I am very attracted to reaching. My goals excite me so it doesn't feel hard to want to work for it.

Code Connector Contributors: Christine Donnelly, Corey McCarty, Danny Thompson, Lawrence Lockhart

[Code Connector](https://codeconnector.io/) is a non-profit that's organized tech meetups to help people start their journey into tech. You can join our daily conversations by joining the [Code Connector slack channel](https://bit.ly/2Ywnzqc).
Pirrigator, part 8: Year 2
Tags: rust, raspberrypi, sideprojects
Published: 2020-06-08 10:09:10

---
title: Pirrigator, part 8: Year 2
published: true
description: Automating my greenhouse irrigation with Rust and Raspberry Pi
tags: #rust #raspberrypi #sideprojects
series: Watering tomatoes with a Raspberry Pi
---

Last year's series fizzled out a little without a strong conclusion, I apologise for that. The good news is the Pirrigator is back in action this year and is so far working better than ever.

![Pirrigator 2020 on Raspberry Pi Zero](https://dev-to-uploads.s3.amazonaws.com/i/9h33kemyhl6ev0444dh1.jpg)

I've replaced the Raspberry Pi model B with a [Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) which is neater and has slightly lower power requirements. I also sorted out my solar power supply and replaced the 15-year old car battery which it turned out was long past its best, and it's now been running continuously since April with smaller 7Ah battery.

I added a transistor to control the power to the moisture sensors to eliminate the corrosion issue. This is controlled by an additional GPIO pin; the code pulls the pin high, waits 20ms to avoid any weird startup issues, reads the moisture then drops the power again. After that change the probes remained intact for the rest of the summer. I replaced them this year as they weren't all working reliably, but I suspect that was more a consequence of storing the hardware in the shed all winter.

I've updated all the library dependencies without many issues, although [Seed](https://seed-rs.org/) had some major changes since I first used it, for the better. I did have to re-read all the code to get back into it, as I'd forgotten a lot. I'm glad to say I found it easy to pick up again, hopefully a combination of good code quality and Rust forcing you to be very explicit everywhere.

![Messy tomato plants](https://dev-to-uploads.s3.amazonaws.com/i/5bdtdj4664q4oluxwqig.jpg)

One consequence of all the fiddling last year was I neglected the actual tomato plants a bit, and they ended up a bit messy looking. This year I got all the hardware reinstalled and working reliably in early April, when the plants were still seeds germinating in the house, and it has operated autonomously and reliably since then with a nice consistent level of moisture in the soil. Hoping this continues, we've gone for nine tomato, three cucumber and three courgette plants this year - hopefully I'll have time to maintain them better and get a bumper crop later in the summer!

![Greenhouse with lots of plants](https://dev-to-uploads.s3.amazonaws.com/i/2gjq1xbx81blfvh6yse9.jpg)

I'll be talking about this project in a [Rust Edinburgh virtual meetup](https://www.meetup.com/rust-edi/events/271129693/) on 25 June. Everyone welcome!
🌍FreeCodeCamp Calculator (Front end projects) [YouTube LIVE]
Tags: freecodecamp, javascript, calculator, tutorial
Published: 2020-06-08 09:40:16

⬇️ In this video we will create a javascript calculator. You can find the rules and the requirements on [FreeCodeCamp](https://www.freecodecamp.org/learn/front-end-libraries/front-end-libraries-projects/build-a-javascript-calculator). it's going to be a fully functional yet simple calculator!


###Useful links
- Codepen: https://codepen.io/EleftheriaBatsou
- Working project: https://codepen.io/EleftheriaBatsou/pen/ZEbgXyB
- You'll need to add: bootstrap (I used bootstrap v3)
- On youtube: https://youtu.be/8divWTgRJm8
- The Colors I used: 
 purple : #B2127D,
 blue : #14C6CC,      
 yellow: #FFDF27,
 dark blue: #1BADB2, 
 almost white: #FFF0F5.

###If you guys recreate this project send me a link to check it. 

Video starts at: 0:15

************************************

👋Hello, I' m Eleftheria, an app developer, master student, public speaker, and chocolate lover.

🍩Would you care about buying me a coffee? You can do it here: [paypal.me/eleftheriabatsou](paypal.me/eleftheriabatsou) but If you can't that's ok too!

**************************************

🙏It would be nice to subscribe to my [Youtube](https://www.youtube.com/c/EleftheriaBatsou) channel. It’s free and it helps to create more content.

🌈[Youtube](https://www.youtube.com/c/EleftheriaBatsou) | [Codepen](https://codepen.io/EleftheriaBatsou) | [GitHub](https://github.com/EleftheriaBatsou) | [Twitter](https://twitter.com/BatsouElef) | [Site](http://eleftheriabatsou.com/) | [Instagram](https://www.instagram.com/elefintech)
What is the purpose of UAT?
Tags: uat, useracceptancetesting
Published: 2020-06-08 09:16:29

User Acceptance Testing (UAT), otherwise called beta or end-client testing, is characterized as testing the product by the client or customer to decide if it tends to be acknowledged or not. This is the last testing performed once the utilitarian, framework and regression testing are finished. 

The fundamental motivation behind this testing is to approve the product against the business necessities. This approval is completed by the end-clients who know about the business prerequisites.

Designers and functional analyzers are specialized individuals who approve the product against practical determinations. Uat testing decipher the necessities as per their insight and create/test the product (here is the significance of area information). 

This product is finished by the useful details however there are some business necessities and procedures that are known uniquely to the end-clients are either missed to convey or confused. 

This testing assumes a significant job in approving if all the business prerequisites are satisfied or not before discharging the product for advertising use. The utilization of live information and genuine use cases make this testing a significant piece of the discharge cycle. 

Numerous organizations that endured huge misfortunes because of post-discharge issues know the significance of a fruitful User Acceptance Test. The expense of fixing the imperfections after discharge is ordinarily more prominent than fixing it previously.
How to Add `v-model` Support to Custom Vue.js Component
Tags: vue, javascript, tutorial, learning
Published: 2020-06-08 09:16:19

`v-model` is one of the few directives that comes with Vue.js. The thing that makes it great is the fact that it allows for two-way data binding between our data and views.

With two-way data binding, when we update data via input fields or whatever, we can modify the DOM without having to do DOM work.

**What you will learn in this video:**
* How v-model works internally
* How to add v-model to custom components
* Customizing v-model prop and event

{% youtube S7PFVKZFmHk %}

> [Add "v-model" directive on custom input Component](https://www.youtube.com/watch?v=S7PFVKZFmHk "Add "v-model" directive on custom input Component")
> 
> [Learn Vue.js 2](https://www.youtube.com/playlist?list=PL1TrjkMQ8UbVu4dvX2gtyZQ0FxAsA48jB "Learn Vue.js 2") 
>
Super Simple execution tracking for Javascript and Node.js
Tags: todayilearned, javascript, node
Published: 2020-06-08 09:02:40

Sometimes you need to measure time execution of a script or part of it, simple answer could be call the ***Date()*** function many times and compute elapsed time.

Recently I found out a better method that works for javascript and Node.js too, the ***console.time***.

This function comes from Web API and have a great support:

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

Using it is very simple:

```javascript
//start timer with name "My Timer Name"
console.time("My Timer Name");

alert("Click to continue");
//log time without sotp the timer
console.timeLog("My Timer Name");
//My Timer Name: 1898.589111328125ms

alert("Click to continue again...");
//log time and stop timer
console.timeEnd("My Timer Name");
//My Timer Name: 2641.26123046875ms
```

For more information you can read official docs on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Console/time)



Cover Image: [Ansgar Koreng](https://commons.wikimedia.org/wiki/File:Stopwatch,_1810201155,_ako.jpg)