background preloader


Facebook Twitter

Managing .env variables for provisional builds. When developing web applications by using Create React App, developers get NODE_ENV=development on their local environment and NODE_ENV=production on the production build by default.

Managing .env variables for provisional builds

And, modifying NODE_ENV is forbidden. According to the Create React App, this is an intentional setting to protect the production environment from a mistake/accident deploying. You will be able to see scripts like below in package.json after creating your web app. If you create or already have .env.development and .env.production in the root of your project, these files will be used for running each script. npm start will pick up .env.development, and npm build will use environment variables in .env.production.

-What if you want to setup .env.staging? This article will show you how to manage environment variables for provisional builds. Web server basics (1): HTTP and sockets. Say we have some HTML: <html><body><h1>Hello world!

Web server basics (1): HTTP and sockets

</h1></body></html> And say we'd like to be able to render this page in a web browser. If the server is hosted locally we may want to enter localhost:9000/hello-world.html in the address bar, hit enter, make a request (done by the browser), receive a response (sent by some server), and render the result (done by the browser). Here is a minimal, often incomplete, and unsafe Node.js program (about 100 LoC) that would serve this (code available on Github): So what's going on?

Social Network for Developers. Angular : Les resolvers. En Angular il existe un type de services que je n'ai pas vu dans beaucoup de projets, framework, etc : les Resolvers.

Angular : Les resolvers

Au départ il est assez compliqué de comprendre l'intérêt d'un resolver qui semble à peine faire quelque chose de plus que le simple service qui discute avec un serveur distant. Il semble même faire moins puisque dans les cas basiques il ne fait qu'appeller d'autres services. Number Truncation in JavaScript. Use Math.trunc() to truncate a floating point number and return its integer part.

Number Truncation in JavaScript

This function doesn't do any rounding, it simply removes all the digits following the decimal. Now you have a whole number, yay 🎊 const number = 80.6 // Old Waynumber < 0 ? Math.ceil(number) : Math.floor(number);// 80 // ✅ES6 Wayconst es6 = Math.trunc(number);// 80 Example Math.trunc() simply truncates (cuts off) the dots and the digits to the right of it. Laravel: 12 tips to optimize performance – Michail Athanassiadis. Since appearing in 2011, Laravel has become a very popular option to develop business-focused applications including information management systems (often referred to as business information management systems). and e-commerce platform.

Laravel: 12 tips to optimize performance – Michail Athanassiadis

Debugging a Node.js Express API in VSCode Debugger. Why When we create software, we rarely do it without errors.

Debugging a Node.js Express API in VSCode Debugger

API creation isn’t exempt from this fact, so sooner or later we are in the position to debug it. Activer le keybinding de Vim dans Zsh. J'ai enfin trouvé la réponse à une de mes vieilles questions !

Activer le keybinding de Vim dans Zsh

Est-ce qu'il y a une façon simple (des raccourcis claviers ou commandes) pour se déplacer et éditer mes lignes de commandes dans zsh ? Ma problèmatique est la suivante : c'est souvent galère d'éditer une ligne de commande. Et plus la ligne est longue plus c'est galère. A tel point que souvent je préfère retaper la ligne complète pour y apporter mes quelques petites modifications. J'avais déjà fait des recherches sur le sujet mais rien de probant. Aujourd'hui j'ai la réponse et la réponse est oui, mais vous l'aviez sans doute déjà deviné avec le titre. Docker, Nginx & Letsencrypt: Easy & Secure Reverse Proxy. Go into the sites-enabled directory, and enter the following command: ln -s ..

Docker, Nginx & Letsencrypt: Easy & Secure Reverse Proxy

/sites-available/plex.conf . How to forward my local port to public using localtunnel. Create A Dark/Light Mode Switch with CSS Variables. Giving your users a way to customise the interface to their preference is a huge win for user experience.

Create A Dark/Light Mode Switch with CSS Variables

Here we are going to provide the user with a simple switch to toggle between dark mode and light mode and we will also try to remember their preference for future visits. Let's begin! If you don't have a website of your own to which you wish to add this functionality, use this demo website to follow along. We will be adding CSS custom properties also known as CSS variables, which we can reference and modify throughout the document. If you wish to read more about custom properties you can read on MDN. Custom properties (sometimes referred to as CSS variables or cascading variables) are entities defined by CSS authors that contain specific values to be reused throughout a document. Short Circuiting in Bash. Securing your Kubernetes Deployment – Haytham Elkhoja. Written by Chandni Vaya.

Securing your Kubernetes Deployment – Haytham Elkhoja

Peer reviewed and contribution by Haytham Elkhoja. In case you haven’t heard, Kubernetes is a big deal. It allows orchestrating the deployment and lifecyle of your applications running on containers. Best productivity tools for your dev life. In modern times, our lives have certainly become a bit more... dynamic. Some might say its good, some that it's bad - I don't really know or care. One definitive thing, that I think we should all agree on is, that this dynamic lifestyle, just like dynamically-typed programming languages, have a bit higher level of error-proneness ⛔. But, talking in pure English, this velocity in a very notable degree commits to us making more and more errors and mistakes in everyday tasks - forgetting stuff, misreading, postponing, etc.

(READ ONLINE) The Devops 2.0 – Danny. [PDF DOWNLOAD] The Devops 2.0 Toolkit: Automating the Continuous Deployment Pipeline with Containerized Microservices Full Ebook By Viktor Farcic DOWNLOAD NOW !!! Click Link >>> Book Descriptions:This book is about different techniques that help us architect software in a better and more efficient way with microservices packed as immutable containers, tested and deployed continuously to servers that are automatically provisioned with configuration management tools. It’s about fast, reliable and continuous deployments with zero-downtime and ability to roll-back.

Redis connection pool with golang – Rahasak. Redis connection pool There are some concerns when using redis with multi threaded environment. Redis connection is single threaded. Let’s Go – Supun Muthutantrige. Create an Awesome REST Api endpoint in Go Go is build upon the DRY (Don’t Repeat Yourself) principal, with the mission to facilitate clean code. Functions are the basis which allows code reuse, next is Packages. Packages organize related files into modular units, which allows re-usability. SSH simplified using SSH Config – Tarka Labs Blog. By now you know the how powerful SSH is, here I will show you how you can make use of ssh config instead of the command-line flags, to simplify your life.

This is especially useful if you use ssh frequently to connect to multiple servers. Xdebug with PHPstorm + docker + macOS – Autotrader & Carsguide Engineering. 20 Docker commands use cases for developers – Pixel Point. Technology is most effective when you know how to work with it; bear this in mind when you work with Docker. Teams adopting Docker for the first time typically do so on the recommendation of Devops. Devops cannot always explain, however, how the new team should use it without risking the benefits of their existing system. Here, you will find developers use cases for specific commands, explanations of what they do, and demos. Docker — En las entrañas de una imagen – Andres Garcia Burgos. En esta oportunidad vamos a ver que es una imagen de docker pero a nivel de archivos en nuestro sistema, una imagen es un archivo tar que contiene archivos tar, cada uno de estos archivos tar es una capa.

Vamos a empezar trabajando con la imagen busybox que es una distribución de Linux muy pequeña. Creating Elegant Pipelines — How to Set up Jenkins Blue Ocean with Docker. Part1: A step by step guide to setting up Jenkins Blue Ocean With Docker Jenkins Blue Ocean is just a new elegant UI to the classic Jenkins. Even though Jenkins is extensible and robust, But Its poor user experience is criticized a lot. HTTP load balancing using Nginx – Tas Nuva. A Gentle Introduction to Divide and Conquer Algorithms. Mount SSL certificates in Kubernetes Pod with Secret. Blog Reader Blog - Run your tests with git hooks. Be careful about nil check on interface in GoLang. Nil check is frequently seen in GoLang code especially for error check since GoLang's special error handling convention. In most cases, nil check is straight forward, but in interface case, it's a bit different and special care needs to be taken. Take a look at below code snippet and guess what the output will be. Les fat arrow function en Javascript.

Autre nouveauté apportée par ES2015, les fat arrow functions n'en ont pas l'air mais constitue un gros changement dans notre façon de développer. Si nous voulons être très grossier dans notre explication — mais cela donnera une base à notre article — nous pouvons dire que les fat arrow functions sont une nouvelle façon d'écrire les fonctions anonymes. Minikube in Hyper-V with nested virtualization – Marcelo Schirbel Gomes. Loop invariants can give you coding superpowers · YourBasic. Turn Your Code into Docker Images with Cloud Native Buildpacks.

Selenium Features - Msys Training. QuickTip : Why is my disk usage steadily growing when using docker? Maitriser les tableaux en Javascript (FP) Destructuring in Javascript. Node.js process errors are broken – ehmicky. Running VSCode in Docker. Don’t Make This Mistake When Using Docker Volumes! – Winston Kotzan. Creating a Linux service with systemd – Benjamin Morel.

Setting up a Kubernetes lab with Rancher — Part 1 Setting up the Host. Programmation fonctionnelle avec Haskell. Apache web server bug grants root access on shared hosting environments. Banish the with Unifont – Terence Eden’s Blog. Using doctrine entity inheritance mapping in symfony. From events to Grafana annotation – Contentsquare Engineering. Troubleshooting DNS over HTTPS – Nykolas Z. Open source tools in 2019 – Docker Turtle. Set up Uptime Monitoring with Kibana, Heartbeat and Slack (Part 1) Handling simultaneous requests in a Node.js microservice. Making A Switch In CSS. Srgank/SQLite-New: Browser for SQLite database files, open source tool. Setup Chained Jenkins Declarative Pipeline Projects with Triggers. Type-Safe Web Components with JSDoc. Nefe/You-Dont-Need-jQuery: Examples of how to do query, style, dom, ajax, event etc like jQuery with plain javascript.

Setting up kubernetes cluster on raspberry pi – Sonu Jose. A Website for HTTP Status Codes : programming. Borrowing React concepts to build a Koa.js microservices framework.