UPWORK/ODESK guru: Tips and Tricks for clients

skype: odesk.by / upwork.link , email: info@odesk.by/upwork.link

Convert MyISAM in InnoDB for WordPress

without comments

Recently I migrated all MyISAM tables to InnoDB for some WP sites of clients.

I saw some improvement in mysql performance, specially when editing posts. I think earlier parallel write onwp_posts table were getting blocked because MyISAM do not support row-level locking.

Read the rest of this entry »

Written by spectre

November 12th, 2016 at 3:24 pm

Posted in Mysql

Synnefo – Pithos – API: Incompatible with ‘Openstack object storage API’ for python-swiftclient – Openstack.

without comments

Synnefo Pithos declares, that a full compatible with ‘Openstack object storage API’. And what can be used with ANY cli client on this level (https://www.synnefo.org/docs/synnefo/latest/pithos.html).


…Pithos runs at the cloud layer and exposes the OpenStack Object Storage API to the outside
world, with custom extensions for syncing.
Any client speaking to OpenStack Swift can also be used to store objects
in a Pithos deployment…

It is lie in some cases ….

Read the rest of this entry »

Written by spectre

August 18th, 2016 at 2:05 pm

Linux – configuring multicast – via C application.

without comments

Configuring the Kernel for multicast

ref: http://www.linuxjournal.com/article/3041

To use multicast, the kernel configuration requires the CONFIG_IP_MULTICAST option to be set.
Use ifconfig to enable and disable all-multicast mode. Disable promisc by running:

Read the rest of this entry »

Written by spectre

May 21st, 2016 at 2:26 pm

Posted in Tips and Tricks

IPv6 may include MAC address of interface. How to stop it?

without comments

Here’s how your IPv6 address may include your MAC address. An example IPv6 address is something like this: – 2001:0db8:1:2:60:8ff:fe52:f9d8

– Take the last 64 bits (the host identifier) and add lead zeroes: 00:08ff:fe52:f9d8
– Cut “ff:fe” from the middle. (If these bytes are not there, then there’s no MAC address.)
– For the first byte: complement the second low-order bit (the universal/local bit; if ther bit is a 1, make it 0, and if it is a 0, make it 1) So: 0x00 (00000000) become 0x02 (00000010)
– “60:8ff:fe52:f9d8” now becomes “02:60:08:52:f9:d8”!

Privacy addressing is used to hide you MAC address from IPv6 (in statelesss cases). What Privacy addressing does is generate a random, temporary address that doesn’t contain your MAC address. Here’s how you enable Privacy addressing:

On Linux, to enable temporary addresses and make them preferred for outgoing connections:

# Enable IPv6 Privacy Extensions
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
net.ipv6.conf.nic0.use_tempaddr = 2
...
net.ipv6.conf.nicN.use_tempaddr = 2

On MS$

netsh inter ipv6 set privacy state=enabled

Written by spectre

March 29th, 2016 at 12:14 pm

Posted in ipv6

How to capture ack or syn packets by tcpdump.

without comments

Only TCP_SYN from some nets

Read the rest of this entry »

Written by spectre

February 11th, 2016 at 8:06 pm

Posted in tcpdump

Apache: monitoring of site with watch/curl.

without comments

-> watch -n 300 'curl -I http://site.com:3080 2>/dev/null | egrep "HTTP|Date" | tee -a site.curl.txt'

Read the rest of this entry »

Written by spectre

February 9th, 2016 at 2:29 pm

Posted in Apache2

PHP(wordpress): testing wp_mail function

without comments

script in root of WP

Read the rest of this entry »

Written by spectre

February 7th, 2016 at 7:30 pm

Posted in Php

CentOS7: How do disable PrivateTmp for Apache with systemd?

without comments

Technically better to provide a small override of service file rather than copying the whole new version in /etc/systemd/system … (www.freedesktop.org/software/systemd/man/systemd.unit.html)

Read the rest of this entry »

Written by spectre

January 30th, 2016 at 3:53 pm

Posted in Apache2

php: save PHP variables to a text file

without comments

Writing $text to a file:

Read the rest of this entry »

Written by spectre

January 30th, 2016 at 3:38 pm

Posted in Php

Optimal size of innodb_log_file_size

without comments

As you know, during commit InnoDB writes the data at once into data files and records changes in the first innodb_log_file. The fact that write data directly to the table – a much more expensive operation than to record changes in the binary log.
Keeping innodb_log_file allows optimization of I/O: write data to successive large pieces, and more quickly serve customers (customer commits quickly made, and the data in the table space are recorded in the background). Therefore, the larger the file, the more opportunities to optimize InnoDB I/O. Currently, the total size of innodb_log_file limited to 4 GB, which is more than enough for most cases.

Read the rest of this entry »

Written by spectre

January 15th, 2016 at 4:16 pm

Posted in Mysql