teleren/devto huggingface dataset:
Flyimg: Dockerized application to resize and crop images on the fly.
Tags: image, imageprocessing, imagecropping, microservices
Published: 2018-05-29 16:00:03

---
title: Flyimg: Dockerized application to resize and crop images on the fly.
published: true
description: Flyimg application could run as a Microservice to resize and crop images on the fly.
tags: image, imageprocessing, imagecropping, microservice
---
![Flyimg](https://thepracticaldev.s3.amazonaws.com/i/khusz65mk5uoazuw7mtu.png)
With Responsive Images, today we have a bunch of front-end tools to deliver the most appropriate image to a browser. But you still have to generate those images.

This is our (open source) take on the problem: Flyimg https://github.com/flyimg/flyimg

A microservice that will resize, crop, transform and compress images on the fly

##What it does

- Get images from anywhere on the internet and store them locally for further operations.
- Resize an image and serve it compressed (Moz-Jpeg for JPEGs)
- Crop images to given coordinates
- Convert between some formats (Webp, JPEG, PNG, GIF)
- It can restrict the domains or IPs from where it pulls images to transform.
- It's a bunch of well known open source projects packed together for convenience.
- It includes face detection, cropping, face blurring, image rotation and many other options.
- Simple and easy to extend (our main goal).

With the magic of Docker, you can have one running in 10 minutes in AWS or Digital Ocean on the cheapest servers you can get.

Of course, there are a hundred services that will get your money to do it. Also, some open-source projects will do a bunch of things, many with way more features, but they are hard to set up and use. In many cases you need to compile C libraries in very specific ways... then deal with the configs of a server...

##Basic usage

To resize the following image: https://www.mozilla.org/media/img/logos/firefox/logo-quantum-high-res.cfd87a8f62ae.png

You call your img.service and give it some params in the URL like this:

https://demo.flyimg.io/upload/w_333,h_200,q_90/https://www.mozilla.org/media/img/logos/firefox/logo-quantum-high-res.cfd87a8f62ae.png

-> That will create a version of the image that fits in a 333x200 rectangle:
![](https://demo.flyimg.io/upload/w_333,h_200,q_90/https://www.mozilla.org/media/img/logos/firefox/logo-quantum-high-res.cfd87a8f62ae.png)
Who's looking for open source contributors? (May 29 edition)
Tags: discuss, opensource
Published: 2018-05-29 15:35:14

---
title: Who's looking for open source contributors? (May 29 edition)
published: true
description: Please shamelessly promote your project. Everyone who posted in previous weeks is welcome back this week, as always.
tags: discuss, opensource
---

Please shamelessly promote your project. Everyone who posted in previous weeks is welcome back this week, as always. 😄

_Posting this on Tuesday instead of Monday due to the US holiday Memorial Day yesterday._
Explain http vs https Like I'm Five
Tags: explainlikeimfive
Published: 2018-05-29 15:13:42

---
title: Explain http vs https Like I'm Five
published: true
tags: explainlikeimfive
---
Hi,

I have to explain why getting an ssl cert (https) is important to some non-technical folks. I can't for the life of me simplify this down to a concept. Can someone help. 

I have so far:

http is how the web used to work / https is how the web is expected to work in the future

http is vulnerable to being eavesdropped / decoded while in transit
https is not

https is http over a secure protocol (usually (ssl) port 443 or (tls) port 587)

My Start:
********************************************************************************
_Think of it this way:_
_you're standing in line at the bank, the teller in front of you asks for your pin._

_Do you feel secure saying your pin code for all hear?_

_Or speaking it to the teller in a some sort of code only you and the teller can understand?_

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

My plan is to use letsencrypt for the cert. I've done this for my own site and it works great. 

Mastering the art of technical explanation to non-technical folks is a work in progress for me.


Thanks,
jbeetz
CAP Theorem
Published: 2021-07-14 18:50:01

---
title: CAP Theorem
published: true
date: 2018-05-29 13:54:00 UTC
tags: 
canonical_url: https://blog.g33kzone.com/cap-theorem
---

CAP theorem was the term coined by Eric Brewer at the 2000 Symposium on Principles of Distributed Computing (PODC), states that it is impossible for a distributed data store to simultaneously provide more than two out of consistency, availability, and partition tolerance. It helps make system designers aware of the practical trade-offs while designing distributed data systems.

**Consistency** - Assurance that every node in a distributed cluster returns the most recent, successful write.

**Availability** - Every non-failing node returns a response for all read and write requests in a reasonable amount of time - without guarantee that it contains the most recent write.

**Partition Tolerant** - The system continues to function and upholds its consistency guarantees in spite of network partitions. Distributed systems must also gracefully recover once the partition heals.

[![](https://cdn.hashnode.com/res/hashnode/image/upload/v1623671714696/5s4Wk4y6I.png)](https://1.bp.blogspot.com/-h0hSJTgzZaA/Ww09w6ecuiI/AAAAAAAAzR0/MuH9VIqutv4YyTMqlvlpscnCNP-0b7JyACPcBGAYYCw/s1600/CAP.PNG)

CAP Theorem categorizes system into three categories

`CP (Consistent and Partition Tolerant)` - A system that is consistent and partition tolerant but never available. In other words, Availability - sacrificed only in the case of a network partition.

`CA (Consistent and Available)` - CA systems are consistent and available systems in the absence of any network partition. Single node databases can be classified in this category.

`AP (Available and Partition Tolerant)` - These are systems that are available and partition tolerant but cannot guarantee consistency. e.g Cassandra database provides eventual consistency feature.
What next after a programming workshop?
Published: 2018-05-29 09:47:40

---
title: What next after a programming workshop?
published: true
description: 
tags: 
---

Let's say you applied  for a programming workshop which usually lasts for few days and got selected. Kindly note that programming workshops are usually an introductory course, basically you'll be exposed to few portion of a particular programming language or framework. Now the big question is 'after that what again?' This is what I have to say...

1. Keep in touch with your facilitator/mentor/coach: These are the experts who impact or introduce you to the programming language during the workshop. Most people ignore the facilitator/mentor/coach after the workshop. It's very important to keep in touch with them in order to address common problems you face during and after the workshop.

2. Practice practice practice: One of the best ways to achieve greatness in programming is continuous practice. Practicing exposes you to more problems which can be forwarded to your facilitator/mentor/coach for solution and guidance, by doing this you stand the chance to grow your skills.

3. Hang out with other coders (Meet-ups): Hanging out with other people who code is a great way to write clean codes. Its also a great way to enhance your skills.

4. Finally, Volunteer: Life is too short, give back what you've learnt to the society. Engage in volunteering activities to enhance your skills.
WooCommerce Brands Plugin – Shop by Manufacturer
Tags: woocommercebrands
Published: 2018-05-29 09:14:16

---
title: WooCommerce Brands Plugin – Shop by Manufacturer
published: true
description: WooCommerce brands plugin enhance the shopping experience of your e-store by enabling brand shopping for customers. 
tags: WooCommerce Brands
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/w3d0kq5v58e8p9is3lfy.png">
Customers can see the brands thumbnail on your WooCommerce pages and click the thumbnails to see the products. <a href="https://codecanyon.net/item/woocommerce-brands-plugin/21908728">WooCommerce brands plugin</a> also creates the separate landing page to display all the brands, customers can use filters or brands thumbnails to find their favorite brand. Customers can find any manufacturer by using the filter and featured brand thumbnails. It cost you only $23 and comes with 100% money back guaranty.

<b>Screenshots</b>

<img src="https://thepracticaldev.s3.amazonaws.com/i/uuwaai6am1cz3mlzjnqo.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/w98mr8ni02n01rh7jllr.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/blpugmswuciecjrzn0hz.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/x0o3j6y9pmh18ujrb88l.png">
How do you handle a component update ?
Tags: react, beginners, help, javascript
Published: 2018-05-29 08:24:09

---
title: How do you handle a component update ?
published: true
description: 
tags: React, beginner, help, js
---

i'm working on my portfolio using a React cousin `Preact`. Component lifecycle are the same and i want to update the route that display details about a project when clicking on another project and i'm lost😅.can you please help me?
Date::Holidays 1.08 released
Tags: opensource, dateholidays, perl, release
Published: 2018-11-26 18:18:12

---
title: Date::Holidays 1.08 released
published: true
tags: Open Source,date-holidays,perl,release
canonical_url: https://lastmover.wordpress.com/2018/05/29/dateholidays-1-08-released/
---

I have just uploaded [Date::Holidays](https://github.com/jonasbn/perl-date-holidays) [1.08](https://metacpan.org/release/JONASBN/Date-Holidays-1.08) to PAUSE/CPAN.

It holds a new adapter class for [Date::Holidays::USFederal](https://metacpan.org/pod/Date::Holidays::USFederal) (US) in response to a request from a user.

The implementation required a lot of changes to the internal code, due to the variation in the adapted Date::Holidays class name, Date::Holidays::USFederal, which is not an ISO compatible country code. I am pondering supporting this as US as well.

At the same time the test suite was restructured. I hope I did not break anything, all tests pass currently locally and with Travis via GitHub. I moved a lot of tests from \*.t files into [Test::Class](https://metacpan.org/pod/Test::Class) based implementations, which I find much easier to work with.

Upon upload I did observe a failure in the indexing:

```text
Status: Permission missing
==========================
  module : Date::Holidays::Adapter::Local 
  version: 1.08 
  in file: lib/Date/Holidays/Adapter/Local.pm 
  status : Not indexed because of case mismatch.
```

I am not sure what this error means, but I will investigate if this has raises any issues or give complications. The class was called Date::Holidays::Adapter::LOCAL earlier, so this might be the cause of the problem.

[CPAN-testers are reporting a lot of failing tests](http://www.cpantesters.org/distro/D/Date-Holidays.html?grade=3&perlmat=2&patches=2&oncpan=2&distmat=2&perlver=ALL&osname=ALL&version=1.08), which I will also investigate ([issue #21](https://github.com/jonasbn/perl-date-holidays/issues/21)). I do not suspect the indexing issue to be related, currently I can see that this seems to be an issue with the include path (@INC) for the test classes in the distribution, but I have not been able to reproduce the issue with either prove, make test (based on Makefile.PL) or ./Build test (based on Build.PL).
ORM vs. SQL?
Tags: discuss
Published: 2018-05-29 08:03:59

---
title: ORM vs. SQL?
published: true
description: What are the benefits and downsides of ORMs vs. query languages
tags: #discuss
---

What are you using in your application to access your relational datastores,
object-relational mapping or a query languange like SQL?

Why have you picked the approach?
What are the benefits and downsides?
Best ways to prepare for an interview?
Tags: discuss, career
Published: 2018-05-29 00:58:11

---
title: Best ways to prepare for an interview?
published: true
description: What are some of the best things to do before an interview?
tags: discuss, career
---
### So I have an interview coming up! 😳

I am definitely excited and would like to use this thread as a reference on what people do in order to prepare for an interview, or even advice. The one I have is software related but this discussion is open for any general interview. Thanks!
BEWARE TO SIDE EFFECTS
Tags: discuss, developer, career
Published: 2018-05-29 00:40:04

---
title: BEWARE TO SIDE EFFECTS
published: true
description: 
tags: #discuss #developer #career
---

Originally poster here: https://medium.com/@jeffreyuvero/beware-to-side-effects-f990195095c7


I worked as a developer for almost two years and I have learned many things inside-out in my workplace and what will be the proper approach for every problem when it arrives. One of the most important things I learned these days is to debug your program without breaking others’ codes. Yes I am working with the team of programmers and one of the tasks is to fix the problem that appears in the system.

Assigning to fix the bug in the system is pretty easy for me: Just ready the code; look for the problem; then debug it and I am done. But there’s a circumstance after you fix the specific problem, another will appear and after you fixed it, another one will also appear. This is the effect of fixing the specific problem and the debugger do not care for the other part that will affect the part of the system.

The bottom line here is don’t just debug the specific problem but you need also to run a test if the other side of the system is affected or your solution made a conflict to the other side of the system BEWARE!
This Blog Week 21
Published: 2018-07-22 10:41:15

---
title: This Blog Week 21
published: true
tags: 
canonical_url: https://remibou.github.io/This-Blog-Week-21/
---

# This Blog

## Why am I doing this ?

So I created this blog for many reasons :

- Testing jekyll on github pages
- Work my writing skills
- Explain to the world what I am doing I’ll try to post as often as possible (every week seems a nice challenge).

## Who am I ?

My name is Rémi Bourgarel, born in 86 in Toulouse where I still live. I am passtionnated by software development I have currently many point of interest :

- .net : .net core, .net framework, asp.net, blazor, ml.net
- Spring
- Angular (the last two are for my new job)
- Cloud computing (mainly azure for now)

## Jekyll

Jekyll is a nice static site generator. What this means is that it takes your content (here md files) and generate raw html pages from it. Github can manage the whole thing : file generation, generated page storage, web server hosting and domain name providing.

From a performance and even security point of view it’s really interesting as there is no server side code execution (there is a bit of code for loading the file content and sending it to the client).

### How did I set it up ?

- I forked https://github.com/barryclark/jekyll-now
- Changed the repo name to {my user name}.github.io
- Edited https://github.com/RemiBou/remibou.github.io/blob/master/\_config.yml
- Edited a md file in https://github.com/RemiBou/remibou.github.io/blob/master/\_posts/
- Browse https://remibou.github.io/

That’s it. The only problem was that the site was not being generated because I had some syntax error in my config file (space missing after “:”). I received an email from github with the exact error message and after correcting it the site was up and running.

### Whats the point

As I said there is security and performance but there is no traffic on this site so it’s not really something really interesting at this stage :

- Simplicity of setup, around 5-10 min
- In github so I can edit my post on my local machine
- Working with markdown so the syntax is easy and I don’t have to deal with some weird Wysiwyg (always have to spell this in my head to get it right)
- Working with git so I can do branching for WIP and have a full history
- Lot of nice plugins like disqus or google analytics and you configurate it with one line of config
- no hard to understand GUI like wordpress or shitty Wysiwyg like blogspot

## Blog post list

https://trello.com/b/DjyTFhPy/blog
Facing a Dilemma 
Tags: discuss
Published: 2018-05-28 19:55:23

---
title: Facing a Dilemma 
published: true
description: 
tags: discuss
---

So recently I took a break from coding (outside of my job) and side projects just to relax my mind since I had been stressing myself out. This 'vacation' away from tech has been really refreshing and I'm noticing that I have new desires such as working out, skateboarding, hanging out with friends, reading books, meeting new people, etc. It's all been a lot of fun. It reminds me of who I was pre-tech (before I started out as a software engineer)

I haven't lost my love for coding but I'm a bit hesitant to return to it. The reason being, when I get into that mode it's kind of hard to switch back. I become too analytical, too logical. I begin to overthink things, I kind of lose interest in casually hanging out with friends (no social life), always looking for a solution to things/better approach, being spontaneous becomes a challenge, etc. It's like my focus just shifts to coding and my side projects, and I get stuck in that mindset.

I'm enjoying this time away from coding although I do want to get back into it but trying to figure out how I can do that and maintain a balance.

Any of you guys experience this before? Any thoughts?
Tell Git Your Intentions
Tags: versioncontrol, coding, softwaredevelopment, workflow
Published: 2018-09-07 07:08:03

---
title: Tell Git Your Intentions
published: true
tags: version-control,coding,software-development,workflow
canonical_url: https://medium.com/@nodunayo/tell-git-your-intentions-1ed062294320
---

What’s your Git workflow?

I’ll show you what mine was for almost 5 years, and then a few weeks ago, it all changed.

To keep things simple, let’s assume I’ve got some unstaged changes in my repo and all of the changes are good to go for my next commit. I always start with git add -p to review all changes one small chunk at a time:

![](https://cdn-images-1.medium.com/max/624/1*-dRYd_wlSFUDEjwAM_QiTA.jpeg)<figcaption>Old Git workflow — new files made things ‘complicated’</figcaption>

Take a look at my flow when there’s just one new file involved. Did you notice how things get a lot more awkward? I also lose the benefits of partially adding changes with new files — I’m left with scanning over all of the changes after I’ve added them. The flowchart above assumes the happy path. Often, I’ll want to only commit some things and not others, so I have to go back and check out some of the added changes.

A few weeks ago, I was reviewing a cached diff after adding some new files, and I realised that I’d paginated through the changes without carefully reading them. I was disappointed in myself for letting the ball slip and frustrated with the workflow. This wasn’t the first time I’d caught myself doing that.

People often talk about how powerful Git is. Given that, this workflow seemed unnecessarily awkward. There must be a better way. So, after 5 years of using that same workflow, I decided to turn to Google to look for that better way. I typed in “partially adding new files git”, and that’s when I discovered my new best friend:

> -N, — intent-to-add Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with git diff and committing them with git commit -a.

This means that if I had a new file ready to be committed, I could type in git add -N <new\_file> and then do git add -p against that file.

So, here’s what my new Git workflow looks like:

![](https://cdn-images-1.medium.com/max/349/1*ztQz322L8JeStk_mSJFM2Q.jpeg)<figcaption>A streamlined new Git workflow</figcaption>

Isn’t that much better?

With the --intent-to-add option, all of my files are now subject to VIP (that’s Very Important Partial add) treatment, meaning fewer errors and better crafted commits.

What do you think? Had you heard of the ‘intent-to-add’ option before?

If you’re looking at my workflow and thinking of a new way to step it up even more, then please get in touch with me. I’m [@nodunayo on Twitter](https://twitter.com/nodunayo).
How long does it take to build your project?
Tags: discuss
Published: 2018-05-28 19:45:39

---
title: How long does it take to build your project?
published: true
tags: discuss
---
A project I'm currently working on takes around 2.5h to build. That's mostly because the code base is huge (1.2m LOC) and the tests are mostly slow. The coverage isn't even that big (around 20% unit and ITs).

Whats the build time of the projects you are working on?
Why is this code not working?
Tags: php, help
Published: 2018-05-28 17:03:07

---
title: Why is this code not working?
published: true
description: This code is not working, I have no idea why
tags: php, help
---

A few days ago I saw someone asking why this code is not reaching the third `var_dump`, so I tried to execute this in my computer, with all the different versions of PHP available and it is not working on any of them so, what's going on here?

I've tried changing the code in many ways and it never reaches the third `var_dump`, it's driving me crazy

```
<?php

$test = 9.99;
if ($test == 9.99) {
    var_dump($test);
}

$test = $test + 30;
if ($test == 39.99) {
    var_dump($test);
}

$test = $test + 30;
if ($test == 69.99) {
    var_dump($test);
} 
```
Let's Encrypt Certbot/acme.sh and the "300 Multiple Choices" Error
Tags: letsencrypt, debian, dx, ux
Published: 2018-05-28 16:47:11

---
title: Let's Encrypt Certbot/acme.sh and the "300 Multiple Choices" Error
published: true
description: it can be that your DNS `A-Record` is pointing to a different location than the `AAAA-Record`
tags: #letsencrypt #debian #DX #UX
cover_image: https://thepracticaldev.s3.amazonaws.com/i/my5afyhoqiasivfn1rwr.jpeg
---
If you want to use letsencrypt and can't get it working even if you have an absolute minimum configuration like that:

```
server {
  listen *:80;

  server_name           example.com;
  root /var/www/example.com;
}
```

it can be that your DNS `A-Record` is pointing to a different location than the `AAAA-Record`. this can easily happen if you have no direct access to the DNS interface and only the `A-Record` was changed. 

for debian9 (stretch) install the certbot from backports. the shiped version is quite outdated and can lead to [`Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.`][4]

[`cerbot`][3] came up with the, for me, not so helpful error message [`300 Multiple Choices`][1] and the [`acme.sh`][2] log file also contained only a `code='400'`

`certbot` error:
```
 - The following errors were reported by the server:

   Domain: example.com
   Type:   unauthorized
   Detail: Invalid response from
   http://example.com/.well-known/acme-challenge/TOKEN_REMOVED:
   "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
   <html><head>
   <title>300 Multiple Choices</title>
   </head><body>
   <h1>Multiple C"
```

`acme.sh` error:
```
[Mon May 28 17:37:26 CEST 2018] url='https://acme-staging.api.letsencrypt.org/acme/challenge/TOKEN_REMOVED/ID_REMOVED'
[Mon May 28 17:37:26 CEST 2018] payload='{"resource": "challenge", "keyAuthorization": "KEY_AUTH_REMOVED"}'
[Mon May 28 17:37:26 CEST 2018] POST
[Mon May 28 17:37:26 CEST 2018] _post_url='https://acme-staging.api.letsencrypt.org/acme/challenge/TOKEN_REMOVED/ID_REMOVED'
[Mon May 28 17:37:26 CEST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header  -g '
[Mon May 28 17:37:27 CEST 2018] _ret='0'
[Mon May 28 17:37:27 CEST 2018] code='400'
```



- photo by Mikes Photos https://www.pexels.com/photo/arrow-close-up-direction-environment-445012/

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300
[2]: https://github.com/Neilpang/acme.sh
[3]: https://certbot.eff.org/
[4]: https://community.letsencrypt.org/t/solution-client-with-the-currently-selected-authenticator-does-not-support-any-combination-of-challenges-that-will-satisfy-the-ca/49983