Posts
How to keep Flywheel Local and your repository separated using symlinks
Since a while, I have been using Flywheel’s Local for my local WordPress development server and it has been. No time spend on configuration Docker, Apache, database connections, et cetera.
However, one thing that has been bugging me is the question of how to combine Local’s configuration and my own code, which contains my WordPress themes and plugins. As Local creates its own WordPress folders (wp-content etc.) inside its configuration folders, how should I approach such a situation?
Posts
Force HTTPS on your WordPress website
You have finally installed that SSL certificate to your website and now the website keeps hanging in an unsafe http connection. What is up with that?
To force a HTTPS connection, we only have to add some lines to the .htaccess file, which is located in the root of the public html folder of your WordPress website:
.htaccess is located in the public html folder of your WordPress website, which is the same folder that contains the wp-admin, wp-content, and wp-includes folder.
Posts
Update Azure Alert Rule Condition Query
For a lot of people probably a piece of cake, but I had to look a while before I could find it.
In Azure Portal, go to Alerts.
Go to Manage alert rules.
App names are hidden because of privacy reasons
Go to the application for which you want to edit the query.
Click on the condition whose query needs to be edited.
Posts
Add and display a setting to your Wordpress child theme
My client asked me to show a short message above every page and post and wished to be able to modify this text himself through the theme customizer.
Now, this is not too hard and I have done it multiple times before, but I keep forgetting the specifics. This post is therefore meant as a quick cheatsheet for myself, but maybe it will help you, anonymous internet user, as well.
Posts
Combine custom post types in one blog page
If you, like me, are using Pods image/svg+xml to create custom post types, you might have noticed that the post types created using Pods do not appear on your blog page by default. This is because Wordpress only queries posts with the post type post by default.
Now, you may not even want to display your pods on the blog page, but if you do, there are several ways to do this (and the choice is yours).
Posts
phpMyAdmin - Error | Incorrect format parameter
If you are ever trying to import a (large) existing database through phpMyAdmin and you are getting the following error, you might want to check your php.ini file.
\# File: php.ini memory\_limit = 256M post\_max\_size = 128M upload\_max\_filesize = 128M max\_execution\_time = 600 max\_input\_time = 600 Try increasing the values image/svg+xml of the configuration variables until you get successful results.
If you are using Docker to boot up your phpMyAdmin instance, you might also want to check the UPLOAD_LIMIT environment variable in your docker-compose.
Posts
Typescript module resolution for test files in VS Code
In a Typescript project I am working on, I use tsconfig’s paths property to create local modules that I can refer to in the project’s import without having to type a long relative directory.
E.g. Instead of typing:
import { module } from '../../../modules/module'; I want to type:
import { module } from '@modules/module'; To accomplish this, I have added the paths property to my root-level tsconfig.json file:
// Root-level tsconfig // File: .
Posts
Quickly remove unwanted IDs in JSON
I am currently duplicating entities through an API and there is no duplicate feature yet. Therefore, I am copying the JSON output of an entity and using the POST method of the API to re-create it with a different ID. In order to avoid errors, I have to delete all IDs from the JSON. To do that, I have found a regex that helps me find all the "id": "{guid}" combinations that I can then replace with an empty string using VS Code or Notepad++.
Posts
SyntaxError: Cannot use import statement outside a module
For the secret game I am developing, I needed a database to store User and Profile data. The game’s backend server is developed using Node.js and Typescript, and to simplify connecting to the MySQL database, I wanted to use TypeORM.
TypeORM is awesome. Previously, I had to create the database from scratch and I connected to the database directly and subsequently executed carefully prepared sql queries with parameters. With TypeORM I can specify entities, add columns with specific qualities.
Posts
How to make an Azure Function App read Secrets from a Key Vault
1. Make sure the function app has a managed identity Go to your Azure Function App and then go to Settings > Identity. Switch the status from off to on.
Enabling System assigned managed identity in the Azure Function App
2. Create a Secret in the Azure Key Vault Go to your Azure Key Vault and then go to Settings > Secrets. Click + Generate/Import.
Navigating towards Secrets in the Azure Key Vault