teleren/devto huggingface dataset:
FTP connection and Wifi network profile
Tags: ftp, wifi, errors, solution
Published: 2020-08-20 00:01:49

Some FTP error messages: 
"Server sent passive reply with unroutable address 999.888.777.666"
"421 Failed to create data connection socket."

Other symptoms: success ftp authentication but failed folder content downloading.

I spent hours solving the problem.

One possible solution on Windows 10:
Check your Wifi connection type! Public or private?
Open Windows 10 settings --> Network and Internet -> Wifi -> Click on active Wifi connection
If the wifi network profile is public check out the private.
AND DONE!!!

I hope I save a few hours for someone else.
Exodus and so on
Tags: tooling, resources, 11ty, netlify
Published: 2020-08-21 10:32:10

---
title: Exodus and so on
published: true
date: 2020-08-20 00:00:00 UTC
tags: [ 'tooling', 'resources', '11ty', 'netlify' ]
canonical_url: https://victorcamnerin.com/articles/exodus-and-so-on/
---

My personal site is hosted on [Netlify](https://netlify.com), built using [11ty](https://www.11ty.dev/) and version controlled using [GitHub](https://github.com/).

For more info on 11ty check out Andy Bells excellent course [Learn Eleventy from Scratch](https://piccalil.li/course/learn-eleventy-from-scratch/). It's more than just a course on 11ty. It's also an excellent resource on best practices for accessibility and front end development.

## What's next

The site is not done, by any standards. But to move forward you have to take the first step. This very much applies to personal side projects. They tend to just end up laying around, not being looked at again. So to create some positive tension and personal commitment I have now published this!

Something I see coming in the future is a theme picker. Basically to enable light and dark mode, nothing fancier than that. I love what Max Böck has done for his [personal site](https://mxb.dev) though. It's a fully-fledged theme picker! Very cool! Do check it out. Not only the theme picker. The whole thing is beautiful while presenting a lot of good content.

No JS is being loaded at all for this site right now. Something I like a lot. However, I do enjoy smooth UI element integrations which would be an ideal situation for something like Vue or Svelte. So that might happen?!

Finally, not because I have a big crowd reading these posts or anything. But I like the whole idea behind Webmentions. Haven't you heard of it before I would encourage you to check it out? Here's a great post about it on [indieweb.org](https://indieweb.org): [https://indieweb.org/Webmention](https://indieweb.org/Webmention).

That's it for now!
How to use the attr() CSS method?
Tags: css
Published: 2020-08-20 00:00:00

---
  title: How to use the attr() CSS method?
  published: true
  tags: CSS
  date: Thu Aug 20 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/attr()-css-method
  cover_image: https://melvingeorge.me/_next/static/images/main-2cf6450afe831d3fbc8544e9b5d1d6c2.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/attr()-css-method)
  
## WARNING 🤯: This is a new method and may not work in some browsers as of now.

To get attribute values from HTML elements to css, you can use the `attr()` CSS function.

Consider this html, where you have a `h1` tag with class name `heading`.

```html
<h1 class="heading">Hello World!</h1>
```

Now Let's style this `h1` tag with some CSS.

```css
.heading {
  background-color: black;
  color: red;
}
```

Now you may ask what's cool about this? This is just normal stuff. 🧐

What if we need to give custom background colors and text colors whenever we make another `h1` tag?

This is not possible because we have already hard coded the styles in CSS.

But not anymore!! That is why we have `attr()` CSS function.

_The `attr()` function helps us to get values from attributes of HTML elements._

Now let's rewrite our html and add custom properties called `data-bgcolor` and `data-textcolor` in the `h1` tag.

```html
<h1 class="heading" data-bgcolor="black" data-textcolor="red">Hello World!</h1>
```

Now lets use the `attr()` function in CSS to the values of the custom attributes in CSS.

```css
.heading {
  background-color: attr(data-bgcolor color);
  color: attr(data-textcolor color);
}
```

- Here we are getting the values of both the `data-bgcolor` and `data-textcolor` custom attributes from the `h1` tag to the CSS.

- The `attr()` function accepts the name of the custom attribute or native attribute name followed by a space and the unit for example,
  - for strings - `string`
  - for any kind of colors - `color`
  - for numbers - `number`

In our case, we have given the unit as `color` since we want to change the `background-color` property and `color` property.

### Feel free to share if you found this useful 😃.

---
I Built a Weather Extension
Tags: showdev, laravel, vue
Published: 2020-08-19 22:53:33

Hi,
I wanted to share a project I have been working on for the past 5 years. It is a browser extension for Chrome, Firefox, Edge, and Opera called [Weather Extension](https://weatherextension.com/). I just released v5 and it has had lots of positive feedback. The first version was pretty basic. It showed the hourly and daily forecast. Over time I’ve added the ability to add multiple locations, weather alerts, translated the extension to 32 languages, support for multiple different metrics, interactive radar, inspirational quotes, and more!

The v5 release is built using VueJS and Vuetify with a Laravel backend. It's neat what you can build over time just working at night a couple of hours a week. 

[Try Weather Extension](https://weatherextension.com/)

###Here are some screenshots
![Weather Extension](https://dev-to-uploads.s3.amazonaws.com/i/nz1ig65m19fmapihdqgd.jpeg)
![Weather Extension](https://dev-to-uploads.s3.amazonaws.com/i/99idp8r2bqh90mf0p5ax.jpeg)
![Weather Extension](https://dev-to-uploads.s3.amazonaws.com/i/jrbqluhz4j6ktagnrill.jpeg)
AWS EC2 - Limit an Instance's Access to its Own Tags
Published: 2022-10-19 18:12:32

---
title: AWS EC2 - Limit an Instance's Access to its Own Tags
published: true
date: 2020-08-20 00:00:00 UTC
tags: 
canonical_url: https://garettmd.com/blog/ec2-access-to-instance-tags/
---

Here’s a dynamic way to allow an EC2 instance to modify its own tags, but no other instance’s. Enjoy.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["ec2:CreateTags", "ec2:DescribeTags"],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ARN": "${ec2:SourceInstanceARN}"
        }
      }
    }
  ]
}
```
How to Make Keyboard Shortcuts in SwiftUI
Tags: swift, ios
Published: 2020-08-19 23:56:37

---
title: How to Make Keyboard Shortcuts in SwiftUI
published: true
description: 
tags: #swift #ios
//cover_image: https://direct_url_to_image.jpg
---
<!-- wp:paragraph -->
<p>As of WWDC 2020, SwiftUI has made it insanely easy to add <a href="https://developer.apple.com/documentation/swiftui/keyboardshortcut">keyboard shortcuts</a> to any SwiftUI app. Let's look at how we can add keyboard shortcuts to our project by looking at the code example below.</p>
<!-- /wp:paragraph -->

<!-- wp:syntaxhighlighter/code -->
<pre class="wp-block-syntaxhighlighter-code">struct ContentView: View {
    var body: some View {
        
        Button(action: {
            print("Button Tapped!!")
        }) {
            Text("Button")
        }.keyboardShortcut("T")
        
    }
}</pre>
<!-- /wp:syntaxhighlighter/code -->

<!-- wp:paragraph -->
<p>As you can see in the example above all we needed to do was add the <strong>.keyboardShortcut()</strong> modifier to our button and assign it a key. Now by holding the command button on our external keyboard and pressing "T", our action for our button will be triggered. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We can customize our shortcut by modifying which buttons need to be pressed.</p>
<!-- /wp:paragraph -->

<!-- wp:syntaxhighlighter/code -->
<pre class="wp-block-syntaxhighlighter-code">.keyboardShortcut("T", modifiers: .control)</pre>
<!-- /wp:syntaxhighlighter/code -->

<!-- wp:paragraph -->
<p>In the example above if we want to trigger our new modified shortcut we need to press the control button and the "T" button. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We can also use different combinations of modifier keys in an array.</p>
<!-- /wp:paragraph -->

<!-- wp:syntaxhighlighter/code -->
<pre class="wp-block-syntaxhighlighter-code">.keyboardShortcut("T", modifiers: [.command, .control])</pre>
<!-- /wp:syntaxhighlighter/code -->

<!-- wp:paragraph -->
<p>Like in the example before we need to hold the control and "T" key but now we also need to hold the command key to get our shortcut to work. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We can also use other keyboard keys like directional keys, spacebar, and many <a href="https://developer.apple.com/documentation/swiftui/keyequivalent">more</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:syntaxhighlighter/code -->
<pre class="wp-block-syntaxhighlighter-code">.keyboardShortcut("T", modifiers: [.command, .shift, .space])</pre>
<!-- /wp:syntaxhighlighter/code -->

<!-- wp:paragraph -->
<p>Also be mindful that system keyboard shortcuts like cut, copy, and paste take priority over app shortcuts. Keep this in mind when assigning your keyboard shortcuts.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I hope this helps you to expand keyboard shortcuts to your SwiftUI app!</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>⌨️ 🩳 💇‍♂️ Happy Coding  ⌨️ 🩳 💇‍♂️</p>
<!-- /wp:paragraph -->
Made this Profile Page UI with Sketchware
Published: 2020-08-19 23:24:42

A couple days ago my computer was not turning on. And because of this covid thing I wasn't able to repair that.
<br>
So, to pass my time, I downloaded Sketchware app from the playstore.
<br>
One thing I've learned from using Sketchware is that, we can add custom java code directly to our projects.
<br>
This is really awesome.
<br>
So, playing with this app for some day I thought to make a profile page UI for one of my projects.
<br>
And as we can also export the source code from Sketchware, I can easily transfer my code to the android studio anytime.
<br>
I also uploaded it on github in case you want to use this in your projects.
<br>
Source code: https://github.com/souvik-tests/profile-ui
Need help testing Electron App on macOS and Ubuntu
Tags: help, electron
Published: 2020-08-19 22:40:09

Hello folks,

I've been working on [https://github.com/saisandeepvaddi/ten-hands](https://github.com/saisandeepvaddi/ten-hands), a free, open-source electron app for more than a year now. It helps developers, admins run command-line tasks (Example: package.json scripts. But any task.) with a GUI.

Although I test code and app life cycle on my Windows before releases, I don't have access to a macOS (tried all hacks with VirtualBox 👀). Ubuntu is also not installing recently in VirtualBox (after Windows update of course!). So I run Azure pipelines before release which gives me mac and ubuntu installers and pray Electron takes care of it.

I'd appreciate a quick install and test on a macOS or Ubuntu and let me know if it is working fine.

The project is written in React, TypeScript, NodeJS. It'd be a great start to contribute to a open-source as well.

Also, please let me know of any tips for cross-platform testing of Electron apps.

The latest releases are available in Azure Pipelines or releases section (a little older) in the repository.

## Links:

Github: https://github.com/saisandeepvaddi/ten-hands
Website: https://tenhands.app

Thank you, Have a great day :)
The State of Deno
Tags: javascript, deno, node, typescript
Published: 2020-08-19 22:38:13

> _This is only my opinoin. I am not saying it will happen._

## Deno
Deno is a JavaScript runtime environment built using the Rust language and it runs the V8 engine used by Chrome. Deno was created by Ryan Dahl, the Creator of Node.js to solve the [problems](https://www.youtube.com/watch?v=M3BM9TB-8yA) in Node. Version 1.0.0 was released earlier this year and the JavaScript Community was excited about it. It was featured in many blog posts and the community support increased exponentially, as expected for any new technology, but compliment has gone down for a bit.

## What will happen to Deno.
Nodejs isn't going  anywhere, Deno isn't either. Nodejs took 10 years to get where it is now and I think Deno will take less time. No major project is built with Deno, yet, but it will definitetly take over Node. _It won't kill Node. Take over_. Companies using Node know of the problems in Node and know most of them can be solved using Deno, but it isn't worth the full migration. Deno will start taking over when people doing full rewrite of thier applications decide that since it a full rewrite, why don't I write it in Deno instead of Node and with that, Deno will gradually come up.

## Should I Learn Node.js then?
Well,as I said earlier, Node.js isn't going anywhere. Not everyone will migrate from Node.js, not everyone migrated from Rails. It is just that the community will be shifted more towards Deno and TypeScript. But Node won't go anywhere. If you are a beginner, I suggest you learn Nodejs first, It is pretty much stable and it's problems won't affect you that much. Also, learning Deno will be much easier if you already know Node.
cool-kubernetes 🇬🇧
Tags: learning, kubernetes, docker, opensource
Published: 2020-09-28 15:01:30

---
title: cool-kubernetes 🇬🇧
published: true
date: 2020-08-19 22:37:00 UTC
tags: learning,kubernetes,docker,opensource
canonical_url: https://mrturkmen.com/cool-kubernetes/
---

# Cool Kubernetes 🤓

It is a place which contains valuable resources about Kubernetes. It is somehow similar to awesome lists projects on Github, the logic is same however approach is different, instead of creating pure readme.md file like [here](https://github.com/irazasyed/awesome-cloudflare#readme), I am generating and publishing all stuff using Github Pages. Another important difference is that, this project does not only contain links to outsource, it also contains valuable information regarding to Kubernetes which is collected from variety of sources. For instance, let’s say someone is registered to Kubernetes or Kubernetes related course and realized that some figures, graphs or piece of information is valuable then that information could be added this resource hub. Many of you might say that “Well, you are duplicating existing information out there”, it is correct however, having most of valuable information from a place, which you know already, will save a lot of time for anyone who need some help.

For time being, the site does not contain lots of resources, however in time, it will contain troubleshooting techniques and approaches on Kubernetes.

The project is completely open source as any other awesome lists projects on Github, it means that the project is open to contribution as well, if you would like to add/improve/issue something on this resource hub. That’s perfect, do changes and create pull request or drop an issue 😉

I do not know whether it will be persistent or not, however I will try to update it occasionally.

It is completely open source project which is residing on [cool-kubernetes](https://mrturkmen.com/kubernetes) website, any contribution is valuable.

Cheers !
Day 199: Power
Tags: hiphop, code, coding, lifelongdev
Published: 2020-08-19 22:27:23

_liner notes_:
- Professional : Pretty productive day. Finished editing the promo video I shot and submitted it. Added some screen recordings and graphics. I think it came out pretty good. Also knocked out like 3 tickets.

- Personal : So last night, I noticed the freezer section of my cooler was taking a lot of power. I only had a box of Italian ice in there. To save power, I basically ate all of them so that I could turn off that section. It hasn't turn on as much since then. The battery got to about 40% and that's lower than I would like. For the day, I drove out to a park and set up my solar panels. I had to turn on my car to help with the charging because it was pretty cloudy today. By the end of my day, I got the battery up to about 60%. Not bad. Went to pack up my solar panel and noticed that it had ants crawling all over it. Got most of them off. Didn't notice too many when I brought it into the van. I'll keep an eye on it. Headed back from the park, I think I may have found another spot to park. I'll check that out later this week.

![Clouds above Ho Chi Minh City, Vietnam](https://dev-to-uploads.s3.amazonaws.com/i/ljzo43b3ysuix95ywqye.png)

Got some really good sleep in the van last night. It gets really dark in the van. Also, just had my first shower in the van. It was a quick one. I think I'll be taking multiple quick showers during the day Didn't really use a lot of water either so that was cool. Going to work some more on my side project. Now that I got the canvas working, I'm going to work on another section that changes depending on the scene. I really want to get it done soon.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube X3cjN5LnV2s %}
PyCharm
Tags: snippet, learninginpublic
Published: 2020-08-19 22:24:03

I made a plot in Python. That is as elite as knowing calculus, imo. Now I know both. Watch out, world, I have the power of artificial intelligence. At least neural networks.

Get the book Hands-on Machine Learning by Aurèlien Gèron and enjoy. It's like a Calculus text but fun.
Day(08)100 Days of Code
Tags: 100daysofcode, react, developers
Published: 2020-08-19 22:21:45

---
title: Day(08)100 Days of Code
published: true
description: 100daysofcode
tags: 100DaysofCode , ReactJs , Developers
//cover_image: https://direct_url_to_image.jpg
---

**React JS**
#Components 
Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and returns HTML via a render function.

Today I learn why we used components in react js.
Basically Components are used to repeat the same type of code in an easy way.
we just need to add components and we can use any number of times the same code.

Actually I am busy with my desktop application project therefore I spend less time for it to learn.

Hope you know all about it. if you have more information about components, then please write in the comment section.
Hiding your API keys and .gitignore
Published: 2020-08-19 22:15:13

When working with APIs it is important to keep your keys to yourself when sharing your project. Since your key is attached to your account, having someone steal your identity could cost you a ton of money or get you locked out from that service. So to prevent this we have to be careful when uploading our projects to a public site such as "GitHub". To do this I will be going over hidden folders and adding them to your .gitignore file so those folders are not uploaded.

##Creating Hidden Folders to Place your Keys in:

`mkdir .secret`

By placing a period in front of the name of your folder, it will create a hidden folder. Meaning that it won't appear when generally browsing your computer. Though this folder is hidden you can still check that it is there through your terminal with the `ls -a` command. From here you can just change directory to this folder `cd .secret` and add files inside of it that you want hidden such as your api keys. Personally I like to place my API Keys in a "json" dictionary and use "Visual Studio Code" to edit them but any text editor of preference should work.

##Example adding keys

`code api_keys.json`

`{"api_key": "input api key","secret_key": "input secret key}`

##Making sure your Hidden Folders are not uploaded to "GitHub"

Our APIs are now hidden on our computer but we still need to make sure our hidden folders are not uploaded along with our project. To do this we need to add the names of the folders we don't want uploaded to a `.gitignore` file. When you are creating a repo with "GitHub" they will ask you if you want to add a `.gitignore` file and you always want one. Though if you did not select this option do not worry, you can just create a file named `.gitignore` anywhere in you repository and "GitHub" will recognize it.

So once we have located our `.gitignore` file we will need to open it with the text editor of your preference.

`code .gitignore` 

Then add in on a new line any folders or files you do not want uploaded to "GitHub". Like such:

```
#Secret Folder
.secret/
# DS_Store
*/.DS_Store
```
Or even use a wildcard which represents one or more characters to hide all hidden folders:

```
#All Hidden Folders
.*/
```

I hope this helps those of you starting out with "GitHub" or learning about APIs. Using hidden folders and `.gitignore` to protect your data could save you a lot of money and your security.
Customizable Email sender address with Devise
Tags: rails, devise, email
Published: 2020-08-19 21:17:43

---
title: Customizable Email sender address with Devise
published: true
description: dynamic email-sender in devise and rails
tags: rails, devise, email
//cover_image: https://direct_url_to_image.jpg
---

When installing the devise gem in your Rails application, you will find the following:

```ruby
Devise.setup do |config|
  # ...
  config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
  # ...
end
```

You can set static email, for example:

```ruby
Devise.setup do |config|
  # ...
  config.mailer_sender = 'Acme Team <team@acme.com>'
  # ...
end
```

But if you need to allow your back-office team member periodically to customize this parameter, how would you do this?

I recommend using [rails-settings](https://github.com/huacnlee/rails-settings-cached) gem.

```ruby
class Setting < RailsSettings::Base
  field :email_from, type: :string, default: 'Acme Team <team@acme.com>'
end
```

Now, if you try adding this `Setting.email_from` to `devise.rb` initializer, you will get an error: `You cannot use settings before Rails initialize. (RuntimeError)`.

To solve this problem, do the following:

```ruby
Devise.setup do |config|
  # ...
  config.mailer_sender = ->(_devise_mapping) { SiteConfig.email_from }
  # ...
end
```

Happy Hacking!
Django.... should I be switching around paths? 
Tags: django, python, html, webdev
Published: 2020-08-19 21:14:04

I’m watching a tutorial by Dennis Ivy, and he switches around paths into their own file. Is that ok? 
It kinda messed me up. 

I created a file for a app, but idk if I’m doing it right with using it. 

Should I have multiple url.py files? 

What is a structure for having an a example of 2 apps made?
Helping someone code.
Tags: beginners, computerscience, experts
Published: 2020-08-19 21:08:42

I still remember the first time I was asked to help someone out with their code. 

It was in University on the second floor of the library 20 minutes before we had to present our projects... 

What a fun time that was.

It felt great, I was helping someone else whilst reinforcing what I had already learnt. 
We sometimes underestimate the value of helping others learn something new because we feel like we might not get anything out of it. Boy, are we wrong...

Comment your first time helping someone code or perhaps an interesting story of when you had to help someone out with a code related problem. 
Perhaps share what the problem was and how you solved it.

```
Stay safe, stay healthy;
```