Skip to content

Instantly share code, notes, and snippets.

@yazzou
yazzou / sed 101
Created February 11, 2021 12:33 — forked from worker8/sed 101
Useful sed regex collection
http://sed.sourceforge.net/sed1line.txt
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
@yazzou
yazzou / monitor.sh
Created January 18, 2021 17:36 — forked from artbristol/monitor.sh
inotify watch a directory with timestamps
inotifywait --monitor --timefmt '%F %T' --format '%T %w %e' --recursive $1
@yazzou
yazzou / hooks.php
Created December 23, 2020 19:46 — forked from ibndawood/hooks.php
Electro - Single Product Hooks
/**
* Default WooCommerce Single Product Hooks
*/
/**
* Hook: woocommerce_before_single_product_summary.
*
* @hooked woocommerce_show_product_sale_flash - 10
* @hooked woocommerce_show_product_images - 20
*
* Hook: woocommerce_single_product_summary.
@yazzou
yazzou / readme.md
Created September 25, 2020 09:34 — forked from Ademking/readme.md
💚 Android : How to record events and play them using ADB SHELL

1) Know the event name of touchpad :

Run :

adb shell getevent -pl

Search for : "ABS_MT_TRACKING_ID" - example :

@yazzou
yazzou / latestposts-control.php
Created April 29, 2020 10:16 — forked from danielpataki/latestposts-control.php
Custom Theme Customization Controls
$wp_customize->add_control(
new WP_Customize_Latest_Post_Control(
$wp_customize,
'featpost_control',
array(
'label' => __( 'Select A Featured Post', 'mytheme' ),
'section' => 'header_section',
'settings' => 'featured_post',
'post_type' => 'page'
)
@yazzou
yazzou / README.md
Created April 27, 2020 12:30 — forked from ControlledChaos/README.md
Add styles to the WordPress Customizer that mimics the WordPress admin.

Default Admin Styles for WordPress Customizer

WordPress Snippet - Stylesheet

@yazzou
yazzou / make-elementor-default-editor.php
Created April 20, 2020 13:06 — forked from deckerweb/make-elementor-default-editor.php
Make Elementor the Default Editor, Not the WordPress Editor (Gutenberg or Classic)
<?php
/**
* Make Elementor the default editor, not the WordPress Editor (Gutenberg or Classic)
* Clicking the page title will take you to the Elementor editor directly
* Even non-Elementor-edited pages will become Elementor-edited pages now
* You can revert by clicking the "Back to WordPress Editor" button
*
* Author: Joe Fletcher, https://fletcherdigital.com
* URL: https://gist.github.com/heyfletch/7c59d1c0c9c56cbad51ef80290d86df7
@yazzou
yazzou / admin_sys.md
Created March 26, 2020 06:18 — forked from raphaellarrinaga/admin_sys.md
Bash & admin sys commands
<?php
/**
* Plugin Name: TOPTAL WP-CLI Commands
* Version: 0.1
* Plugin URI: https://n8finch.com/
* Description: Some rando wp-cli commands to make life easier...
* Author: Nate Finch
* Author URI: https://n8finch.com/
* Text Domain: toptal-wpcli
* Domain Path: /languages/
<?php
/**
* Plugin Name: WordPress Importer Post ID Preservation
* Description: When importing posts make sure that post ID from the original site is used on the destination site. This should only be used when first setting up an environment, or if the destination site is not canonical (e.g. a dev or staging environment).
* Author: Weston Ruter, XWP
*/
/**
* Force WordPress Importer to never honor the post_exists() check, since we want to override existing posts.
*