Which is the best Laravel cache driver for performance?

The Laravel cache can bring speed improvements to your web application. I compare the speed of each Laravel cache driver to see which is the best for performance. If you’re looking to improve the performance of your Laravel web application, then implementing a cache layer could be a good option. As a very high-level overview, using a cache allows data to be stored and then quickly retrieved. Common use cases include replacing slow or repetitive Read more

Разбираем x.509 сертификат

Для начала рассмотрим вариант самоподписанного сертификата корневого уровня.Для упрощения задачи сгенерируем сертификат, который будет содержать только необходимые параметры: Версия сертификата Серийный номер Алгоритм подписи Сведения об издателе Дата начала действия сертификата Дата окончания действия сертификата Сведения о владельце Открытый ключ Сделать это можно с помощью библиотеки Bouncy Castle, следующим образом: private void button1_Click(object sender, EventArgs e) { var KeyGenerate = new RsaKeyPairGenerator(); KeyGenerate.Init(new KeyGenerationParameters(new SecureRandom(new CryptoApiRandomGenerator()), 1024)); AsymmetricCipherKeyPair kp = KeyGenerate.GenerateKeyPair(); var gen = new Read more

CORS request external redirect not allowed

The CORS request was responded to by the server with an HTTP redirect to a URL on a different origin than the original request, which is not permitted during CORS requests. For example, if the page https://service.tld/fetchdata were requested, and the HTTP response is «301 Moved Permanently», «307 Temporary Redirect», or «308 Permanent Redirect» with a Location of https://anotherservice.net/getdata, the CORS request will fail in this manner. To fix the problem, update your code to Read more

Install Node.js 10,12 LTS on Ubuntu 19.04/18.04/16.04 & Debian 10/9/8

Welcome to our guide on how to install Node.js 10|12 LTS on Ubuntu 18.04 / 16.04 / Debian 10/9. Node 10 became LTS version starting from Node v10.13.0. This LTS release of Node (Dubnium) will be supported until April 2020. Node.js 12 will enter LTS state on 2019-10-22 and this is expected to reach EOL on 2022-04-01. Installing Node.js 12|10 LTS on Ubuntu 19.04/18.04/ 16.04 & Debian 9 Node.js is a JavaScript runtime built on Read more

WSL — How to run command as root?

Turns out there’s another command simply called wsl that lets you run arbitrary commands as arbitrary users: >wsl -u root -d Ubuntu-18.04 -- echo "I am g$USER" I am groot N.B. you need to use separate args (instead of a string) for this one. -d is optional. You can change the default distro like wslconfig.exe /l wslconfig.exe /s Ubuntu-18.04 wslconfig.exe /l wslconfig /l appears to be equivalent to wsl --list

UUID or GUID as Primary Keys? Be Careful!

I just read a post on ways to scale your database that hit home with me — the author suggests the use of UUIDs (similar to GUIDs) as the primary key (PK) of database tables. Reasons UUIDs are Good There are several reasons using a UUID as a PK would be great compared to auto-incrementing integers: At scale, when you have multiple databases containing a segment (shard) of your data, for example a set of Read more

Stop using git pull for deployment!

The problem You have a Git repository containing your project. You want to “deploy” that code when it changes. You’d rather not download the entire project from scratch for each deployment. The antipattern “I know, I’ll use git pull in my deployment script!” Stop doing this. Stop teaching other people to do this. It’s wrong, and it will eventually lead to deploying something you didn’t want. Deployment should be based on predictable, known versions of Read more

Ansible git add, commit and push. The missing piece in your pipeline.

As Network Automation Engineer I had to deal with complex CI/CD workflows for provisioning and maintaining multi-brand networks made up of hundreds of networking devices. In most cases (read — always) the CI/CD pipeline does template rendering, device configuration backups and collects pre and post check tests. While I could see the satisfying pipeline results via AWX (the Ansible Tower community version) I had to dig into the Docker containers in order to extract the Read more

How to Notify of Bamboo Deployment Status via Telegram

When developing the project, we prefer using messengers to simplify communication between team members. Which one do we use on a daily basis? This is Telegram which is considered to be the safest and most user-friendly messenger. It’s private enough, as all messages are encrypted, and compatible with all platforms. Besides, there’s a flexible API for creating bots that factored our decision to choose Telegram. In fact, the most projects we deal with are connected Read more

Zero-downtime deployment with Docker

In this post I will share the process we went through at PerimeterX while searching for ways to speed up our main application deployment, with no downtime. Background Our environment is based, in large part, on Docker containers. We have a dynamic number of front-end CoreOS machines; each includes an HAProxy container and a few instances of our main application. Every application instance is a Docker container as well. Just for easy reference in this Read more


Любишь мемасики?

Подпишись на мой телеграм-канал!

Открыть
Закрыть