Archive

Author Archive

Western computers should not be called Apple premium reseller

March 15th, 2011 alex No comments

From now on Western computers do not exists for me: I bought iPad 32 Gb from them 24 February for my wife’s birthday and within 4 days iPad became 100 pounds cheaper. Apple main store (online or retail) provides refund of these 100 pounds for anyone who bought iPad two weeks prior to announcement of iPad 2, but it’s up to resellers to make decision about such purchase and Western Computers decided do not provide same level of customer care as apple main store. So, any reason to buy from Apple reseller in the future, especially from Western Computers, when you can buy iPads and Macs from Tescos, Curries even cheaper?

Tags: , , , , ,

Technical questions which are not valid in the absence of context

March 5th, 2011 alex No comments

Recently I was asked the number of technical questions which I nearly failed to answer, not because I don’t now the answer, but because I believe such questions require more information about the context. There is a common assumption about the default mind frame with ms windows and C/C+. The assumption doesn’t work for me hence I came out as a non-technical person (I think people who know me a bit will consider it as a joke, since most of the conversations I came out as a mix of geek and scientist).

  • Network: what is the difference between port and socket.(I wonder what is the difference between port and file in *unix).
  • between process and thread ( not much if you are reading programming erlang. I wonder what answer will be for QNX or other RTOS)
  • how many ways to copy file from Linux to windows (I know at least +1 to most common: use netcat)

  • Posted using BlogPress from my iPad

No tags for this post.
Categories: cloud Tags:

Speeding up cakephp with nginx and no mod_rewrite issues

December 13th, 2010 alex No comments

I am trying to speedup rather crappy php, website build on top of cakephp and decided to follow this tutorial, I was seriously annoyed that I can’t get rig of /app/webroot prefix in css/js links. I didn’t want to hack them directly because I am using automatic css/js compression.

It wasn’t until I found this solution from the ticket closed in January I managed to fix it. Quite surprised that in order to dispatch cakephp app I need to patch the core and there are hundred of unanswered questions/issues about deployment of cakephp without mod_rewrite. PS. Good start – this is my first day of holiday gone.

Tags: , , ,
Categories: blog, web Tags: , , ,

Chef cookbook for xtreemfs deployment

December 10th, 2010 alex No comments

I just pushed xtreemfs cookbook to my git repo This cookbook automates xtreemfs quick start for ubuntu 10.04. I am using it with vagrant:

  1.    config.vm.define : xtreemfs do |xtreemfs_config|
  2.     xtreemfs_config.vm.box="base"
  3.     xtreemfs_config.vm.provisioner=:chef_solo
  4.     xtreemfs_config.vm.forward_port("ssh", 22, 2227,:auto => true)  
  5.     xtreemfs_config.vm.forward_port("web", 30638, 8080)
  6.     xtreemfs_config.vm.network("192.168.100.16")
  7.     xtreemfs_config.chef.node_name="xtreemfs"
  8.     xtreemfs_config.chef.log_level = :debug
  9.     xtreemfs_config.chef.cookbooks_path = ["cookbooks","other_cookbooks"]
  10.     xtreemfs_config.chef.run_list.clear
  11.     xtreemfs_config.chef.add_recipe("apt")
  12.     # xtreemfs_config.chef.add_recipe("tomcat")
  13.     xtreemfs_config.chef.add_recipe("xtreemfs::server")
  14.     xtreemfs_config.chef.add_recipe("xtreemfs::client")
  15.  end
Tags: , , ,
Categories: cloud Tags: , , ,

Good way to ad apt repository using chef – from hadoop cookbook

December 9th, 2010 alex 2 comments

I found an interesting way of adding apt repository in hadoop cookbook:

  1. execute "apt-get update" do
  2.   action :nothing
  3. end
  4.  
  5. template "/etc/apt/sources.list.d/cloudera.list" do
  6.   owner "root"
  7.   mode "0644"
  8.   source "cloudera.list.erb"
  9.   notifies :run, resources("execute[apt-get update]"), :immediately
  10. end
  11.  
  12. execute "curl -s http://archive.cloudera.com/debian/archive.key | apt-key add -" do
  13.   not_if "apt-key export 'Cloudera Apt Repository'"
  14. end
Tags: , ,
Categories: cloud Tags: , ,

Many/Multi objective optimisation

November 27th, 2010 alex No comments

Last week I went to the lecture on Evolutionary Algorithms and Multi Objective optimisation, which my friend Dr Evan Hughes. It is very interesting course and I wish I had an opportunity to listen to it earlier – the earlier the better. I really like the examples of the problems shown and absolutely amazed by some of the examples. One of the “difficult” objective functions below. Is anyone who would like to try to find maximum?
Read more…

No tags for this post.
Categories: science Tags:

Building matplotlib on Mac OS snow leopard

November 19th, 2010 alex No comments

I spent a lot of time trying to figure out how to build matplotlib on Snow Leopard without using macports – I prefer to use homebrew instead and ended up with incompatible binaries, until I found ‘This’. Notes Read more…

Tags: , ,
Categories: general, science Tags: , ,

Celery configuration for Redis backend

November 13th, 2010 alex No comments

Not too obvious since doc here doesn’t mention it. Working configuration:

  1. CARROT_BACKEND = "ghettoq.taproot.Redis"
  2. CELERY_RESULT_BACKEND = "redis"
  3. REDIS_HOST = "localhost"
  4. REDIS_PORT = 6379
  5. REDIS_DB = 0
  6. REDIS_CONNECT_RETRY = True #this one is deprecated
  7.  
  8. BROKER_HOST = "localhost"  # Maps to redis host.
  9. BROKER_PORT = 6379         # Maps to redis port.
  10. BROKER_VHOST = "0"         # Maps to database number.
  11. #this line will screw up things for ghettoq backend
  12. #CELERY_DEFAULT_EXCHANGE = "tasks"
  13. CELERY_IMPORTS = ("tasks", )

Follow this link for more details

Tags: , ,
Categories: cloud, web Tags: , ,

Compliting redis 2.0.3 on mac os leopard with ppc

October 28th, 2010 alex No comments

Just notes to myself: redis.c line 10897

  1.  #if defined(__FreeBSD__)
  2.     return (void*) uc->uc_mcontext.mc_eip;
  3. #elif defined(__dietlibc__)
  4.     return (void*) uc->uc_mcontext.eip;
  5. #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
  6.   #if __x86_64__
  7.     return (void*) uc->uc_mcontext->__ss.__rip;
  8.  #elif defined (__i386__)
  9.       return (void*) uc->uc_mcontext->__ss.__eip;
  10.   #else
  11.     return (void*) uc->uc_mcontext->__ss.__srr0;
  12.   #endif
  1.  CFLAGS='-mmacosx-version-min=10.5 -arch ppc -sysroot=/Developer/SDKs/MacOSX10.5.sdk' make

See ticket for more details

No tags for this post.
Categories: cloud Tags:

WordPress deployment on the live server using chef (and vagrant)

October 26th, 2010 alex No comments

When I decided to move from movable type to wordpress, I wasn’t quite happy with default wordpress cookbook. I also had an offer to have a cheap dedicated server instead of VPS, so I decided to test two things simultaneously:

  • Preparation of new live server using fabric
  • Deployment of new wordpress installation using chef with opscode server
  • And of cause testing wordpress cookbook on vagrant Here is how I do it:

    Read more…

Tags: , , , ,