This blog is NOFOLLOW Free!

Hey everyone,

Just want to recap the latest happenings, I think this year has been a good one with lots of stuff to learn. I managed to understand things I wasn’t able to in the past, Loopthing managed to reach a decisive point which I hope it’s going to be all right, became a student, started learning Italian, and also went through many many small things that should help me in the future.

For now, this is it, I don’t have much to say, just to push things hard around us.

Happy holidays,
Vladimir Ghetau

, , ,

I’m busy today migrating files and settings from one machine to another plus sorting out some things which suppose to help Loopthing grow easier.

So far, we’re ON for finding the right investor to provide us with seed capital while code development is moving forward at a faster pace than last week. (there will be an update on this, soon)

These are the updates for now, keep an eye on my Twitter page for faster updates.

, , , , ,

You’ve probably noticed that the AUTO_INCREMENT ID of a column doesn’t change after deleting rows from a table, and this may not be what you want in some situations (maybe you are testing an application, and you want ID’s to reset from 1, rather than the last available ID).

First solution would be to use TRUNCATE when deleting the rows from the table, instead of doing a row by row deletion (which is also slower in this situation).  To achieve this, just type:

TRUNCATE TABLE t1;

This automatically rests the auto_increment id of any column which was set to automatically increment the last row’s value when a new row is inserted, no matter if the table (in case you’re using MySQL) is using MyISAM or InnoDB storage engines.

Another way to achieve this is by throwing the ALTER TABLE command:

ALTER TABLE t1 AUTO_INCREMENT=1;

While this solution is also great, it requires two WRITE operations over the t1 table:

  1. you must delete the content
  2. reset the auto_increment ID.

Because writes are expensive for high load databases, using TRUNCATE is highly recommended.

There would be a third option to achieve this, and just like the above ones, you may not have enough permissions to throw it in the command line: dropping the table, and adding it again.

This of course, will clean everything related to that table, including the auto_increment ID.

Here’s how it goes:


INSERT INTO t1 (c2) VALUES ('IE');
INSERT INTO t1 (c2) VALUES ('UK');

SHOW TABLE STATUS LIKE 't1';

After throwing the SHOW TABLE statement, we just look for the “auto_increment” value which should be 3.

Let’s reset the auto_increment value:


DROP TABLE t1;


CREATE TABLE t1 (
`c1` SMALLINT(2) unsigned auto_increment NOT NULL,
`c2` char(2) NOT NULL,
PRIMARY KEY (`c1`)
) ENGINE="MyISAM";


SHOW TABLE STATUS LIKE 't1';

Now, the value of the auto_increment index is 1 again.

My conclusion: to reset the auto_increment index to 1, just go with the TRUNCATE command. It’s faster, especially if there’s content inside the table.

, , ,

Vimeo implemented OAuth support on their end, the announcement was made here.

Seems like the old web authentication methods are already marked as deprecated, however they still work 4 days later.  The deprecated methods are

  • vimeo.auth.checkToken
  • vimeo.auth.getFrob
  • vimeo.auth.getToken

The new OAuth specific URLs are (Twitter alike):

Request Token: http://vimeo.com/oauth/request_token
User Authorization: http://vimeo.com/oauth/authorize
Access Token: http://vimeo.com/oauth/access_token

I noticed a big similarity between Vimeo’s and Flickr’s authentication API, and probably Flickr will do a switch soon as well, there’s no OAuth implementation on their end at the moment.

A thing I noticed is that the Vimeo API now requires the OAuth specific data and valid tokens which kind of forces everyone to switch to the OAuth tokens, instead of the old ones extracted via the deprecated methods.

Loopthing needs an unexpected code update because of this right after launching the authentication feature on our end last week, but I’m happy security has been tightened around the video hosting service.

Update: The OAuth specific URLs for Vimeo does not support SSL because of the improper setup of the  certificate and the weird redirects. In the best case you’ll get a 401 error with the message “Invalid nonce”.

, , , ,

twitter-bird-2I’ve been playing with the Twitter  API again (authenticated REST requests this time), and kept getting this nasty 417 Expectation Failed HTTP error.

I checked the sent headers, there was no Expect header being sent, until I realised the requests I was making to twitter using POST HTTP method weren’t sending the variables I wanted to POST, or they were incorrectly formatted.

So, if you’re ever playing with Twitter’s API, make sure that when POSTing data, variables follow. This ate 30 minutes of my life.

Now, this happens only for requests where POSTed data is expected.  I guess the response Twitter sends is a general one, usually, the 417 HTTP Error shows up only when there’s an Expect header present.

I haven’t read the RFC specs for what can happen when no data is POSTed, but I guess a less ambiguous message than this, could be taken into account.

, , ,

Loopthing - Business NetworkingFinding information should be easy for people. It must be accessible, fast, and flexible.Flexible, thanks to filtering.

I’m happy to say Loopthing’s search got a new dimension, it’s a lot more relevant, and it is crazy fast.

The way it works is simple: one enters the search string into the search form, selects the type of results to return (businesses or individuals) and hits the “Search” button.

The results are extracted from the database and the less relevant ones don’t show up initially, unless the user is willing to expand that list.

Here’s a sample search for the keyword branding. If you have any ideas and questions, please send them over, I’m more than happy to adjust or comment.

, , , ,

200px-MySQL.svgInternationalization can be messy when developing applications targeting multiple countries.

If you are developing a DB backed application where users can enter non latin characters, you may want to retrieve those rows which have non-latin characters used by different non-english languages, like: Hebrew, Arabic, Chinese, Thai, Hindi, Swedish, Romanian, etc. (such as: ăâîşţ).

If you want to check all the rows having content which doesn’t use only latin characters, you can try the following query which returns these rows.

SELECT `column` FROM `t` WHERE CHAR_LENGTH(`column`)<>LENGTH(`column`);

In my case, the table.column has an UTF-8 character set.

I’ll let you guess why rows containing non-Latin (non-ASCII) characters are returned by the above query.

Reference: MySQL’s String Functions

, , , , , , ,

wordpress crackedMy blog started showing up an error today, Joseph reported it to me as soon as he saw the problem.

Problem was, when I tried to fix it, somebody else changed the code of my index.php file of my wordpress instalation.

The code introduced there, was a hidden iframe pointing to:

http://c9u.at:8080/ts/in.cgi?pepsi147

It seems I’m not the only one having this issue, the attack came from two different IPs according to Gupi, the owner of the server: 79.116.233.252 and 65.188.207.196.

The cracker already knew my password. Scanned for keyloggers, and trojans and my assumption is that passsword has been stolen by sniffing the network traffic. FTP is a plain text unsecure protocol, which let to this problem.

The attacked files were only the index ones from all over the public folder.

The script which is requested through the iframe can be anything which tracks the traffic of the targeted site, to a live source of IP addresses of new, potential victims.

I’m still trying to find how my password leaked…

, , , , , , , ,

Summer is still with us, so here’s some fun links:

Ah, and in the end a Facebook fun happening:

facebook-bossGetting caught on Facebook by your boss whose inside your friends list is stupid, saying you don’t like your job but keep doing it, is called waste of everyone’s time – including yours.

Got to close this post with a big LOL!

, ,

If you’re getting an error like “403 Service Over Qps” or “ERR_403_SERVICE_OVER_QPS“, you’re probably playing with an API provided by the Mashery.com webservice.

Some of the sites serving their API content via Mashery are The Guardian, and compete.com. The trouble I have comes with compete.com, however, I’ve seen people dealing with theguardian.co.uk as well.

The reason why you are seeing this is probably because you are sending over too many requests in so little amount of time.  To prevent this from happening, you should check the API’s service limits, and also test it against the real possible limits, e.g. if they say 5 requests max per second, try 4 requests per seconds, the limit may be lower than documented.

This error also comes with a HTTP response code of 403, Forbidden.

, , , , ,