Skip to content

Instantly share code, notes, and snippets.

View andrejIka's full-sized avatar

Andrej B. andrejIka

View GitHub Profile
@andrejIka
andrejIka / mac-setup-redis.md
Last active March 26, 2020 09:36 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@andrejIka
andrejIka / sample.md
Last active July 1, 2021 07:15
Best wordpress project ever

Use

  • custom class for queue
  • custom written wp-object class for caching, use redis
  • OOP - currently not everything is oop, twig not able to oop
  • mariadb
  • purge redis cache on post save - Put this on cron
  • PSR-4 autoload classes
  • timber everywhere
  • maximum symfony packages
@andrejIka
andrejIka / books.md
Created March 23, 2020 20:40 — forked from rosswd/books.md
PHP Resources

Books

PHP

  • Modern PHP: New features and good practices (1491905018)
  • Programming PHP (1449392776)
  • PHP for the Web (0134291255)
  • PHP Advanced and Object Oriented Programming (0321832183)
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide 5e (0134301846)
  • Learning PHP, MySQL & JavaScript: With jQuery, CSS & HTML5 (1491918667)
  • Laravel - Up and Running (1491936088)
@andrejIka
andrejIka / script.md
Created March 7, 2020 18:41 — forked from schlessera/script.md
Siteground webinar - Learn How WP-CLI Can Make Your Life Easier

Siteground webinar - Learn How WP-CLI Can Make Your Life Easier

Webinar description

WP-CLI, the command-line interface for WordPress, is one of the most popular tools among WordPress developers. However, it can be extremely helpful for anyone managing a WordPress site. In this webinar, the main person behind WP-CLI project: Alain Schlesser will show us the ins and outs of the tool. He will give us great examples on how it can be used to improve your workflow, for beginners to experienced developers and for projects big and small. We will give you invaluable examples on how to perform different tasks with WP-CLI automatically, saving you time and preventing you from making manual errors, like:

  • Keep forgetting to backup? Automate the process with WP-CLI.
  • Site not working? Get tips for easy troubleshoot with WP-CLI.
  • Too many spam comments? Learn how to clean them in no time.
  • Can’t log into your site? Reset your password with WP-CLI.
wp core download
wp core config --dbname=sample --dbuser=root --dbpass=root
wp core install --url=http://example.dev --title="WordPress Sample Site" --admin_user=nishikawa --admin_password=pass --admin_email=example@example.com
wp plugin install show-current-template wp-basic-auth theme-check plugin-check wp-multibyte-patch --activate
wp plugin install wordpress-beta-tester jetpack contact-form-7 vk-all-in-one-expansion-unit
wp plugin delete hello
wp option update blogdescription "This is a new project!!"
wp option update posts_per_page 5
wp option update thread_comments 1
wp option update thread_comments_depth 3

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@andrejIka
andrejIka / mailhog-mamp.md
Created January 11, 2020 07:51 — forked from jaredatch/mailhog-mamp.md
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@andrejIka
andrejIka / functions.php
Created December 26, 2019 11:24 — forked from jaredatch/functions.php
WordPress Search Autocomplete using admin-ajax.php
<?php
/**
* Enqueue scripts and styles.
*
* @since 1.0.0
*/
function ja_global_enqueues() {
wp_enqueue_style(
'jquery-auto-complete',
@andrejIka
andrejIka / gutenberg.txt
Created December 15, 2019 21:45 — forked from chrismccoy/gutenberg.txt
Gutenberg Resources
Extending Gutenberg With SlotFill and Filters
https://10up.com/blog/2019/extending-gutenberg-with-slotfill/
Block Comments swaps out the comment form for a block editor based input
https://tomjn.com/2019/07/20/gutenberg-comments/
How To Remove wp-block-library
https://wpza.net/how-to-remove-wp-block-library-gutenberg/
Add a custom sidebar panel to Gutenberg
@andrejIka
andrejIka / gist:9c4b9aeeef6520ea3415cebd8a9a2b17
Created November 3, 2019 13:24
Register/Unregister style/script
function enqueue_styles() {
wp_dequeue_style( 'contact-form-7' );
// wp_dequeue_style( 'contact-form-7-bootstrap-style' );
}
add_action( 'wpcf7_enqueue_styles', 'enqueue_styles' );
//remove_action('wpcf7_enqueue_styles');
remove_action( 'wpcf7_enqueue_styles', 'cf7bs_enqueue_styles' );