b0j3 logo

Blogging or not, here I come…

0
Filed under Uncategorized

I had … well I still have (not for long I hope) blog opened at Tumblr. It’s nice and everything, but I would like to have more control and also I’d like to add some marketing stuff, so I’ve decided to move all the blogs to me – using WordPress as a platform.

The funny thing is that I never learned php and tried to avoid it as a plague. Not sure if it is time for me too check php seriously, but I’ll still do Python as much as possible :)

Enhanced by Zemanta

Twitter and Follow Friday

2
Filed under general

Anybody using twitter knows the term: Follow Friday (#FF). It was Friday yesterday and I thought to do it a bit different.

Image representing Twitter as depicted in Crun...

Image via CrunchBase

I decided to write every recommendation in its own tweet with extensive (well in 140 chars) explanation why I recommend that person.

Interesting thing happened. Almost everybody who I recommended was pleased (well at least I hope   they were), but I lost one follower.

As he explained his decision was (my interpretation) that he’s fed up with that shit.

Apparently all the tweets seemed like spam to him.

Interesting.

Is there a deeper meaning to that or just a coincidence I don’t know? Was the problem that I was too nice to others or just too chatty?

Enhanced by Zemanta

Apache 2.2.17 & mod_proxy

0
Filed under webapps

So…you’ve did everything as advertised on other pages to get your proxy working, but the damn thing doesn’t work.

Been there… done that…

What was the problem?

Had to add only ProxyPass and ProxyPassReverse to enabled sites.

The important thing is to do setting in proxy.conf (in mods-enabled) according to comments in the file.

Mine settings are:

#ProxyRequests On
<Proxy *>
 AddDefaultCharset off
 Order deny,allow
 #Deny from all
 Allow from 127.0.0.1
</Proxy>

If you’ll try to add these settings to enabled sites instead of proxy.conf the proxy doesn’t work.

Let’s say vacation is over

0
Filed under general

Hopefully :D

In the meantime I tried other blogging platform (tumblr), but I somehow didn’t like it.

After some secret work I guess it’s time to come out.

Vacation time

0
Filed under general

Due to vacation I’m a bit of the schedule, but the more or less normal service will resume soon.
Maybe even using some other blogging tools/places

SugarCRM, SOAP, Python and ZSI

0
Filed under Uncategorized

Yeah I know, the title promises a mess of the subjects, but bear with me.

It makes sense.

First of all. Install SugarCRM – how to install it, you ask? Well, check the documentation for your favorite distribution and I guess it’ll “just work”.

The problem I have is that the CRM is written in PHP. I know it’s the next best thing after sliced bread, but I just don’t like it.

I prefer using Python for my programming ventures, but lately trying to enter the functional programming area, but that’s whole new thing and I won’t go into it (yet).

Therefore I’ve decided to just access the data from SugarCRM using MySQL and after checking the documentation I’ve found the SugarCRM can be access using SOAP.

And since I’ve used ZSI before – for SOAP access to the web services it was natural to try it with the SugarCRM.

Here are the results of the jury:

The simplest thing to try was login service, for which the WSDL file says:

<message name="loginRequest">
  <part name="user_auth" type="tns:user_auth"/>
  <part name="application_name" type="xsd:string"/>
</message>

and user_auth is ComplexType:

<xsd:complexType name="user_auth">
  <xsd:all>
    <xsd:element name="user_name" type="xsd:string"/>
    <xsd:element name="password" type="xsd:string"/>
    <xsd:element name="version" type="xsd:string"/>
  </xsd:all>
</xsd:complexType>

And the code to do it is following:

#-*- encoding: utf-8 -*-
import sys,md5
# call: python <script_name> -u <url_of_wsdl_file>
from optparse import OptionParser
from ZSI.ServiceProxy import ServiceProxy
op = OptionParser(usage="%prog [options]")
op.add_option("-u", "--url", help="service URL (mandatory)", metavar="URL")
options, args = op.parse_args()
if not options.url:
  op.print_help()
  sys.exit(1)
else:
  options.url = options.url.replace("?WSDL", "?wsdl")
  if not options.url.endswith("?wsdl"):
    options.url += "?wsdl"
  service = ServiceProxy(wsdl=options.url, tracefile=sys.stdout)
  print "Accessing service in SugarCRM, method login..."
  #password is md5 encoded
  passwrd = md5.new("user_password").hexdigest()
  auth = {"user_name":"insert_user_name","password":passwrd,"version":"1.1"}
  resultDict = service.login(user_auth=auth,application_name="sugar_soap")
  id = resultDict["return"]["id"]
  print "session id=",id
  print "error=",resultDict["return"]["error"]

Ditching Django for web2py

0
Filed under python, web2py

Interesting things happening lately.

One of the main things is that I’m ditching Django for web2py and the reason is precisely the one I used to select Django.

Namely, I wanted to have free hands to do whatever I wanted and not to be constrained by the tool.

But lately I am venturing in SaaS business and other things became more important than web framework.

And there is another reason. I’ve installed version 1.2 and it broke backward compatibility and this is a huge NO NO for me so I started looking for other Python based web framework and came to the web2py which I looked before.

I love the constraints it gives me (go figure). You do it one way and that’s it.

Now I am free to try other things.

I really hope I’ll be able to write more about my web2py ventures.

Busy, busy, busy

0
Filed under general

Lately I’m busy with the business sense of the word :D

I’ve employed a friend, moved the server to new provider and started creating web service billing platform as a self sustained service.

Oh, and colleague is preparing new web page for the firm.

Google reader and it’s back door

0
Filed under google, python

This blog post is sparked by a twitt from a guy I follow (swizec) and his twitt saying: “RT @preona: Yay, found a working way to get to google reader data programatically through the unofficial API. We’re in business boys! :D ”.

And this twitt made me realize, that somewhere on HDD of my macbook lies a sample of Python script to get some data from the Google Reader.

After all I was doing something similar as Preona is doing, but I ventured in other areas. The idea (Syndeenation) is still alive and eventually I’ll get back to it and see how things will work out. But currently the script is just gathering dust.

Until today.

I’ve decided to publish the script with all the troubles I get from it (sometimes it bails out with an error, but you just have to repeat the procedure and it usually works the second time around.

The script is published under Creative Commons licence.

There is a link if you are interested in theoretical background. Check the comments on the mentioned page for other links.

Server moving

0
Filed under general

Due to moving the servers to new location by my service provider, the page will not be available at least on Saturday May 22nd.

Sorry for the inconvenience.