logo
Dec
21

Mindgeek Video Commerce Engine

Mindgeek Video Commerce Engine Contact For more details.
Nov
30

Change a product’s attribute value without loading the entire product model

Change a product’s attribute value without loading the entire product model Loading product in a collection and saving them again and again over will take lot of time. To make it quick there is an alternate solution available which uses the same function used by Update attributes action from the product grid: Mage::getModel('catalog/product_action') ->updateAttributes(array($productId), array('attribute_code'=>'value'),...
Oct
30

Parse query string in shell script

Parse query string in shell script Sometimes we have to integrate multiple languages like node.js/php/shell script into bash shell script and parse query string to array for supplying query string data for manipulation. Here is the simple script which will help you to achieve that goal: #!/usr/bin/env bash declare -A querydict populate_querystring_array () { query=”$1″ while IFS== read arg...
Sep
30

Flickr: Computer vision at scale with Hadoop and Storm

Flickr: Computer vision at scale with Hadoop and Storm     Flickr: Computer vision at scale with Hadoop and Storm (Huy Nguyen) from Yahoo! Developer...
Sep
29

No package ‘opencv’ found

No package ‘opencv’ found If you are getting this error while compiling certain modules which requires opencv library which is causing the execution to be aborted. For fixing it, you need to install lib-opencv using following command: Ubunntu/Debian – sudo apt-get install libopencv-dev Centos/Red Hat – sudo yum install opencv-devel After you do so, pkg-config –cflags opencv and pkg-config –libs...
Aug
19

Using underscore.js with node.js

Using underscore.js with node.js Underscore.js: Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects. It’s the answer to the question: “If I sit down in front of a blank HTML page, and want to start being productive immediately, what do I need?” … and the tie to go along with jQuery‘s tux andBackbone‘s suspenders. Underscore...
Aug
18

Error: /lib64/libc.so.6: version ‘GLIBC_2.14′ not found

Error: /lib64/libc.so.6: version ‘GLIBC_2.14′ not found Sometimes on your node.js project you have seen problems like “Error: /lib64/libc.so.6: version ‘GLIBC_2.14′ not found” by some npm modules. Error: /lib64/libc.so.6: version ‘GLIBC_2.14′ not found This error comes when the available version of glibc is not compatible by the node module. So, if you still want to work with that module, you need to rebuild that module on...
Jul
10

XML into MongoDB – quick and dirty

XML into MongoDB – quick and dirty Import XML from various API’s to MongoDB.
Dec
6

Better way to load layout blocks outside of Magento

For loading Magento Layout Blocks externally or in a controller without any complexity, use this: From external file, we need to initiate Magento session: Mage::getSingleton(‘core/session’, array(‘name’=>’frontend’)); $session = Mage::getSingleton(‘customer/session’, array(‘name’=>’frontend’)); $layout =...
Sep
27

How to configure libstdc++ with GCC 4.8?

You need to tell your dynamic linker (it’s executed when you run your program) where to find the library. Set LD_LIBRARY_PATH to the path of the library (probably somewhere under /app/gcc/4.8.0/lib or something). Use find /app/gcc/4.8.0 -name “libstdc++.so.6″. Add the directory to your LD_LIBRARY_PATH. e.g with the path I mentioned: export...
Sep
11

Openresty : Programming with Magento/Mysql – Get Inventory of Products REST API

Skills Requried – LUA, nginx, mysql If you have nginx-openresty installed, open the vhost file of your domain, than follow this: Let your REST API path is http://<your-domain>.com/getstockserv?p=123450,12145 where p is the parameter where all product ids of Magento Products has been supplied. Now add this entry to the vhost file - location ^~ /getstockserv { content_by_lua ‘ local mysql =...
Sep
9

How to add a Volume to EC2 Instance?

How to add a Volume to EC2 Instance? Go to EC2 console to create the volume and attach it to the instance, and then we’ll mount the volume to make it available. - under Elastic Block Store, click Volumes. - Click on Create Volume – Select the General Purpose (SSD) volume type. - Wait for your Volume to be available. - Right click on it and select Attach Volume, Select the instance and specify an unused device name say...
Sep
4

How to make nginx works with Geo IP?

How to make nginx works with Geo IP? NGINX GeoIP Installation: Follow these steps to install GeoIP with nginx: wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz tar -zxvf GeoIP.tar.gz cd GeoIP-1.4.8/ ./configure make make install echo ‘/usr/local/lib’ > /etc/ld.so.conf.d/geoip.conf yum install gcc pcre-devel.x86_64 openssl-devel.x86_64 yum install readline-devel pcre-devel openssl-develWe are using openresty...
Aug
7

Nginx Openresty Get/Set Cookies using LUA.

Nginx Openresty Get/Set Cookies using LUA. To set cookies using lua while using nginx_lua module in openresty/nginx server, use this code: local expires = 3600 * 24  — 1 day ngx.header["Set-Cookie"] = “session=demo; Path=/; Expires=” .. ngx.cookie_time(ngx.time() + expires) This will set cookie session = demo for 1 day from current time on path /.
Aug
5

Use PHP Functions in LUA Code

Use PHP Functions in LUA Code explode Based on [PHP explode] Example: explode(” and “,”one and two and three and four”) –> {“one”,”two”,”three”,”four”} Compatibility: Lua 5.0 and 5.1function explode(div,str) if (div==”) then return false end local pos,arr = 0,{} – for each divider found for st,sp in function() return...
Aug
4

Purge redis keys in matching pattern

After logging in to linux shell execute this command redis-cli KEYS “*$1*” | xargs redis-cli DEL where $1 is the argument/string which you need to find. E.g.   redis-cli KEYS “*test*” | xargs redis-cli DEL where test is a string you need to search for.  
Aug
3

Mysql get size of tables in a database

To find the detail of size of tables in a database use this query in mysql console: SELECT table_name AS “Tables”, round(((data_length + index_length) / 1024 / 1024), 2) “Size in MB” FROM information_schema.TABLES WHERE table_schema = “$DB_NAME” ORDER BY (data_length + index_length) DESC; E.g. for database name mydatabase : SELECT table_name AS...
Aug
1

Nginx Proxy requests are redirecting to upstream name.

If you are using nginx as a reverse proxy and having the redirection issues to upstream name when proxy request results in 301,302 redirects, e.g. http://www.mind-geek.net/new.html is proxied by backend upstream i.e. upstream backend { server 54.21.42.13:80; } location / { proxy_pass http://backend; } and the requests are getting ended eith http://backend/new.html, than you need to sepecify the...
Jul
31

How to add indexer in a Custom Module?

Follow these steps: config.xml: <index>                        <indexer> <cms_indexer> <model>module/cmsindexer</model> </cms_indexer> </indexer> </index> Model: app/code/local/Name/Module/Model/Cmsindexer.php Class Module_Model_CmsIndexer extends Mage_Index_Model_Indexer_Abstract { public function getName(){ return ‘Add CMS...
Jul
30

What is configure, make, make install ?

There are lot of confusions for usual configure, make, make install sequence to get a program running in Linux. Unfortunately, most developers today have never used a compiler to install an application and used the GUI application builders. The make utility is designed to decrease a programmer’s need to remember line of commands. I guess that is actually the good way of saying, it decreases a...

« Previous Entries

logo