Code πŸ’»

Tips πŸ’‘ and snippets of code that I found useful.

Path to node package module

A simple and clean way to direct with a path to a package from node module.

Laravel - Paginate with Array

A simple code to use when paginating with Laravel.

Filter / Organize array into key, value pairs for twig

Twig may be slightly tricky in handling data. I documented how to organize and filter array into key, value pairs for twig.

Uninstall & install new PHP version

Installing (and uninstalling) new PHP version was always a trouble. This time, I found a proper way to handle this.

Quick explanation of Webpack β€’ Babel β€’ Terser β€’ Prettier β€’ ESLint

Stop or pause video embedded in iframe

Updating nginx file to redirect index.php to /

Redirect index.php to home

Smooth Scrolling

Code for smooth scrolling with JavaScript

How to stop or pause video embedded in iframe

Stop or pause video embedded in iframe

Installing Tailwindcss with Parcel for basic html template

Sometimes, we want to build a website using just HTML, CSS and JavaScript. But what if, you want to use Tailwindcss as well..?

Configuring Prettier in VSCode

Things you might have to do in order to have Prettier work in VSCode properly.

How to remove files that are in .gitignore but still in the git repository

Removing those pesky files that I forgot to remove from the repository but are already in GitHub.

How to add or remove classes from HTML element

Or even toggle if necessary.

Building custom button with Redactor API

Redactor is a powerful WYSIWIG editor in Craft CMS. What makes it more powerful is that you can customize it βš™οΈ

Installing Jest & Enzyme with React

Setting up to use Jest & Enzyme to test React Components.

Using Angular 9 + Tailwind CSS

Configuring Angular to be used with Tailwind CSS.

Fixing file_get_contents SSL errors & using Laravel Valet

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1 ...

Redirecting WordPress Pages

Quick fix for solving any pages that are created with assets, authors, category, tag , taxonomy which affects SEO.

setIPAddress in eTapestry

Using setIPAddress method for IP fraud check with eTapestry.

Form Validation in html

A good tip with form validation not working with onSubmit function on form element.

Installing ngrok on MacOS

Instructions on installing ngrok to MacOS

Updating a forked repository to the original repository.

Simple guide to updating the forked repository to the original one.

Adding Google Analytics to React Application

A simple way to add google analytics code to React App.

WordPress CMB2 Plugin

Simple code which helped me create a metabox with plugin: CMB2 in WordPress.

Using SCSS files with React

With simple steps, you can use powerful SCSS with React βš›οΈŽ

Installing node with nvm

A proper way to install and updating node.

Deploying React project to GitHub Pages

Documentation of how to publish React βš›οΈŽ project to GitHub Pages πŸ–₯

Invely's