teleren/devto huggingface dataset:
What was Your Book That Shape You
Tags: career, discuss, beginners, books
Published: 2020-01-07 02:28:53

While I'm awaiting in anticipation for my [The Pragmatic Programmer: your journey to mastery, 20th Anniversary Edition](The Pragmatic Programmer: your journey to mastery, 20th Anniversary Edition https://www.amazon.sg/dp/0135957052/ref=cm_sw_r_cp_apa_i_oH-eEbY3T97G2) book to arrive through mail. 

I'm wondering what is the book that had made a huge impact on your life? For me it was by far [4 Hour Work Week](The 4-Hour Workweek: Escape 9-5, Live Anywhere, and Join the New Rich https://www.amazon.sg/dp/0307465357/ref=cm_sw_r_cp_apa_i_oL-eEbSTCYYQB) that had played a huge role in my life.


Which had shaped me in becoming a voracious reader of books. It had even allowed me to embark on the path of entrepreneurship & startups after more than a decade in reading it. 

So what was the "book" that had made a huge impact on your life?
Happy (Dev) New Years! (Belatedly)
Tags: beginners, codenewbie, productivity
Published: 2020-01-07 02:07:26

I admit, I suck at writing New Years' type stuff and actually putting it out on New Years day. To be honest this is the second or third (or fourth) attempt. It's not that I didn't have anything to say, or I didn't like what I wrote, it's just that so much of it was un-dev related. 

Most people make New Years' Resolutions (all caps) as they attempt to fix in their mind the changes they will make this year. BIGGER! HUGGGEE! As if some how all of that will make them stick with it. I applaud any attempt at self betterment. It's the only thing most of us can really effect. Typically though, they fail. Usually it's not because they didn't mean it, or didnt want it enough. 

No, usually it's because they didn't take the tiny, small steps towards it, every single day. 

When I decided to do the 100daysofcode challenge, even before then, I had decided to code. Every day. In the back of my mind there's always things whispering like 

getadevjobmakemoremoneybehomemoreyahhhh.....

But those are not the thing that keeps me going. I decided this year I'm going to work on implementing more Systems instead of goals.

 I may make some benchmarks for what I want to accomplish, but instead of focusing on these really large goals, I'm going to focus on the tiny step, one tiny step, done every single day. My system is going to be doing things day in and out, knowing that I'll improve. 

There's a really great book by James Clear, called Atomic Habits, in which the author discusses this exact thing. There is also The Slight Edge, by Jeff Olson, for more bathroom reading. 

When I first started to learn programming, I bought courses, and bought into "the only course you'll ever need!"(someone better hurry and trademark that!) I also put a huge amount of pressure on myself my setting unrealistic goals and the intense need to hurry up and learn so I could switch careers. Not a smart move.

This time I'm focusing on just learning, understanding, and practicing. Getting better will happen. Getting good enough to switch careers will happen. The stress to "hurry up and learn" won't.
Fixing Pycharm remote Interpreter with Vagrant and macOS Catalina
Tags: vagrant, pycharm, macos, catalina
Published: 2020-01-07 01:51:50

## Fookin Apple 

Mac os Catalia was released on October 2019 (last decade!) and it introduced a bunch of security fixes. 

Full disk access was introduced as a permission that you need to allow tools to access folders in your /Users directory. 

This broke a lot of things, just google "full disk access" and you see pages on top of pages of articles all explaining how to add something to the Full Disk Access. 

## Our issue 

In our case, vagrant NFS mounts stopped working. And we can't run our Vagrant without those mounts. 

We've added a temp. fix, and Vagrant 2.6 actually released a fix of their own, which adds the exported paths in the longer form, which doesn't need full disk access to work, 
Old form : /Users/username/folder
Longer form: /System/Volumes/Data/Users/username/folder

So now that that's fixed, our vagrant is happy and boots fine and everything is ok. 

(There's another fix, adding `/sbin/nfsd` to Full Disk Access permissions which kinda works as well)

## PyCharm issues

We then had a different issue, where in devs who updated to Catalina, ran their pyCharm and set up a remote interpreter, suddenly couldn't run their debug configurations through pyCharm anymore. 

It showed the following error: 

```
ssh://vagrant@127.0.0.1:2222/folder/bin/python -u /Users/usernname/folder/utils/run_something.py
zsh:cd:1: no such file or directory: /Users/username/folder/utils
/folder/remove_venv/bin/python: can't open file 'Users/usernname/folder/utils/run_something.py': [Errno 2] No such file or directory
```

Basically PyCharm was complaining that it can't create a path mapping between a mac folder to a mounted vagrant NFS folder. 

This is due to this magical thing that pyCharm does when you create a python remote interpreter (I assume the same is true for other languages and Jetbrain IDEs as well)
It reads your vagrant file, and tries to extract the paths you are about to mount inside your vagrant. 

The problem though, is pyCharm doesn't know about this Catalina long form /Systems/Volume... path, and the fact that Vagrant kinda hacks it together, so the path mappings don't work

# Solution
Until jetBrains learn to deal with this problem (track the issue [here](https://youtrack.jetbrains.com/issue/WI-49183), vote on it, make some noise if you have this) 
We are forces with this solution: 

Add a path mapping in your debug configuration to the mounted NFS folder inside vagrant manually. 

### Make it a little bit better
If you are used to have a lot of debug configurations, let's say you create one for each unit test you have, you can edit the template for the debug configuration and add the path mapping there, it will then exist for all new configurations created from that template. 

Just expand the template cogwheel and edit the template of the config
How to Host a Static Website in Azure Storage
Tags: azure, azurestorage, staticwebsite
Published: 2020-01-07 01:35:59

In this [tutorial](https://github.com/patricksameerajayalath/AzureTutorials/blob/master/How%20to%20host%20a%20Static%20website%20in%20Azure%20Storage.pdf) I’m going to show how to:

•	Create a Storage Account
•	Configure Storage Account
•	Upload files to the Container

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/4ehmxuqlwgirkye0xi7x.jpg)

You can find the PDF version of this tutorial [here](https://github.com/patricksameerajayalath/AzureTutorials/blob/master/How%20to%20host%20a%20Static%20website%20in%20Azure%20Storage.pdf).

You can find all my Azure/.Net tutorials [here](https://dev.to/patricksameerajayalath) and [here](http://sameerajayalath.blogspot.com/).

Enjoy !!
fatal: The remote end hung up unexpectedly
Tags: git, errors
Published: 2020-01-07 00:17:50

This error came up today. If the following conditions apply to you:

* One of the first messages by git is "fatal: The remote end hung up unexpectedly"
* Using Windows
* Installed GitExtensions (are using Putty)

Then you may not have Putty setup correctly, change your setting in GetExtensions to utilize openSSH. Or fix your Putty install.
Hello World
Tags: beginners, blogging, programming, developer
Published: 2020-01-08 19:22:14

---
title: Hello World
published: true
date: 2020-01-07 00:00:00 UTC
tags: beginners, blogging, programming, developer
canonical_url: https://phiilu.com/hello-world
---

![Hello World 🚀](https://phiilu.com/static/hello-world-48ec737abe1e22272a070af84e893c2d.png)

Hey I am [Phiilu](https://phiilu.com) and this is my first blog post ever! I always wanted to blog and share my knowledge with the world, but I never had the courage to do it.

**Reasons for this were:**

- English not being my native language
- Being too shy saying something wrong
- Having nothing useful or interesting to share
- Too lazy 😅

Now it's 2020 and it's time that I stop giving a f\*ck what other people think and actually put myself out there. I need to stop worring about what others may say, or others may reply. Writing and posting something that I find interesting, or I think could help someone is what I want to do! If only one person thinks that one of my posts helped him/her, than this blog is already a big success!

## Who is this guy?

In my day-to-day job I am working as a **Frontend Developer** for a agency.[React](https://reactjs.org/) and the projects evolving around React are my daily working tools. Before specialising in Fronted, I started with Backend. Everything started with me learning Ruby on Rails and Java, but at some point I learned more and more about Javascript/Node.js and ended up using and loving React.

I really like to code, but also setting up services on servers. I always loved configuring servers, this is why I am still hosting a lot of services by myself. This is where a lot of my knowledge about the internet and the [OSI model](https://en.wikipedia.org/wiki/OSI_model) comes from and how our modern internet is working.

That should be enough about me, if you want to know more, you can check [my personal website](https://kapfenberger.me/) out.

## What can you expect?

I am mostly interested in technical related topics like:

- Setting up services on servers
- Programming related content
- Consumer Electronics

But I really don't want to restrict myself on what to write here. Maybe one day I want to try out a 7 day fast and share my progress here 🤔.

My goal though is to give people value by sharing my experiences and (hopefully) helpful tutorials. All my life I have been a consumer and consumed various blog posts, articles and videos that helped me through my life.

Now it's time to give something back!
Prettier for C# - Developing an auto-formatting pre-commit hook
Published: 2020-08-18 09:51:08

---
title: Prettier for C# - Developing an auto-formatting pre-commit hook
published: true
date: 2020-01-07 00:00:00 UTC
tags: 
canonical_url: https://www.gustavwengel.dk/csharp-prettier
---

Many programming languages have automatic formatters. Go has `gofmt`, Rust has `rustfmt`, JavaScript has `prettier`and python has `black`.

Being able to, in an editor-independent way, have your code automatically formatted without having to worry about it,is extremely freeing. It means there’s a whole slew of religious wars you don’t have to fight, and it meansyou never have to review a pull request with a bunch of noise, because _this_ particular editor or user thinks the bracesbelong on some other line than they were.

Unfortunately C# doesn’t really have an equivalent. This has probably been mostly fine in the past, as everyone usedVisual Studio, so could be configured to follow the same styling guidelines. I don’t think this is fine anymore..NET Development is cross-platform now, but Visual Studio doesn’t exist on Linux. Light-weight editors like VSCode arewinning ground in many places, and Jetbrains are making the excellent [Rider IDE](https://www.jetbrains.com/rider/)

What used to be just one editor, with one formatting preference, is now multiple editors across multiple platforms,each with different formatting preferences. We need a C# autoformatter.

# ReSharper CLI Tools

ReSharper, which is a Jetbrains plugin for Visual Studio, has for quite a while released some of their tools as commandline interfaces. This includes things like Code Inspections, Duplicate Finders,and the most important one for us, `CleanupCode` - which among other things, formats code.

Now these tools used to be windows only, but with the advent of Rider, they’ve slowly been ported to become cross platform,and with the release of Rider 2019.3, they’re in general availability. This means we now have the tools we need, to createa fully cross-platform auto-formatter, and that’s what I’ve done.

# The pre-commit hook

I’ve created a pre-commit hook that uses the Resharper auto-formatter to automatically format files you commit,so you don’t have to think about it. It should work with any editor, and any platform. If you simply want to try it out for yourself, there’s a git hook located [here](https://github.com/GeeWee/reshaper-pre-commit-hook).Installing it is a one-liner, and I’ve tested it on both Windows and Linux (but not MacOS).Follow the instructions in the repository, and please submit an issue if there’s anything that’s broken.

Unfortunately, it’s not all sunshine and rainbows.The Resharper CLI doesn’t have the fastest boot time, so it does add a significant, but bearable, delay when comitting.Expect your commits to take up to five seconds longer than they normally do. I hope this is something Jetbrains will improve onin the future.
Day 64 : Fire Drills
Tags: hiphop, code, coding, lifelongdev
Published: 2020-01-06 23:45:00

_liner notes_:
- Saturday : First show of 2020! I think it went well, I had a great time. My co-host was able to make it which made it even better. That's good becuase this whole situation with Iran had me frustrated. Felt good to be able to get it out. The show's recording at https://kNOwBETTERHIPHOP.com

![Radio show episode image with the words January 4 2020, End endless wars, New Year. New War](https://thepracticaldev.s3.amazonaws.com/i/2efs6gj0qzdlf7j0r2cs.jpg)

- Sunday : Spent Saturday night in the van again. It was a cold night and wasn't bad this time because I had my blanket. Before going to sleep, I worked on my side project and got a lot of it complete. Spent the rest of Sunday creating an admin section where new presentations could be added to the database. Hooked up a domain name and got it deployed and tested it out. Got an MVP I can use for my upcoming talk at the next Orlando Devs meetup.

- Professional : Did more research. Not as much as I would have liked due to being at the dealership a lot longer than initially told. Pretty frustrating day. Good news is that I may be going to Atlanta to attend a conference in February. Also made preparations for my trip coming up this week.

- Personal : Looking to see if I can finish up a side project I've been slowly working on. Would really like to get it done before my trip in a couple of days so I can use it. Time flies by real quick. I got a bunch of it done and it will start of simply. Going to see if I can get it working and deployed tonight.

![A river running through a forest in Oregon](https://thepracticaldev.s3.amazonaws.com/i/ssytbplmkvir33hgyzbx.png)

Going to see if I can knock out this other side project. Probably be a late night! It's Fire Drills time! Go! Go! Go! haha

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube VppM8Td4qus %}
31 days of problems
Tags: challenge, kotlin, learning
Published: 2020-01-06 23:22:09

# Why?
This is the beginning of a new year (and decade) :tada: so it's time for a new commitment, last year I challenged myself on 365 days of coding problems with [DailyCodingProblems](https://www.dailycodingproblem.com) and...I gave up after only 2 or 3 weeks...
This year I will try again! For 31 days and why not more, but let's do 31 days for now. 

*Why try again?* 

To motivate myself I choose to publish my solution of the daily problem here because you will probably have other solutions and that would be great to discuss algorithmic here.

*Why do that?*

Because it's fun! It's a good technique to improve your logic and secondly next year I will have to pass a technical interview for the last internship of my studies and I want to be prepared!

# How this series will work

- First of all, this is my first series of articles and my first real article so don't hesitate to comments, I want to improve my writing skills (and my English also).

- Every two days (or one time a week) I will post a problem I received and my solution, you can find here the [repo](https://github.com/apomalyn/DailyCodingProblems) don't hesitate to check the repo :smiley:.

# Day 1
- Difficulty: Medium
- Programming language used: Kotlin

## Problem

Write a function, `throw_dice(N, faces, total)` that determines how many ways it is possible to 
throw `N` dices with some number of `faces` each to get a specific `total`.

For example: 
    `throw_dice(3, 6, 7)` should return 15. 

## My solution

I used a concept called dynamic programming (DP) to solve this one.
Finding how many ways it is possible to throw N dices to get a specific amount (X) is equivalent to find (and sum) how many ways it is possible to throw N-1 dices to get an X-1 amount, N-1 to get X-2, N-1 to get X-3, etc..until X and N equals 1.


```kotlin
/**
 * Determine how many ways it is possible to throw N dices with the number of faces each to get the total
 *
 * @param N, number of dices
 * @param faces, number of faces of each dice
 * @param total, the sum of the dices we would like to get
 * @return Int, number of ways
 */
fun throw_dice(N: Int, faces: Int, total: Int): Int {
    val subProblems = Array(N+1) { IntArray(total+1) { 0 } }

    var i = 1
    while (i < total && i < faces) {
        subProblems[1][i] = 1
        i++
    }

    for (w in 2..N) {
        for (j in 1..total) {
            for (k in 1..faces) {
                if(k >= j)
                    break
                subProblems[w][j] += subProblems[w - 1][j - k]
            }
        }
    }

    return subProblems[N][total]
}
```
How to check unused npm packages?
Tags: javascript, unused, package, check
Published: 2020-04-06 00:16:48

---
title: How to check unused npm packages?
published: true
date: 2020-01-06 23:11:52 UTC
tags: javascript,unused,package,check
canonical_url: https://medium.com/fuzzy-code/how-to-check-unused-npm-packages-977d06f0f15a
---

![](https://cdn-images-1.medium.com/max/1024/1*fMh_BsX_5h2MZBqVj_no5A.png)<figcaption>Meme showing node_modules as heaviest object in the universe. (source: <a href="https://bit.ly/2IG40Wb">https://bit.ly/2IG40Wb</a>)</figcaption>

I know… I know… After a streak of installing various npm (Node Package Manager) modules, you tend to forget which ones you still use and which ones you already abandoned. Of course, you can check it manually, but why the hassle when you already have a solution?

> Let me introduce you to this genie — ‘depcheck’

> Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless, and which dependencies are missing from package.json. — [npmjs](https://www.npmjs.com/package/depcheck)

Let’s start by installing the package depcheck from npm registry. You can install it globally by entering the following code in your terminal:

```
npm install -g depcheck 
```

_Note:_ depcheck needs node.js >= 6

Now, navigate to the folder where you want your dependencies to be checked. Then enter:

```
depcheck
```

It takes a while depending upon the project’s complexity and then provides you with results which is similar to the output shown below:

![](https://cdn-images-1.medium.com/max/1024/1*ElAnGRWEaN6_s09fELw2wA.png)<figcaption>depcheck performed in freshly installed ionic 4 project</figcaption>

You can also pass additional parameters according to your need:

```
depcheck [directory] [arguments]
```

The [directory] argument is the root level directory of the project where package.json file is present. It defaults to current directory if not specified.

The [arguments] parameter can be used to specify different flags to customise our output. For example: --ignore-bin-packages=true ignores the packages containing bin entry.

Full usage instructions can be found in: [https://www.npmjs.com/package/depcheck#usage](https://www.npmjs.com/package/depcheck#usage)

**Don’t want to install ‘depcheck’? No problem:**

If you don’t want to install depcheck , you can use npx to run it without installing globally in your machine.

If you don’t have npx , install it globally by:

```
npm install -g npx
```

Then, run depcheck by:

```
npx depcheck
```

Here,npx will execute the command either from local node\_modules/.bin or from a central cache and installs any packages if required.

Enjoy! 👌

References:

1. [https://www.npmjs.com/package/depcheck](https://www.npmjs.com/package/depcheck)
2. [https://www.npmjs.com/package/npx](https://www.npmjs.com/package/npx)

* * *
Rendering JSON data in HTML
Tags: javascript, rendering, html, json
Published: 2020-04-20 00:49:20

---
title: Rendering JSON data in HTML
published: true
date: 2020-01-06 23:10:04 UTC
tags: javascript,rendering,html,json
canonical_url: https://medium.com/fuzzy-code/rendering-json-data-in-html-e54346b0ec0d
---

![](https://cdn-images-1.medium.com/max/1024/0*segq_imNNe49otQR)<figcaption>Photo by <a href="https://unsplash.com/@wflwong?utm_source=medium&amp;utm_medium=referral">Warren Wong</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption>

Tired of teaching your non-IT colleagues how to see what they got as a result from the API? Or are you yourself tired of opening the console?

> Try displaying them in HTML using [“Renderjson”.](https://www.npmjs.com/package/renderjson)

**Renderjson** is a simple JavaScript package which render JSON into collapsible, themeable HTML. It can be used as debugging tool, however you are the boss and you can use it wherever it is useful.

![](https://cdn-images-1.medium.com/max/600/1*3Yov6_zrmc5ufsMjsieniA.gif)<figcaption>Renderjson example</figcaption>

The code renders the JSON lazily, only building the HTML when the user reveals the JSON by clicking the disclosure icons. This makes it extremely fast to do the initial render of huge JSON objects, since the only thing that renders initially is a single disclosure icon.

### Installing Plugin:

npm i renderjson

### Example Usage:

```
<div **id** ="test"></div>

<script **type** ="text/javascript" **src** ="renderjson.js"></script>

<script>

document.getElementById("test").appendChild(

renderjson({ hello **:** [1,2,3,4], there **:** { a **:** 1, b **:** 2, c **:** ["hello", null] } })

);

</script>
```

Just call the library in whatever way/tech you are using and then append the result of the JSON data passed on to renderjson() function. It takes in the JSON you want to render as a single argument and returns an HTML element.

### Options:

Call set\_show\_to\_level() to show different amounts of the JSON by default. The default is 0, and 1 is a popular choice. As a special case, if level is the string "all" then all the JSON will be shown by default. This, of course, removes the benefit of the lazy rendering, so it may be slow with large JSON objects.

```
renderjson.set\_show\_to\_level(level);
```

Other options are discussed in the plugin page: [https://www.npmjs.com/package/renderjson#options](https://www.npmjs.com/package/renderjson#options)

References used are from the plugin’s official website: [https://github.com/caldwell/renderjson](https://github.com/caldwell/renderjson)

* * *
Hiding Videos on the Mobile Web
Tags: uncategorized
Published: 2020-01-10 11:58:36

---
title: Hiding Videos on the Mobile Web
published: true
date: 2020-01-06 22:55:47 UTC
tags: Uncategorized
canonical_url: https://dougsillars.com/2020/01/06/hiding-videos-on-the-mbile-web/
---

Background videos, and videos that autoplay on websites are becoming more and more popular (and perhaps will soon be the new normal). It is also common to only display the video on larger screens, and to hide the video on small screens. An Anti-pattern emerges However, in my experience of looking at hundreds of websites … [Continue reading Hiding Videos on the Mobile Web](https://dougsillars.com/2020/01/06/hiding-videos-on-the-mbile-web/)