Skip to content

Instantly share code, notes, and snippets.

View nemke82's full-sized avatar

Nemanja Djuric nemke82

View GitHub Profile
@nemke82
nemke82 / async-reindex-m2-2.sh
Last active November 26, 2020 07:25
Script to speed up Magento 2 indexer execution
#!/bin/bash
#Author: Nemanja Djuric
#Script to speed up Magento 2 indexer execution. NOTE: Ajust PHP name, if necessarry.
#!/bin/bash
if [[ -e app/etc/env.php ]]; then
i=0
input=$(php bin/magento indexer:info | awk {'print $1'})
#!/usr/bin/env perl
use strict;
use warnings;
use Cwd qw( abs_path );
use File::Basename qw( dirname );
my $pwd = dirname(abs_path($0));
my @indexers = `/usr/bin/php70 $pwd/bin/magento indexer:info | awk {'print \$1'}`;
@nemke82
nemke82 / async-reindex-m2.sh
Last active January 14, 2018 14:28
Script to speed up Magento 2 indexer execution
#!/bin/bash
#Author: Nemanja Djuric
#Script to speed up Magento 2 indexer execution. NOTE: Ajust PHP name, if necessarry.
if [[ -e app/etc/env.php ]]; then
echo "Getting the list of indexers for this Magento installation."
indexlist=$(php bin/magento indexer:info | awk {'print $1'})
echo ${indexlist}
@nemke82
nemke82 / gist:e7e0be9559d61f0f82cd91183517479d
Created December 30, 2017 17:25
autumn8 repo git copy
#!/bin/bash
#Author: Nemanja Djuric
#Script to replicate automn8 repository to repo1.nemanja.io
echo "Determing OS version"
osversion=$(cat /etc/redhat-release | grep -oE '[0-9]+\.[0-9]+'|cut -d"." -f1)
echo ${osversion}
if [ ${osversion} -eq 6 ];then
echo "Removing temp file."
ps -eo size,pid,user,command | awk '{ hr=$1/1024 ; printf("%13.6f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | sort -nk1
# ./n82wp.sh update
Checking if wp-cli tool is installed.
NOTE: Checking Wordpress installation
3.9.1
14 installed plugins:
UI akismet 2.5.9
A contact-form-7 3.8.1
UI gallery-plugin 4.2.0
UI gallery-bank 3.0.39
I hello 1.6