teleren/devto huggingface dataset:
Enabling HTTP/2 in Apache on Ubuntu
Tags: apache, ubuntu, http2, security
Published: 2020-01-04 04:14:28

The experimental [SPDY](https://en.wikipedia.org/wiki/SPDY) protocol originally developed by Google gave birth to [HTTP/2](https://en.wikipedia.org/wiki/HTTP/2). Enabling HTTP/2 will greatly improve website performance.

However, there are some prerequisites to enabling HTTP/2 for your website. In this article, I will show how to get HTTP/2 working on your site running on Apache webserver.
## Prerequisites to Enabling HTTP/2
### HTTPS
First, enable HTTPS for your site. Configure HTTPS for your website, if you do not already have the SSL certificate or use [Let’s Encrypt](https://certbot.eff.org/) which is an open-source SSL certificate.
### Apache 2.4.24
Older versions of Apache do not support HTTP/2. You need to have Apache 2.4.24 and above. If you are using Ubuntu 16.04 LTS, then [upgrade to Ubuntu 18.04 LTS](https://anansewaa.com/upgrading-to-ubuntu-18-04-from-ubuntu-16-04-lts-server/).
### PHP FPM
By default, PHP runs on Apache via mod_php. According to Apache documentation, [HTTP/2 is not compatible](https://httpd.apache.org/docs/2.4/howto/http2.html) with Apache’s prefork multi-processing module. Moreover, prefork is not most people favourite now. A switch to a modern module is better.

Therefore, switch to php7.x-fpm from mod_php. Run the following commands to effect the necessary changes.
```
sudo apt-get install php7.2-fm
sudo a2enmod proxy_fcgi
sudo e2enconf php7.2-fpm
sudo a2dismod php7.2
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo service apache2 restart
```
### Enable HTTP/2 in Apache
Now, let’s enable mod_http2 module. Use the command below to enable mod_http2:
```
sudo a2enmod http2
sudo service apache2 restart
```
Finally, enable HTTP/2 protocol by updating __/etc/apache2/apache2.conf__ with the code below:
```
Protocols h2 http/1.1
```
## Conclusion
Now you have successfully enabled HTTP/2 protocol in Apache. Test your configuration with [Lighthouse](https://developers.google.com/web/tools/lighthouse/#devtools) which powers the audit panel of Chrome Dev Tools or the [online test from KeyCDN](https://tools.keycdn.com/http2-test).
My last year with a side project
Published: 2021-01-08 18:30:35

---
title: My last year with a side project
published: true
date: 2020-01-04 03:19:25 UTC
tags: 
canonical_url: https://mikebobadilla.com/my-last-year-with-a-side-project/
---

I started [https://whenarethefights.com](https://whenarethefights.com) a year ago now and it kinda flew by. It all started out with a post on [Reddit](https://www.reddit.com/r/MMA/comments/8js200/i_created_a_site_that_has_a_countdown_to_the_next/) and I was completely shocked that more than just me had a use for it. I  was immediately starting to think of ways to improve the site and the  easiest way to do so. I tried to listen to everyone on Reddit and tried  to find ways to improve the way I collected fights. This was a mistake. I  forgot about the actual problem I was trying to solve and that was just  to let people know when the next fight was. Over the last couple weeks I  have started to think about how I can just go back to square one and do  what I set out to do. I wanted to build a community around combat  sports in the spirit of [The Underground](https://www.mixedmartialarts.com/forums) and [/r/mma](https://www.reddit.com/r/MMA/). These were the places that I found out about all the fights that were coming up and which fighters to pay attention to.

Since  I started it, I went through 3 designs on the frontend and one change  on the backend. The site first started out as a React app using [Create React App](https://facebook.github.io/create-react-app/docs/getting-started), hosted on [Netlify](https://www.netlify.com/) (where this is now) just to get things moving. I quickly found out that Google’s search results weren’t really nice for [JAM](https://jamstack.org/) stacks and being that I wasn’t well versed in SEOfu, I thought maybe just use a static site generator. I wanted to mess around with [GatsbyJS](https://www.gatsbyjs.org/),  so why not. It’s been one of the better decisions I made since starting  the project. Another big change was switching my data store from  Google’s Firebase to Postgres on Heroku with [Hasura](https://hasura.io/).  I’m at the point now where I want to start trying to build a community  where smaller promotions and other users can add events. I created [/r/whenarethefights](https://www.reddit.com/r/whenarethefights) for a spot to talk about some future ideas.

Some things I have planned for the next few months are:

- Weekly newsletter on Sundays with upcoming fights and results
- Accounts with locations and preferences
- Social media sharing and notifications
- New design with a smaller payload. I want to ditch Semantic UI
- Once  ^ happens I can start thinking about an native app for people that  prefer something like that, if there is enough demand for it
- Open up the API to the public so other sites can let people know when the fights are

Here  is the last year on Google Analytics. Every spike is a Saturday, the  common fight day during the week. I think the most interesting part  about this is you can actually see when bigger fights are happening.  Data is pretty cool.
Dockerize Create-React-App in 3 minutes
Tags: react, docker, javascript, beginners
Published: 2020-01-04 02:17:00

First of all, I'm pretty excited since it's my first blog post ever... I hope you would like it

Lately I got a full stack home assignment which was included NodeJS micro services in  the backend and React for the front-end.

I created a really nice project using [Create React App](https://github.com/facebook/create-react-app).

If you don't know Create React App, It's creating in less then 20 seconds React App the works Simply by running the following command```npx create-react-app webapp```

Ok, once I got my project, I coded my stuff, which was pretty straight forward using the basic templated. Then I wonder, what will be the easiest way to serve this page.
Remember that I need to submit this home assignment.

Since I already have micro-services I had docker-compose file for the rest of the services, so I was looking how to dockerized my React project.

I'm happy to tell you that it's really easy.

Let's say my project name is webapp.

Create two files under the project root folder `Dockerfile` and `.dockerignore`.

Copy the content into your files accordingly
{% gist https://gist.github.com/zivkaziv/276b1922fe659b4e28190733ed5df699 %}

Lines 1 - 6 are building the image:
1. Creating working dir
2. Copy all the files besides the one in the `.dockerignore`
3. Installing react-scripts which is using for serving the project
4. Running yarn insatll - Get the dependencis 
5. Yarn run build - Build the project in optimized way

Lines 8-12 are the one used to serve the project.
Note the at we are serving this project in port `80`.

Let's build this image just run on the `Dockerfile` folder
`docker build -t react-webapp .`

And run our container
`docker run -it -p 8000:80 react-webapp`
Once the container is running, you can open http://localhost:8000 and you'll be able to access the React app running inside the Docker container.

For docker-compose you can copy
{% gist https://gist.github.com/zivkaziv/a104ebc28bcb9c989cd964096e063636 %}

That's it...
Now you got a dockerized UI solution in less then 3 minutes.
Vue.js en Español
Tags: vue, tutorial
Published: 2020-01-04 01:37:38

### En Español

¿Alguien por aquí que quiera aprender Vue?

He estado grabando desde hace un tiempo videos (cortos, espero) acerca de diferentes conceptos de Vue.js

Están grabados en una plataforma muy interesante llamada [Scrimba](scrimba.com) en la que además de poder reproducir el video, puedes modificar el código en vivo. Tendrías que verlo en persona para experimentarlo. A mí me gustó mucho y creo que tiene mucho valor.

En fin, acabo de publicar el décimo video que habla de slots y ojalá le sirva de algo a alguien más.

https://scrimba.com/playlist/pDzVxUd



### English version: (not the translation though)

Sometime ago I started working on a video series in Spanish on a platform called [Scrimba](scrimba.com). You can not only playback the content, but also live edit the code in there 🤯

If you speak or understand Spanish you can check out the videos I have posted so far here: https://scrimba.com/playlist/pDzVxUd (more than welcome to check them out even if you don't 😝)

I just uploaded the 10th video and it talks about slots.


Bonus:

I'm uploading the videos to my YouTube channel as well. Obviously these are not interactive.

https://www.youtube.com/playlist?list=PLmJs3lfUmCdSuMvPIPhz_OOT1pWm0iLZZ
Day 3 - Musical Coding with only One Sample
Tags: ruby, showdev, music, creative
Published: 2020-01-04 01:21:34

For the third day of Jamuary , I am using Sonic Pi again but this time, I am only using one sample. By using different musical concepts within the Code, it maintains nice musical depth.

https://youtu.be/V9cgje_Kxk4?t=521
Simple Responsive Personal Website
Tags: html, css, javascript
Published: 2020-01-04 00:35:57

---
title: Simple Responsive Personal Website
published: true
description: 
tags: html, css, javascript
---

Inspired by so many personal websites out there, I wanted to create one for myself. But first I decided to do it for my sister, since she was looking for a job at the moment, so I thought it would be nice and might help her. Now I wanted to share my work with you and hopefully help someone else :)

To be honest I spent quite some time brainstorming about which set of technologies to use. Countless frameworks and libraries were waiting for me to choose them, but I decided to go hard with pure HTML, CSS and a little bit of JavaScript.

You can check the initial version [here](http://ljubicasimonova.com/). It is a simple responsive layout with timeline section. 

Of course there are a lot of improvements to be done, specifically with the media queries on the breakpoints. I already added some todos on the [github repo](https://github.com/rahilka/personal-website) about adding some cool CSS features, maybe some animations or parallax effect.

If you find some piece of code useful, feel free to use it for your own projects. Or even customize the page with few changes in colors, some animations and voila - you have your own personal website!

So what are your thoughts, what could I do better? I would like to receive as many feedback as possible, so don't hesitate to comment below.
How to view Spark History logs locally 
Tags: logs, spark, sparkhistory, tutorial
Published: 2020-01-04 00:28:01


---
title: How to view Spark History logs locally 
published: true
description: How to view Spark History logs locally when using ephemeral clusters. This can be used for hisotrical performance analysis. #spark #spark-history-server
tags: Logs, Spark, sparkhistory, Tutorial
canonical_url: https://anilkulkarni.com/2019/06/how-to-view-spark-history-logs-locally/
---

How to: View Spark History logs locally
=======================================

Spark History logs are very valuable when you are trying to analyze the stats of a specific job. When in cases where you are working with a large cluster , where multiple users are executing jobs or when you have an ephemeral cluster and you want to retain your logs for analysis in future, here’s a way to do it locally.

How do you analyze the spark history logs locally?

Download logs from Spark History Server
---------------------------------------

The most important thing here and the first step is to download the spark-history logs from the UI before your cluster goes down.

![Spark History Server](https://i1.wp.com/anilkulkarni.com/wp-content/uploads/2019/06/null.png?resize=624%2C116&ssl=1)Spark History Server



Setup Spark History Server Locally
----------------------------------

Below steps would help in setting the history server locally and analyze the logs.

1. On a MacOs : `brew install apache-spark`
2. Create a directory for the logs.
3. Move the downloaded logs in the previous step to the logs directory and unpack them.
4. Create a file named `log.properties`
5. Inside log.properties, add `spark.history.fs.logDirectory=<path to the spark-logs directory>`
6. Navigate to `/usr/local/Cellar/apache-spark/<version>/libexec/sbin`
7. Execute `sh start-history-server.sh --properties-file <path to log.properties>`
8. Navigate to <http://localhost:18080> on browser.

Now you can view and analyze the logs locally.

The post [How to view Spark History logs locally](https://anilkulkarni.com/2019/06/how-to-view-spark-history-logs-locally/) appeared first on [Anil Kulkarni | Blog](https://anilkulkarni.com).
Install NodeJs on Raspberry Pi
Published: 2021-11-19 17:29:37

---
title: Install NodeJs on Raspberry Pi
published: true
date: 2020-01-04 00:00:00 UTC
tags: 
canonical_url: https://www.weckmann.me/posts/install-nodejs-on-raspberry-pi/
---

Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine. NodeJs is an increasingly popular language for developers across the board. Let’s cover how to install NodeJs on the Raspberry Pi.

To start off we need to add the NodeJs repository to your Pi’s list. Run this command:

```
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -

```

This will enable the repository. Once it’s enabled you can install NodeJs and NPM with this command.

```
$ sudo apt install nodejs

```

This will take awhile to install, once it’s done test it with this command:

```
$ node -v

```

To check NPM run this:

```
$ npm -v

```

* * *
 

[Reply via email](mailto:arpitbatra123@gmail.com?subject=Reply:%20Install%20NodeJs%20on%20Raspberry%20Pi)
Grumpy cat rotating cube / Codepen
Tags: css, codepen, webdev, animation
Published: 2020-01-03 23:39:48

Inspired by https://dev.to/justaashir, I've decided to share a Codepen I've made some time ago. So far, it's the only Codepen I've created ;). I created it to better understand how to create 3D elements in CSS. Enjoy.

{% codepen https://codepen.io/dzajew/pen/GMVYrd %}
Building a Search Engine of Good.
Tags: webdev, productivity, startup, help
Published: 2020-01-03 23:24:50


Let me preface this post with the following. Growing up I was never a "writer" in any way. I have many strengths but the ability to write was never one of them. In fact, it wasn't until this past year where I forced myself to not only write about the projects I am working on but to do it in a way that is entertaining and concise. 

To begin, Searcha. is a search engine just like Google or Bing. Our business model is the same, however, instead of money going into corporate pockets, it goes to local charities all across the world. In fact, Searcha. is owned by a 501(c)3 nonprofit organization!

Unlike most search engines, Searcha. doesn't track nor log your searches. We believe in total privacy now and forever.  

Searcha. is intended to be a community. A place where everyone has a seat at the table to bring about a positive difference. A search engine by the people, for the people. No matter your area of expertise.

I need help now. I have gotten the engine running but the design is mediocre at best and a few final things are needed such as a chrome extension, final syndication integrations, and a mobile app in the future. These final little things are over my head so I figured id put my community idea to the test and see if I can gather a few developers, designers, and fans.

I also considered making a series talking about the founding of this project and to keep the community up to date about what's going on in its development. Let me know what you think of this project and if you want to be a part of this movement, then we will love to have you!

You can check it out here: https://searcha.org
I just tried Stackbit (JamStack)
Tags: javascript, beginners, gatsby, todayilearned
Published: 2020-01-03 23:14:28

https://www.stackbit.com/
Took me less than five minutes to get a website started. With about 30 minutes of work, this is what it looks like right now. 
https://agriprohub-fb089.netlify.com/

Jamstack is truly the future. This was done with Zero code. 
It automatically created a git repository, set up my netlify cms (you can use contentful if you prefer that), run build time on netlify host, I chose Gatsby as my site generator( i love gatsby)

Anyone here tried Stackbit? Would love to get your thoughts.
I created my first #PHP video series
Tags: php, mysql, pdo, youtube
Published: 2020-01-03 22:57:33

---
title: I created my first #PHP video series
published: true
description: A step by step guide building a php contact form using phpmailer, MySQL and PDO
tags: php, mysql, PDO, YouTube
cover_image: https://thepracticaldev.s3.amazonaws.com/i/n87x3hzce6vsxwvyvrts.png
---

I created an in depth #PHP video series (available for free) https://youtu.be/bCmLkXQNnAA

I would greatly appreciate feedback on how to improve the format. I never realized how difficult it is to talk and type at the same time.
Blazor, a good bye from Dot Net developers to JS Frameworks?
Tags: webdev, dotnet, csharp
Published: 2020-01-03 22:39:54

I’ve been a Dot Net developer for quite some time and in recent years I’ve seen the buzz of the appearance of Front End Frameworks like React, Angular, Vue, etc.

As you might agree, the current trend for us as developers is to become full-stack. If you’re a backend dev, it could be challenging to keep up with learning JS frameworks. So, when I heard about Microsoft releasing this new member of the ASP.NET family named Blazor I felt really excited.

In the next section I’ll try to give an overview of what is Blazor about.

#What is Blazor?#
Blazor is a front-end development framework that uses C# instead of JavaScript.
With Blazor you’re able to create an app composed by reusable components implemented using C#, HTML and CSS.
It allows you to write client side application code with C# without having to rely on JavaScript like we do with Jquery, React, Angular, Vue, etc. So we basically use C# to write client and server code.

#How Blazor can run client-side C#?#
Blazor comes in two flavors:

*Blazor Server (supported in ASP.Net Core 3.0)

With Blazor server, the components are processed in the server not in the client. The UI updates and client events are managed/handled by a mechanism that uses a SignalR connection to work.

*Blazor Web Assembly (still on preview for ASP.NET Core 3.1)

The client side C# code is run directly on the browser by using Web Assembly.

#Javascript interoperability#
Something that I found very interesting is that if you need to access JavaScript libraries or interact with the browser APIs you can call JavaScript code from C# and vice versa.

#What do I need to get started with Blazor?#
You need to install the latest .NET Core 3.0 SDK release.

If you’re using Visual Studio, you only need to follow the process to create a new Project, select Blazor App and then choose the Blazor Server App Template.

If you want to use the .NET Core CLI you can use the following command:

dotnet new blazorserver -o WebApplication1

As mentioned in previous sections, only Blazor Server is supported on .NET Core 3.0. If you want to work with Blazor Web Assembly you need to install .NET Core 3.1 Preview SDK.

#Blazor Server Template example#

I created a [repo](https://github.com/RaulAguilera/BlazorServerTemplate.git) that contains an empty Blazor Server project just to give you an idea of how it looks like. It was created with Visual Studio using the Blazor Server App template.

Blazor is still on its early steps but seems to be a very promising approach for backend developers that are already familiar with C# so they can move to the Front End side of development without having to learn a JS framework.

Do you think Blazor will help Dot Net developers forget about learning JS Frameworks ?. Please let me know what you think in the comments section.
Code Challenge #4 | Stripe + NextJS | Change the price of the book
Tags: challenge, javascript
Published: 2020-01-03 22:30:18

## Challenge

Using the next starter project as a guide, can you change the price and image of the book?

[Solve the challenge on CodeSandbox](https://codesandbox.io/s/tgc-challenge-04-2vy3w)

**Remember**

To edit the sandbox you'll need to fork it, in order to work you must add [CodeSandbox](https://codesandbox.io/docs/secrets) secrets with your Stripe's test keys. The name of the env variables is STRIPE_PUBLIC and STRIPE_SECRET.

## Solution

You can send your solutions and request any help by reaching us via twitter to [@thatgoodcompany](https://twitter.com/thatgoodcompany) or via email to [contact@thatgoodcompany.com](mailto:contact@thatgoodcompany.com).
Tutorial: Elasticsearch + search_flip in Rails
Tags: elasticsearch, rails, beginners, searchflip
Published: 2020-01-03 22:23:23

I would like to introduce the [search_flip gem](https://github.com/mrkamel/search_flip) for easy integration with Elasticsearch.

I wrote, for beginners, an article where I've described in detail step by step how to use the search_flip gem in Rails application.

https://medium.com/@vermaxik/searchflip-tutorial-how-to-integrate-easy-elasticsearch-to-rails-project-37b1f708c004
An adventure is about to begin
Tags: entrepreneur, ecommerce, design
Published: 2020-01-03 22:17:45

Today marks the beginning of a great adventure: **FlinchNot is launching**!

FlinchNot is an ecommerce platform that allows entrepreneurs to create and grow their online stores. The platform allows the creation of highly customizable online stores through an intuitive interface.

# FlinchNot?
> **flinch**
> *(noun)*
> make a quick, nervous movement as an instinctive reaction to fear, pain, or surprise.

Being an entrepreneur and starting any entrepreneurial activity takes courage. There are a zillion reasons why not to start a business. Before starting a business, one may think:
> Why take the risk of starting this business and make sacrifices while I could just enjoy my current situation?

> My idea is not so original after all...

> What prevents big companies to just replicate my idea and crush me if it ever gets successful?

All of these questions and doubts constitute the building blocks of the **flinch**. Unfortunately, too many entrepreneurs fall into the flinch and discard their ideas and dreams out of these fears.

At FlinchNot, we encourage entrepreneurs to fight their fears and doubts: **to Flinch Not**. Truth is that entrepreneurship is not an easy journey. It takes dedication, courage, patience and multiple trials. The reality is that most eCommerce websites will not see a profit.

Despite all of this, we are positive that this journey will allow you to grow and learn new things. Creating an online store teaches about product development, branding, marketing, customer support, employee management... Starting an eCommerce business is first an investment in you.

# Whats makes FlinchNot different?

Many eCommerce platforms exist and allow you to create your online store.
What makes FlinchNot unique is our focus on the follow points:
* **Provide a fully featured platform:** With FlinchNot, you will have a fully working online store without having to install buggy external apps  and plugins that cost you more money, effort and slow down your store. All features are seamlessly integrated to the platform.
* **[Mobile-first eCommerce](/mobile-ecommerce):** 64% of ecommerce traffic is made through smartphones. All of FlinchNot templates are responsive making them work effectively on any devices.
* **Give you as much customization control as possible:** With our unique point and click technology, you can customize all elements of your online store without writing a single line of code.
* **Fast loading speeds:** We rely on the latest technologies and best practices to make you online store load at lightning speed!