Skip to content

Instantly share code, notes, and snippets.

View laxmariappan's full-sized avatar

Lax Mariappan laxmariappan

View GitHub Profile
{
// Editor Functionalities
"diffEditor.renderSideBySide": false,
"editor.guides.bracketPairs": true,
"editor.bracketPairColorization.enabled": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontFamily": "JetBrainsMono-Regular, JetBrains Mono Regular, OperatorMono-Book, Liga Roboto Mono, Menlo, Monaco",
"editor.fontLigatures": true,
@felipeelia
felipeelia / elasticpress-remove-some-meta.php
Last active April 6, 2022 19:33
Remove some meta fields from the ElasticPress/Elasticsearch index
<?php
add_filter(
'ep_prepare_meta_data',
function ( $prepared_meta ) {
foreach ( $prepared_meta as $key => $meta_val ) {
// Remove empty meta fields.
if ( empty( $key ) || empty( $meta_val ) || empty( $meta_val[0] ) ) {
unset( $prepared_meta[ $key ] );
continue;
}
@Oceas
Oceas / wds-hello-world.php
Last active June 2, 2023 10:03
WDS WP-CLI 101 Complete
<?php
/*
Plugin Name: WDS Hello World
Plugin URI: https://webdevstudios.com/
Description: Teaching the basics of WP-CLI
Author: Web Dev Studios
Version: 1.0.0
Author URI: https://webdevstudios.com/
*/
class WDS_CLI {
@dorelljames
dorelljames / README.md
Created August 22, 2019 08:58 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@iqbalrony
iqbalrony / custom-css.php
Last active November 22, 2023 11:56
How to add custom css control with elementor free version.
<?php
use Elementor\Controls_Manager;
use Elementor\Element_Base;
use Elementor\Core\Files\CSS\Post;
use Elementor\Core\DynamicTags\Dynamic_CSS;
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
@kibotu
kibotu / workaround.md
Created December 11, 2018 09:12
adb cannot connect to daemon at tcp:5037: Connection refused

lsof -n -i4TCP:5037 | grep LISTEN

kill -9

adb devices

const WordpressPurgeCSS = {
whitelist: [
"rtl",
"home",
"blog",
"archive",
"date",
"error404",
"logged-in",
"admin-bar",
@jalcantarab
jalcantarab / _jsonPuller.md
Last active March 31, 2024 04:52 — forked from crstamps2/jsonPuller
A Google apps script to pull json from a spreadsheet

JSON Puller - Google Apps Script

Transforms the data of a given Spreadsheet Sheet to JSON.

  • The frozen rows are taken as keys for the JSON.
  • The data taken for the values is only that after the frozen rows

Set up:

exportJSON(Spreadsheet) - transforms the data in the given sheet to JSON.

@alcaeus
alcaeus / in_array_vs_isset_vs_array_key_exists.php
Created July 14, 2017 08:39
Performance comparision: in-array vs. isset vs. array_key_exists
<?php declare(strict_types = 1);
function testPerformance($name, Closure $closure, $runs = 1000000)
{
$start = microtime(true);
for (; $runs > 0; $runs--)
{
$closure();
}
$end = microtime(true);
@joshfortyfour
joshfortyfour / block-layout-names.md
Last active March 31, 2024 14:48
List of block layout names in Magento 2 Community Edition
  • absolute_footer
  • accountConfirmation
  • additional.product.info
  • address_book
  • addtocart.shortcut.buttons
  • addtocart.shortcut.buttons.additional
  • adjustments
  • admin.block.customer.grid.container
  • admin.block.customer.grid.export
  • admin.customer.carts