Thursday, 7 October 2021

header image
Recent
  • Shopware 6 Cheat Sheet - Open cookie settings again Create a custom link with target /cookie/offcanvas To open the canvas in the correct language, use e.g. /en/ as link prefix Reverse proxy mixed content error ERROR: Mixed Content: The page at 'https://domain.de/admin' was loaded over HTTPS, but requested an insecure stylesheet 'http://domain.de/bundles/administration/static/css/vendors-node.css?162460877615569'. This request has...
  • Ubuntu increase SWAP file - From https://askubuntu.com/a/1066362 sudo swapoff /swapfile sudo fallocate -l 8G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile Verify: sudo swapon --show Make permanent: echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
  • The Docker Compose Cheatsheet - 3. Volumes Mounting volumes is essentially required but can cause insane performance issues. Therefore it is very important to configure them correctly to prevent bottlenecks. This issue affects mainly Docker for Mac and Docker for Windows as Linux hosts can mount paths “more natively” into the container. With the following...
  • Nativescript: Gradle build failing from commandline - Cause of the issue: Licenses not accepted To solve the issue: Opt-in: Android Studio > Sdk Manager > SDK Tools > Android SDK Command-Line Tools (latest) Run: ~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses Confirm all prompts with y to accept
  • Install JDK on macOS 10.7+ - Requirements: Homebrew 1. Install your favorite JDK version brew tap adoptopenjdk/openjdk brew cask install adoptopenjdk8 brew cask install adoptopenjdk9 brew cask install adoptopenjdk10 brew cask install adoptopenjdk11 2. Add to your .bash_profile or .bash_rc or .zshrc … Adjust adoptopenjdk-8.jdk depending on your installed version. export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home 3. Finally Run source...
Shopware 6 Cheat Sheet

Shopware 6 Cheat Sheet

Open cookie settings again Create a custom link with target /cookie/offcanvas To open the canvas in the correct language, use e.g. /en/ as...
Ubuntu increase SWAP file

Ubuntu increase SWAP file

From https://askubuntu.com/a/1066362 sudo swapoff /swapfile sudo fallocate -l 8G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile Verify: sudo swapon...
The Docker Compose Cheatsheet

The Docker Compose Cheatsheet

3. Volumes Mounting volumes is essentially required but can cause insane performance issues. Therefore it is very important to configure them correctly to...
Nativescript: Gradle build failing from commandline

Nativescript: Gradle build failing from commandline

Cause of the issue: Licenses not accepted To solve the issue: Opt-in: Android Studio > Sdk Manager > SDK Tools > Android SDK...
Install JDK on macOS 10.7+

Install JDK on macOS 10.7+

Requirements: Homebrew 1. Install your favorite JDK version brew tap adoptopenjdk/openjdk brew cask install adoptopenjdk8 brew cask install adoptopenjdk9 brew cask install adoptopenjdk10...
htaccess force SSL/HTTPS

htaccess force SSL/HTTPS

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Permanent 301 Temporary 302
htaccess for Angular 2+ (probably other JS) apps

htaccess for Angular 2+ (probably other JS) apps

allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.html [L]...
Laravel: Generate IDE helpers

Laravel: Generate IDE helpers

Add a composer command in the scripts section, so you can run composer run laravel:helper to update all Laravel IDE helpers: "scripts": {...
Ubuntu adjust scrollbar thickness

Ubuntu adjust scrollbar thickness

https://superuser.com/questions/1272428/how-do-you-configure-the-appearance-of-scrollbars-in-firefox-57/1273053#1273053
Docker for Mac: Limit memory allocation

Docker for Mac: Limit memory allocation

The Docker for mac GUI does not allow to configure less than 1GiB as allocated memory. In some cases you might want to...
SSH generate secure RSA key

SSH generate secure RSA key

ssh-keygen -t rsa -b 4096
Fix ^ and < swapped keys in macOS

Fix ^ and < swapped keys in macOS

1) Delete /Library/Preferences/com.apple.keyboardtype.plist 2) Reboot
WordPress htaccess config

WordPress htaccess config

Default .htaccess entries for wordpress: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}...
Color tools for nice palettes

Color tools for nice palettes

– Generate large palettes iWantHue – Generate default palettes (5 colors) Coolors.co – Find matching colors ColorSpace Adobe Color Wheel
MacOS Terminal colored output

MacOS Terminal colored output

Add to your .bash_profile: export CLICOLOR=1
Individual TSLint rules for subdirectory

Individual TSLint rules for subdirectory

In case you want to have different TSLint rules for a subdirectory, for example a different Angular component selector rule, you just need...
Windows Subsystem for Linux Configuration

Windows Subsystem for Linux Configuration

Add to .profile → cd ~ && nano .profile # Fix unreadable font colors on folders LS_COLORS="ow=01;36;40" && export LS_COLORS # Alias `gohome`...
Better usability for Nextcloud

Better usability for Nextcloud

You need the Custom CSS Plugin: 1) Apps -> Search: “css” -> Install “Custom CSS” 2) Go to Settings -> Design, scroll down...
Partially disable Angular Material animations

Partially disable Angular Material animations

Different options to disable animations of Angular Material:
Webstorm live templates for TypeORM

Webstorm live templates for TypeORM

Fast code generation shortcuts/live templates using with Webstorm/Phpstorm for TypeORM library.
Add basic IDE/Project config to any npm based app

Add basic IDE/Project config to any npm based...

Preconfigures a new npm based project via script
Use “npm install -g” without sudo

Use “npm install -g” without sudo

ONLY TESTED ON MAC OS! Getting rid of always prefixing sudo when installing a global npm package is pretty easy. Just two steps...
Docker VirtualBox host IP

Docker VirtualBox host IP

The VirtualBox uses the static IP address 10.0.2.2 which can be used inside the container to access the host network.
Simple Loading Stack with Ionic 3

Simple Loading Stack with Ionic 3

This is a simple Angular Service which handles multiple ionic 3 loaders at the same time. The most recent loader is displayed on...
Lumen Middleware – JSON + gzip Response

Lumen Middleware – JSON + gzip Response

<?php namespace App\Http\Middleware; use Closure; class responseHeadersMiddleware { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next...
Configure robots.txt

Configure robots.txt

The robots.txt file helps you to determine, which content of your website should be indexed by search engines. Remind that this file is...
ADB not finding device

ADB not finding device

Sometimes the command adb devices does not show up your connected Android device, despite it is wired. Here are some steps that might...
Clipboard Browser API

Clipboard Browser API

Note: The API is still experimental and does not work along all browsers! Tested in current version of Google Chrome Desktop Browser. Write...
Ionic 3 serve browser with livereload

Ionic 3 serve browser with livereload

1. Add code snippet to package.json File: package.json json "browser": "ionic-app-scripts serve --nobrowser --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build", 2. Launch script...
Moment.js drop unused languages

Moment.js drop unused languages

Add plugin to webpack.config.js javascript // Drop unused moment.js languages new webpack.ContextReplacementPlugin( /moment[\/\\]locale$/, /en|fr|de/ ), Read more: – https://webpack.js.org/plugins/context-replacement-plugin/

SSH generate secure RSA key

ssh-keygen -t rsa -b 4096

Individual TSLint rules for subdirectory

In case you want to have different TSLint rules for a subdirectory, for example a different Angular component selector rule, you just need 2 steps to achieve this. Create a tslint.json in your subdirectory root...

Partially disable Angular Material animations

Different options to disable animations of Angular Material:

Simple Loading Stack with Ionic 3

This is a simple Angular Service which handles multiple ionic 3 loaders at the same time. The most recent loader is displayed on top. If it is finished, and other loaders are still pending, the next recent will...

Lumen Middleware – JSON + gzip Response

<?php namespace App\Http\Middleware; use Closure; class responseHeadersMiddleware { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ p...

Clipboard Browser API

Note: The API is still experimental and does not work along all browsers! Tested in current version of Google Chrome Desktop Browser. Write text to clipboard javascript function copyToClipboard(text) { navigato...

Moment.js drop unused languages

Add plugin to webpack.config.js javascript // Drop unused moment.js languages new webpack.ContextReplacementPlugin( /moment[\/\\]locale$/, /en|fr|de/ ), Read more: – https://webpack.js.org/plugins/context...

Create a sidebar layout using Angular Flex-Layout

I remember well the time before flex-layout, when creating a sidebar layout was kind of defeating a monster. But luckily today we have flex-layout at disposual, which made this kind of horror a thing of the pas...

Separate Module for Angular Material Modules

If you are using Angular Material in your website or app, you can create a separate module for importing all material modules separated from your app.module.ts to avoid getting your code unreadable. Be aware, t...

Generate Angular Project using Angular CLI

This commands help you to generate the Angular project in specific cases.

Nativescript: Gradle build failing from commandline

Cause of the issue: Licenses not accepted To solve the issue: Opt-in: Android Studio > Sdk Manager > SDK Tools > Android SDK Command-Line Tools (latest) Run: ~/Library/Android/sdk/cmdline-tools/latest/bin/sdkma...

Install JDK on macOS 10.7+

Requirements: Homebrew 1. Install your favorite JDK version brew tap adoptopenjdk/openjdk brew cask install adoptopenjdk8 brew cask install adoptopenjdk9 brew cask install adoptopenjdk10 brew cask install adopt...

Docker for Mac: Limit memory allocation

The Docker for mac GUI does not allow to configure less than 1GiB as allocated memory. In some cases you might want to configre a lower value, especially when you are limited to available RAM. You can set any v...

Webstorm live templates for TypeORM

Fast code generation shortcuts/live templates using with Webstorm/Phpstorm for TypeORM library.

Add basic IDE/Project config to any npm based app

Preconfigures a new npm based project via script

Use “npm install -g” without sudo

ONLY TESTED ON MAC OS! Getting rid of always prefixing sudo when installing a global npm package is pretty easy. Just two steps are needed.

ADB not finding device

Sometimes the command adb devices does not show up your connected Android device, despite it is wired. Here are some steps that might help to fix the issue. Make sure you have USB-Debugging enabled in your devi...

Ionic 3 serve browser with livereload

1. Add code snippet to package.json File: package.json json "browser": "ionic-app-scripts serve --nobrowser --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/w...

Prettier config

prettier.io – Configuration 1. Install prettier as dev dependency npm install --save-dev --save-exact prettier 2. Create prettier config file File: .prettierrc.json json { "printWidth": 120, "tabWidth": 3...

Web development tool stack

This is a collection of useful tools for any web development project. Can be used as checklist/steps. Setup your user account to install global npm packages without sudo Yarn – package manager Prettier ya...