teleren/devto huggingface dataset:
Win for the Week: What have you achieved?
Tags: casual, discuss
Published: 2019-10-12 22:52:26

---
title: Win for the Week: What have you achieved?
published: true
description: Big or little; programming or other. What productivity has made you proud of yourself this week?
tags: casual, discuss
---

This week, I took the first of many Microsoft Office Specialist exams - and thankfully passed! I got a swanky badge with the Microsoft Word logo on it that I promptly fastened to my lanyard, the iconic shade of blue clashing wonderfully with the BB-8 themed neckwear; there was a noticeable skip in my step walking home. That skip translated nicely into some very swish dance moves I performed last night in a celebratory night on the town. 

Next week, I've scheduled to take the Powerpoint MOS exam. :)

I've also begun working for the first time with Bulma. After fighting a little bit with command-line installation (a technique I'm not especially confident in), I finally managed to set up a template webpage with Bulma and VueJS. I can't wait to get started on that project!

So I want to know: what's been your win this week? Maybe it was as big as receiving a well-earned promotion or making the career change you'd been delaying for too long? Or perhaps it was something smaller but just as important. Perhaps you finally managed to walk the dog past that one bank of the river and not be dragged into the muddy water (I am absolutely speaking from horribly frigid experience[s]).

Let's spread the love: give yourselves a pat on the back in the comments below.
Ok I knew contributing to open source was fun but no one told me it would be this easy :satisfied:
Tags: hacktoberfest
Published: 2019-10-12 22:24:08

---
title: Ok I knew contributing to open source was fun but no one told me it would be this easy :satisfied:
published: true
description: I finally took the time to fork a repository, work on an issue and get to submitting a pull request to an open source project.
tags: hacktoberfest, discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/tr3rscbyk1ba8c8mkjl1.png
---

I honestly didn't think I would be able to finish the hacktoberfest challenge, let alone in such short amount of time. Still I feel like I am not done participating.

I first heard of hacktoberfest last year when I had been a member of Dev.to for just a couple of months and struggling with getting my open source app off the ground. I focused on working on my own project because I believed to contribute to another person's or organisation's codebase you have to be super skilled. While asking for help with my own issues I was facing, another community member [subbramanil](https://dev.to/subbramanil) opened a PR just for a single unit test file and took me through what the contribution was and why he was doing it, as confused and excited as I was. Here's one inspiring piece: {% post https://dev.to/subbramanil/hactoberfest-challenge-completed-e49 %}

A year later. Still I didn't want to contribute to anything because I felt I wasn't going to be good enough. I read so many posts everywhere about how people contributed even it was just a single line of documentation in a README.md and that really pumped me up to actually doing something. (I still didn't)

What got me to stop procrastinating about participating is the fact that everyone in my office was either already participating or being encouraged to. Plus I wouldn't want to see a bunch of beautiful hacktoberfest T-shirts at work knowing that I could've gotten one too but didn't do anything about it.

This past Friday, I found easy prey. I saw this
{% github https://github.com/LBBO/node-netflix2/issues/27 %}

The thing is, I've been writting comments all my live (minus the years I didn't know about programming) I mean how hard can it be?
I submitted a pull request, then BOOM!! 1/4 PRs for hacktoberfest was done. I was so exited that I submitted 2 more pull requests to other repos in one day.

As a bonus to myself, I submitted a pull request to the Dev.to android project.
{% github https://github.com/thepracticaldev/DEV-Android %}
Painterro - JavaScript painting plugin
Tags: webdev, javascript, ux
Published: 2019-10-12 22:20:33

[GitHub](https://github.com/devforth/painterro)

[Painterro Features review on Hinty](https://hinty.io/devforth/simplest-js-paint/)

[Live Demo](https://hinty.io/paste)

[npm](https://www.npmjs.com/package/painterro)

[JSFiddle](https://jsfiddle.net/vanbrosh/Levaqoeh/)
webpack-nexus 🐨 - my little first open source project
Tags: webpack, react, vscode, typescript
Published: 2019-10-12 22:17:24

---
title: webpack-nexus 🐨 - my little first open source project
published: true
description: Webpack nexus is a simple C4LI to scaffold your javascript/react projects.
tags: webpack, react, vscode, typescript
---

https://github.com/GiancarlosIO/webpack-nexus


One year ago I was wondering how things like create-react-app are being created.
In may of this year I decided I should try to create my own "create-react-app" to learn about cli's.

So, after 2 months of research and development I have finished my own cli and I want to share this with you.

Webpack-nexus 🐨:
https://github.com/GiancarlosIO/webpack-nexus

**Why I created my own cli?**

_I created this because I want to learn how to build something like create-react-app/next.js. I'm not trying to compete with the big current cli's/boilerplates_

I know it's not better than create-react-app o next.js but I made this to supply my custom requirements about webpack and vscode configurations. Maybe it will do the same for you.

**Features**

- Webpack: Dev and Prod configurations inspired by the awesome work of React - boilerplate 🔨
- Babel: ES6/ES7, jsx and more plugins configured for dev and production mode. ⚛️
- Styling with styled-components 💅
- Typing with typescript and eslint ✔️
- Auto formatter with prettier 🔄
- vscode configured to work with eslint + typescript + prettier 💙
- _React-apollo: coming soon..._
- _Jest: coming soon..._
- _Husky + lint-stagged: coming soon..._
- _webpack-nexus.js: file to configure/overrite the actual webpack/babel configuration, coming soon..._
- _Setup/configurations for atom and sublime, coming soon..._


**What is the difference with other projects like create-react-app/react-boilerplate/next.js?**

It has a lot of specific configurations used in all of my side-projects, so maybe you are good using CRA or NEXTJS.

I tested create-react-app and I think it is awesome but I don't like the way it works.

- You need to eject to add your own webpack or babel plugins.
- You need to eject to configure/add prettier/eslint rules.
- If you have lint errors it will throw an error. Some times I just want to test some egde cases. webpack-nexus doesn't throw an error because eslint is not configured inside webpack, it is just used to lint the files in vscode.
- It doesn't have support for multi-entries. It can be configured for that, but again, you need to eject.
- It has no styled-components installed.
- It has no apollo graphql configured. Graphql is what I always use in my projects.
- It has no react-hot-loader configured.

react-boilerplate? I really like that, but I just wanted a simple cli to scaffold my projects and not to clone a repository every time.

And... It is not comparable with next.js because it is not a react framework... but maybe in the future it can be? 🤔

I hope this project help you to scaffold your next big side project. 😊

You can see the docs here: https://github.com/GiancarlosIO/webpack-nexus

And... that's it. Thank you for reading!!!
Introducing Oto, the man in the middle.
Tags: oauth, spa, becode, authentication
Published: 2019-10-12 21:37:12

☝️ **NOTE:** this article is an _revised_ version of one of my [previous article](https://medium.com/becode/introducing-oto-the-man-in-the-middle-581311962a6d) on Medium.

* * *

As a developer, I love to use APIs.  
Moreover, I love to use others’ APIs, and integrate them in my apps.  
Like getting stuffs from GitHub, LinkedIN, allowing my users to see their data in my tools.

But I don’t want to ask my users their credentials for these services (and they wouldn’t probably give them!).  
So, I have to use the **OAuth2** protocol.

**OAuth2** is a tool used by services to allow third-party apps’ developers (like me! I’m a third-party developer! _Woot!_) to access the services’ data of users, with their approval.

I will not describe OAuth2 in depth, but here’s the big picture: when you create an app, you need to register it on the service you want to use the API.  
They will give you two important things: a public access id, which is not secret and can be stored in your code ; and a private access key, which is, huh, secret, and can’t be shared.  
When one of your user needs to use the API in your app, they will be redirected on a login page outside your site, on the original service (the login page of GitHub, for instance). The user log himself, and the service redirect him on your app, with a unique code.  
Then, your app will contact the service, with the unique code, your public access id and your private access key. The service know that everything’s okay, and will respond you with a token, that you will use for any request to the API.

And that’s all. It sounds complicated, but it’s quite easy.

* * *

But there’s a small problem: OAuth2 is not really designed to be used on _client-side only_ apps, like SPA.  
As I said, the _private access key_ needs to stay… huh, _private_.

So… we need a server. But we don’t really _want_ one, since we would like to have static apps.  
That’s a tough one.

But what if I told you we can have a server… _without_ a server?  
We can use a _serverless platform_, like **AWS Lambda**: it’s basically a simple piece of code (a function), bound to an URL, that will be executed when the URL is touched. Simple as _f*%_.

And then, we can have a small piece of code that will know our _private access key_ for OAuth2, and will make the last step of the challenge.
Let me introduce you [oto](https://github.com/becodeorg/oto), the man in the middle, the little piece of code to run that.

For now, it supports GitHub & LinkedIn, but I will add more services in the future.
You can run it locally, or simple use the [serverless framework](https://serverless.com/) to deploy it on your AWS account.  
And, last but not least, its able to handle multiple services and keys at once, simplifying your workflow!
Prevent false 'deadlock' in CircleCI
Tags: laravel, testing
Published: 2019-10-12 21:31:55

Sometimes you might have a long duration testcase in CircleCI, for example, you want to test your production database with new master branch before pushing it to production? You've come by the annoying facepalm when phpunit is running your test and CircleCI kills it as 'inactive for 10minutes' because phpunit does not output by default to screen when it's going through loop..

So, what we do at Redorent is we pull nightly backup of our production DBs, convert them so we don't use customers' real emails or phone numbers and run a testcase where we loop all users and core models so that all views for our FEs are solid. As our DBs are quite big, it takes easily more than 10 minutes to loop the views through so we inject writes inside our loops.

Here's how we do it:
```
                fwrite(STDERR, print_r($user->id, true));
```
That's it! Now each time we have next user in the loop, we print out the user id to stderr and phpunit keeps CircleCI's watchdog happy.
Give arguments to modelfactory
Tags: laravel, testing
Published: 2019-10-12 21:22:03

We all know how to create models with modelfactory, and use faker to populate the other stuff there. And yes, if you want to override modelfactory you can do it nicely with arguments to create(). 

But what if you need to do conditional processing in modelfactory? Yeaaap. Okay, so I did little experiments and discovered this: if you give arguments to the function you use as argument to define, you can pass stuff to modelfactory! 

_Real world example: snippet from our testing code:_

```
$factory->define(App\Invoice::class, function (Faker\Generator $faker, $arguments = []) {

    if (Arr::exists($arguments, 'invoice_type')) {
        $invoiceType = $arguments['invoice_type'];
    }
```
So, what we do is we give parameters to create when calling the factory in our tests. Now we can check if $arguments has 'invoice_type' and if so -> we use the data given instead to create new data. We call the factory like so:
```
        $invoiceInDB = factory(Invoice::class)->create(
            [
                'invoice_type' => Invoice::SERVICE_INVOICE,
                ...
            ]
        );

```
I know it ain't perfect but hey, it gets the job done!
I need an information
Tags: html, javascript, help
Published: 2019-10-12 21:17:58

Hi guys!
I need an information.
Do you know how to make the screen follow a moving element as in this web game? https://example-io-game.victorzhou.com/
I searched the game's programming code https://github.com/vzhou842/example-.io-game?files=1, but couldn't figure anything out.
Using python programs as backend for flutter app
Tags: help
Published: 2019-10-12 21:03:00

I am currently working on an android app using flutter framework and this is my first ever mobile app. I am well familiar with python36 and have written some scripts for scrapping some websites (using BeautifulSoup) which retrieve data from the website and make a CSV file containing all the information required. I want to perform some operations on this data, particularly mathematical calculations and use (or display) the results in my app.

Now I want that data to be sent to my app after performing the operations so that I can display the result there. Like if my app makes a request to scrape a particular website, I should get the data on the screen which was generated by running the script in the background.

I am planning to use Firebase as a backend for my app. Now my doubt is where will these scripts be hosted or how shall I go about achieving this?
Wolf Engine
Tags: c, cpp, python, github
Published: 2019-10-12 20:33:57

Back in 2012 when l was releasing the latest version of Persian game engine on <a href="https://archive.codeplex.com/?p=persianengine" target="_blank">Microsoft CodePlex</a> as an open source game engine, l faced some criticism. Some developers didn’t know much about open source and to others l was making a big mistake given the fact that Persian was the very same engine that I was using for developing our own games in our company, <a href="https://vimeo.com/channels/bazipardaz" target="_blank">BaziPardaz</a>. Needless to say that having a game engine was a valuable asset for any game developer company in those days. 

No Unity on the horizon, Unreal engine was the leading name in the industry, yet getting its license was almost an impossible dream for Iranian developers.

Exhausted of somewhat disillusioned of my experience in BaziPardaz, l started <a href="https://github.com/WolfEngine/Wolf.Engine" target="_blank">WolfEngine<a/> and it quickly gave me a strong sense of passion and purpose. Over the years Wolf became my go-to engine that l’ve used in my various projects including but not limited to, <a href="https://www.youtube.com/watch?v=EZSdEjBvuGY" target="_blank">CG real-time Broadcasting<a/>, <a href="https://www.youtube.com/watch?v=ygpz35ddZ_4" target="_blank">Project Falcon <a/>a 3D real-time monitoring, and in <a href="https://playpod.ir/" target="_blank">PlayPod<a/>, the real-time steaming platform that is the first of its kind in Middle East.

Wolf is written with C and C++ languages, nevertheless Python and Lua could be used as well. It contains the following libraries: 

Wolf system: for cross platform developing on different os
Wolf.MediaCore: for streaming and processing Media
Wolf.ContentPipeline: for optimizing load and saving resources as well as reading 3D formats
Wolf. Render: a library for real-time rendering on graphic cards
To me, Wolf Engine is a very important and personal part of my life. Nothing can describe it best as the old saying: if you love something, <strong>set it free!</strong>


Best
<a href="https://pooyaeimandar.github.io/" target="_blank">Pooya</a>
<a href="https://WolfEngine.app/" target="_blank">WolfEngine.app</a>
MacOS Catalina defaults to zsh
Tags: macos
Published: 2019-10-11 15:24:18

If you are on MacOS, you have probably noticed that MacOS now has zsh as the default shell instead of bash. If you haven't, you are doing a great job of ignoring the motd on opening the terminal :-)

```
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
```

MacOS had bash as the default shell for the Terminal since Panther (OS X 10.3). However, when bash v.4 was released under the GPL v3 license (previous versions of bash were released under the GPL v2 license), Apple decided to switch to zsh. bash is still available on Mojave (OS X 10.14) and Catalina (OS X 10.15) so your bash scripts would still run.

As a developer, the most obvious change is that for changes to the shell environment, you have to edit the .zshrc file instead of the .bashrc file and the .zprofile file instead of .bash_profile. The command history is in .zsh_history instead of .bash_history.
Stop Using YAML
Tags: yaml, serialization, json, xml
Published: 2019-10-12 20:24:19

# Preamble 

So what I realized is this argument is basically the same as this post. 

{% link https://dev.to/jessekphillips/the-uncanny-valley-3h6h %} 

# YAML 

"YAML is a human friendly data serialization standard for all programming languages."

It has been around since 2001 and recently it is grown in popularity. I'd like to curb this growth.

I don't have a full history of data serialization, but here are some points. 

Binary serialization - Some early serialization was a dump of memory to disk. Today we hear cross-platform we think OS, hardware stores data differently (the big one being endian). As such this was not a good strategy for sharing.

Human Readable - XML was a big deal. It could be read and modified by plain text editors and it was based on something familiar ~~SGML~~ HTML. It was expressive enough that you could represent anything with it, and we did. 

Schema Free - XML was massive and emphasized using schemas even though most parsers didn't require it. This was a pain for the fast moving web which didn't want to be brought down by the shackles of standards. JSON didn't need a schema and the web language could already parse it. (some people are still trying to get schemas into JSON. 

Human Friendly - Sure HTTP, XML, and JSON can be read by humans, but they aren't very friendly to us mortals. JSON got rid of the tags, but left much in the way with weird punctuation. Enter ~~Markdown~~ YAML a language which looks like a story written by Shakespeare but machine readable too. 

Problem is, Shakespeare wrote in old English. The things he has written look similar but can have a different meaning and thus the time period need to be studied to actually know the meaning. 

YAML wants you to feel at home, but if you're using it as a poor man's batch script (looking at you gitlab) then you're going to use things YAML assigns a special meaning to. 

You're going to tell me that I should have the batch script in a file and run that instead. Well that is what pushed me over because that is what I was trying to do. Powershell uses & for file execution and YAML uses it for anchors. So now I need to quote the entire command to make it valid.

JSON requires escape inside strings, but this is well defined as you know where it expects structure. YAML trying to be friendly requires extra structure when there is ambiguity.

On top of that being hard for humans & it being valid writing, YAML is hard to parse. Whitespace has meaning, except if you are writing a list then you have a couple of choices. And while references are supported, how well does that work for you when you need to support JSON reference conversation (looking at you OpenAPI)?
Major changes in Vanilla Javascript Fullscreen Lightbox!
Tags: lightboxjs, lightbox, vanillajslightbox, slidegallery
Published: 2019-10-12 20:20:30

---
title: Major changes in Vanilla Javascript Fullscreen Lightbox!
published: true
description: Introducing version 3.0. Check out new features that fslightbox offers!
tags: lightbox js, lightbox, vanilla js lightbox, slide gallery
---
Large update for Vanilla Javascript version.

We've had really big problems with scaling Vanilla JS version so we've decided to refactor it completely. Now it's designed a lot better and it's much more scalable!

Total size of pro version was decreased from 64KB to about 50KB!
Basic version from 34KB to about 29KB!

New features:

- Added updateFsLightbox() global function that detect new lightboxes or updates existing ones.
- Simplified adding Fullscreen Lightbox to webisite, now it's only js file.
- Custom sources, displaying anything you want, e.g. Google Maps, Iframes.
- Changed way of adding Vimeo videos, now you can do it via custom sources.
- Resolve CORS issues with automatic type detection via manually setting type (data-type attribute).
- Changed way of listening for events.

Check it out: https://fslightbox.com/javascript
Consumer-Grade Cloud Backup Service for Linux Laptops?
Tags: discuss, help, question
Published: 2019-10-12 20:08:38

---
title: Consumer-Grade Cloud Backup Service for Linux Laptops?
published: true
tags: discuss, help, question
---

My current laptop is fairly long in the tooth and its OS goes into final de-support (no more security-patches - yikes!) this coming January. So, time to replace it. I'm thinking of getting one of System76's Linux-based laptops to replace it. However, I'm concerned about backup costs. With my current, Windows-based PC (or, if I wanted to hold my nose and switch back to OSX), I'm able to use BackBlaze's unlimited cloud backup offering. Switching to Linux, if I wanted to stay with BackBlaze, I'd need to switch to B2.

At any rate, since there's undoubtedly a number of you who use Linux for your base operating system, presumably some of you are using a cloud-based backup solution. If so, what are you using, how well has it worked for you and, likely most critically, *what have your costs looked like*?

Thanks in advance!
Write a Program convert  Integer number into String [java]
Tags: replit, java
Published: 2019-10-12 19:32:07

Write a Program convert  Integer number into String [java] By Hottest Way 😄😊😉😍😘😚😜😝😳😁😣😢😂😭
Check Out !

{% replit @VikasTomar/number-convert-into-string %}
are you familiar with that ?
Tags: question, javascript, discuss
Published: 2019-10-12 18:27:20

---
title: are you familiar with that ?
published: true
description: Do you recognize something here? 
tags: question, javascript, discuss
---

Tel me what is important to know in this mindMap?

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/q5y1c9k0tqyauxqluas3.png)