SSL/TLS Strong Encryption: How-To

https://httpd.apache.org/docs/trunk/ssl/ssl_howto.html # “Modern” configuration, defined by the Mozilla Foundation’s SSL Configuration # Generator as of August 2016. This tool is available at # https://mozilla.github.io/server-side-tls/ssl-config-generator/ SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 # Many ciphers defined here require a modern version (1.0.1+) of OpenSSL. Some # require OpenSSL 1.1.0, which as of this writing was in pre-release. SSLCipherSuite […]

ntpq -pn

[email protected]:~# ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== -67.198.200.4 69.89.207.199 3 u 30 64 1 1.182 -0.029 0.000 +216.239.35.0 .GOOG. 1 u 20 64 1 52.571 0.660 0.240 +216.239.35.4 .GOOG. 1 u 20 64 1 36.033 1.016 0.176 -216.239.35.8 .GOOG. 1 u 24 64 1 140.712 1.154 0.286 *216.239.35.12 […]

Magento 1.9.3.1 – Add images/icons to attribute options to replace placeholder image of your Magento products page

magento 1.9.3.1 view.phtml around line 100 replace the if statement <?php if($_item->getColor()): ?> <?php $optionId = $_item->getColor(); $optionIdurl = Mage::helper(‘attributeoptionimage’)->getAttributeOptionImage($optionId) ?> <a href=”#” class=”color_swatch”> <?php if (strpos( $this->helper(‘catalog/image’)->init($_item, ‘small_image’)->resize(100, 150), ‘placeholder’)) { ?> <img src=”<?php echo $optionIdurl; ?>” /> <?php } else { ?> <img src=”<?php echo $this->helper(‘catalog/image’)->init($_item, ‘small_image’)->resize(100, 150); ?>” /> <?php } ?> […]

some backup links using rsync

https://github.com/elkarbackup/elkarbackup ElkarBackup is a free open-source backup solution based on RSync/RSnapshot Automated Rsync Backup   Here’s how to setup an automated backup process using Rsync. 1. Test rysnc using a password. Here we will be copying files from /src-dir to /dest-dir on [email protected] 1 > rsync -rvz -e ‘ssh -p 22’ –progress /src-dir [email protected]:/dest-dir 2. […]

Percona cluster failed

one of the nodes failed then the whole cluster went down. shutdown mysql on all nodes cat /var/lib/mysql/grastate.dat check which node has the highest seq number boot strap that node service mysql bootstrap-pxc then start the next node but before that mv /var/lib/mysql/grastate.dat ~ service mysql start this will start a full resync wait till it […]

Cloudrouter 3.0 eval

trying out cloudrouter 3.0. Doesn’t seem like much of a router when it doesn’t have dhcp. How To Install DHCP Server on CentOS 7 https://devops.profitbricks.com/tutorials/deploy-outbound-nat-gateway-on-centos-7/          

WTF – VMware Update Manager 6.0 Install

I remember installing this was much easier back in da day…. First problem Trying to find vmware update manager. There is no download link for it on vmware website. After much searching you’ll find it in the vcenter iso. Second problem .net 3.5 sp1 installation in windows 2012 can only be done through server manager. This […]

Python setting up eclipse

kinda old article but mostly worked. http://blog.manbolo.com/2013/02/04/how-to-install-python-3-and-pydev-on-osx to update java on Mac used this http://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac   i installed minimal eclipse install and then added pydev

Shitty documentation installing magmi

When you install magmi and you access magmi/web/magmi.php initial login/pass will be “magmi/magmi”. After you setup db connection info it will use magento back office login/password. create magmi/.htaccess Order deny,allow Deny from all then create magmi/web/.htaccess Order allow,deny Allow from all RewriteEngine On RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Add passphrase to private key

You can still add a passphrase to a private key even after a certificate is generated. openssl rsa -des3 -in your.key -out your.encrypted.key mv your.encrypted.key your.key the -des3 tells openssl to encrypt the key with DES3. remove it openssl rsa -in your.key -out your.open.key you will be asked for your passphrase one last time by […]

How to install magmi

extract magmi to your magento folder go to magmi/web/ create htpasswd using ‘/usr/local/apache/bin/htpasswd -c .htpasswd itheadaches’ set owner to files ‘chown -R fill4style.fill4style itheadaches’ set permission to files install php-mbstring, in my case I had to recompile apache with mbstring    

FUCK: syntax error in /etc/sudoers file

[email protected]:~$ sudo >>> /etc/sudoers: syntax error near line 33 <<< sudo: parse error in /etc/sudoers near line 33 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   [email protected]:~$ pkexec visudo -f /etc/sudoers ==== AUTHENTICATING FOR org.freedesktop.policykit.exec === Authentication is needed to run `/usr/sbin/visudo’ as the super user Multiple identities can […]

svchost.exe high cpu on windows 7

svchost.exe high cpu on windows 7 used process explorer to figure out what service is taking up all the cpu. process explorer is a free tool from microsoft. found it was dnscache. read here to try disabling the dns service. I disabled the service and DNS resolution was working, but after a while it would stop […]

Pagespeed higher score for magento with cache-control

Add this at the end of .htaccess file ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg “access 1 week” ExpiresByType image/jpeg “access 1 week” ExpiresByType image/gif “access 1 week” ExpiresByType image/png “access 1 week” ExpiresByType text/css “access 1 week” ExpiresByType application/pdf “access 1 week” ExpiresByType application/javascript “access 1 week” ExpiresByType application/x-javascript “access 1 […]

Create Download CMS Page on OpenCart 2.x Quick and Dirty

~/www/catalog/view/theme/default/template/download/download.tpl   <?php echo $header; ?> <?php echo $content_top; ?> <div class=”container”>  <div class=”row”><?php echo $column_left; ?>    <?php if ($column_left && $column_right) { ?>    <?php $class = ‘col-sm-6’; ?>    <?php } elseif ($column_left || $column_right) { ?>    <?php $class = ‘col-sm-9’; ?>    <?php } else { ?>    <?php $class = ‘col-sm-12’; ?>    <?php } ?> […]

image/gif was stretched even though width/height was set

Use object-fit:contain in CSS styles to contain image inside width/height. <div class=”swatch-loader” style=”text-align:center;”><img src=”<?php echo $this->getSkinUrl(‘images/ajaxcartpopup/loading.gif’);?>” width=”17″ height=”17″ style=”object-fit:contain;display:inline;” /></div>

[Prestashop] How to fix edit product and delete product in back office order

Test should work for any 1.6.x.x, but only tested on 1.6.0.9, 1.6.0.11, and 1.6.1.4 There is a problem with the token. orders.js is the new file and orders.js.bak is the original js file. You will see the token is pulled from the url/href. [email protected] [/home/bozzolo/www]# diff js/admin/orders.js js/admin/orders.js.bak 595c595 < token: window.location.href.split(‘token=’)[1].split(“&”)[0], — > token: token, […]

mariadb ibdata1 file huge

http://pc-freak.net/blog/fix-mysql-ibdata-file-size-ibdata1-file-growing-large-preventing-ibdata1-eating-disk-space/ http://vdachev.net/2007/02/22/mysql-reducing-ibdata1/

Magento – Menu toggle dropdown broken in left column

design/frontend/mogan/default/template/catalog/layer/view.phtml moved javascript to the very bottom <script> jQuery(document).ready(function(){ jQuery(document).on(‘click’,”#shop-by-header”,function(){ jQuery(“#shop-by-content”).slideToggle(); }); jQuery(document).on(‘click’,”dt[data-toggle=’true’]”,function(){ var elm=jQuery(this),name=jQuery(this).attr(‘data-name’).split(‘-‘)[1]; console.log(‘dd[data-toggle=”toggle-‘+name+'”]’); jQuery(‘.toggle-‘+name).slideToggle( “slow”,function(){ if(elm.text()===’- ‘){ elm.find(‘span’).text(‘+ ‘); }else{ elm.find(‘span’).text(‘- ‘); } }); }); }); </script>java  

Magento – swatches slowing down site

The category page aka product-list page was really slow to load, about 25 seconds plus To troubleshoot Magento’s cpu usage, first enable varien profiler http://www.techawaken.com/enable-magento-profiler-identify-magento-performance-bottlenecks/ You can also try aoe_profiler Found out it was the configurable swatches. Tried the first method in this post. http://magento.stackexchange.com/questions/69863/configurable-swatches-slow-site-down My load time went from 25s to 10s. Then I […]

import sample magento magmi configurable product csv

I used the export all products dataflow as a template then started modifying it from there. Put configurable product at the end. Added + in front of image url so that it will not add as exclude image http://magento.stackexchange.com/questions/29891/magmi-images-excluded added 3 columns: media_gallery,super_products_sku,configurable_attributes http://stackoverflow.com/questions/16166425/magmi-importing-configurable-product Used magmi to import the csv http://sourceforge.net/projects/magmi/ in magmi enabled itemprocessors, “Magmi Optimizer, Magmi Magento […]

PHP message: PHP Fatal error: Class ‘SoapClient’ not found in …..php on line 134″ while reading response header from upstream, client: 173.197.xxx.xx, server: papertine.com, request: “GET /zeki893.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “papertine.com”

Problem: “PHP message: PHP Fatal error: Class ‘SoapClient’ not found in /usr/share/nginx/html/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php on line 134” while reading response header from upstream, client: 173.197.173.75, server: papertine.com, request: “GET /zeki893.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “papertine.com” Fix: yum install php-soap

wordpress high cpu load

first installed mysql query https://wordpress.org/plugins/query-monitor/ this is a bad ass plugin this plug lead me to a huge mysql query then found it was a bug in wordpress v4.3 https://wordpress.org/support/topic/high-cpu-load-after-update-to-v43?replies=17#post-7330770  

some stuff nginx stuff

https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps https://rtcamp.com/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/ https://serversforhackers.com/nginx-caching/ http://myjeeva.com/php-fpm-configuration-101.html https://github.com/nicolargo/varnish-nginx-wordpress

Observium client setup notes

observium server on ubuntu http://www.observium.org/docs/debian_ubuntu/ observium agent wget http://x.x.x.x/apache wget http://x.x.x.x/mysql wget http://x.x.x.x/nginx ubuntu #setup agent apt-get -y install xinetd wget cd /etc/xinetd.d/ wget http://x.x.x.x/observium_agent_xinetd cd /usr/bin/ wget http://x.x.x.x/observium_agent chmod 775 /usr/bin/observium_agent mkdir /usr/lib/observium_agent mkdir /usr/lib/observium_agent/local service xinetd restart #monitor with mysql agent apt-get -y install php5-cli php5-mysql cd /usr/lib/observium_agent/local wget http://x.x.x.x/mysql chmod 775 mysql […]

compiling cacti-spine 0.8.8d with mariadb on centos6

get the other libraries snmp, ssl, etc yum install MariaDB-devel ln -s /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 libmysqlclient_r.so ln -s /usr/lib64/mysql/libmysqlclient.so.16.0.0 libmysqlclient.so then compile if you get this error during make common.h:143:18: error: mib.h: No such file or directory then cp /usr/include/net-snmp/library/mib.h .

Change username in Ubuntu

To manage every aspect of the user database, you use the usermod tool. To change username (it is probably best to do this without being logged in): usermod -l newUsername oldUsername This however, doesn’t rename the home folder. To change home-folder, use usermod -d /home/newHomeDir -m newUsername after you changed the username.

Error code: ERR_SSL_VERSION_OR_CIPHER_MISMATCH

For Chrome v40: Open chrome://flags Look for “Minimum SSL/TLS version supported.” Choose SSLv3 Click on “Relaunch now” button Open your https page again You will be redirected to a “Your connection is not private” page. If you do not worry about this security issue click on the “Advanced” link. Finally click on “Proceed to (unsafe)”. […]