Uncategorized

Scribe against Twitter

On last week I found very interesting library on java for integration with oauth services, meet – . It also works well on Android. So, let’s start – I needed to implement some functionality for interacting with twitter, and here I met an issue. I decided to use callback instead of pin and for this [...]

Django and ExtJS – how to make them work together?

So, the main issue here is JSON format of Ext.data.JsonStore and django.core.serializers. The django serializer does not support to serialize json data with root =( At least I didn’t find any hint how to do this. Now then, what I used on the django side: def phones_all_json(request): phones = Phone.objects.all() json = ‘{root:%s,count:%s}’ % (serializers.serialize(‘json’, [...]

Android and windows-1251 ?

A lot of russian sites are based on windows-1251, but sqlite uses UTF-8 and UTF-16. So, if you won’t prepare your data for android – all cyrillic symbols will be broken. How to deal with it? For the most part of java programmers who familiar with java.io – this issue is well known. We just [...]

Android, App Engine and Google Account… How can I get it all together?

So, one month ago I started to struggle with one interesting issue… I had android app and appengine service. And I needed to make interaction with them. We all know that android knows user’s google account and we can create auth on appengine service by this account, but how?! Well – the code is here:  [...]

How to untaint perl variable?

my $username = <STDIN>; if ($username =~ /^(.*)$/) { $username = $1; # now $username is not insecure } # and you can use it anywhere =) system(‘ssh’,”$username@somehost.com”); # but i recommend to make it at least as /^[[:alnum:]]+$/

Disk I/O Latencies for VMware vSphere

Some time ago, I encountered a problem () – in the documentation of vmware vsphere sdk you can see – totalLatency is supported by vm and host, but on practice it’s false =(. And only now it has been corrected - . And they (vmware developers) implemented this thing (vm disk latencies) in vSphere 4.1 - . [...]

My color and keyboard schemas for qtcreator 2.0.90

1) Color Settings In the beginning you need to know where qtcreator stores custom color settings: Windows: %APPDATA%/Nokia/qtcreator/styles/*.xml Linux: ~/.config/Nokia/qtcreator/styles/*.xml My color scheme:  2) Keyboard Settings You just need to open keyboard settings dialog and then click on import button and open this .kms file:

Vim 7.3 is coming soon!!! Yeah!!!

The biggest additions since 7.2:  – Persistent undo, undo for reload – Blowfish encryption, also encrypt the swap file – Conceal text (note: since 7.3a ‘conc’ was renamed to ‘cole’) – Lua interface – Python 3 interface  I (Bram) will no longer include new features in 7.3, it’s only testing now.  Let’s join to test [...]

How to trace network activity of your app? [*nix]

Yes, we can do this with tcpdump, but what if we need to see what API application uses? strace – was the big opening for me. This is Jedi sword in the skillful hands. strace -f -e trace=network chrome google.com >& log And you will see all sequences of requests/responses from your app and even [...]

Essential iPhone accessories for under $5

If you’ve had an iPhone for more then a month, you’ve probably noticed that the iPhone is kind of like in that it actually spends more money than it costs (in accessories, data plans, apps, songs, etc). You go to a cafe, hear a song you like, grab it with the and click to download, [...]