‘ Net ’ Category

Rough Buzz analysis trought Twitter

Comments // Written on Apr 26, 2009 // Net

As the most important thing both for professionsts and companies on the net is “being talked about“, find and monitor buzzes is essential too. Professional analytics applications like Trackset Conversionlab help a lot, crawling the net and finding news, reviews, forum messages and more, containing the website, the brand or some specific keywords chosen by the interested company.

Bloggers usually can not afford such a professional tool and have to find other ways by their own. Google blog search is very useful in this case but it is quite limited and do not give a complete idea of what the net people think about you/your service.

In my opinion the best low-cost (I mean without-any-cost, but it sound worse) way to find people actually talking about you is using Twitter Search.  If your brand/name is not such common it is very easy to obtain a good result with no stress. The following url is what I used to retrieve informations about LangID,the new web service I created some days ago.

http://search.twitter.com/search?q=langid.net+OR+%40langid+-from%3Alangid&rpp=50

Let’s see what those parameters mean:

  • http://search.twitter.com/search : that’s the base url, you should have understood that
  • langid.net+OR+ %40langid : this means I’m looking for people talking about my website (langid.net) or even my twitter account (@langid as %40=@)
  • +-from%3Alangid : I used this to exlude myself from the results (my @langid twitter account)
  • &rpp=50 : this just means to show me the first 50 results

The result is great, you can see people insulting the service, or even liking it or just spreading the address. But that’s not over.

As twitter search apis are very easy to use you can use that result to create a funny, real-time and real-people made ‘talking about us’ page. This is langid talking about us page.

To obtain a similar result you can simply change the url I previously suggested you from search?parameters to search.atom?parameters. Here’s my example :

http://search.twitter.com/search.json?q=langid.net+OR+%40langid+-from%3Alangid&rpp=5

This would cause twitter server to return a Json file instead of a web document. You can use those data together with a Php/Java parser to obtain a page similar to the LangId one.

This is fascinating in my opinion… anyway as bloggers always have to criticize I will do it too… As you can see from the advanced search webform, it is possible to look for tweets with positive/negative attitude. Unfortunately for twitter guys this just means looking for happy or sad faces ( :) or :(   ) inside the tweets. I really (really really really ) would like to see something semantically achieved here…

LangID : 2.0 service to identify your texts language

Comments // Written on Apr 20, 2009 // Net

LangID is a free web 2.0 service which allows users to identify in which language a text was written by submitting it in different ways.

It is possible to query LangID via direct input (type or paste the text), via upload ( pdf,doc,xls … ), mail and even via Twitter. The twitter and email bots should reply to the user in 5 mins with the full english name of the language and its ISO code.

To ask LangID to identify your texts from twitter you need to add the bot to your followers and then tweet @langidbot and the text you want to identify.

If you want more informations about the service you can read LangID about page.

Sync Epiphany bookmarks with Unison and Dropbox

Comments // Written on Apr 20, 2009 // Net, Open Source

Yes, since I was able to run Dropbox on Fluxbox I’m quite exhausting it, trying to sync most of my work settings with my home computer.

As I prefer using Epiphany to Firefox, I needed to find a way to easily sync my bookmarks but unfortunately the symbolic link made from epiphany folder to the Dropbox one didn’t work as expected, and I didn’t want to use Epilicious ( -> Magnolia) to store all my bookmarks.

So I tried with Rsync but the result was not so good, as it’s not natively bidirectional. Unison, instead, worked exactly as I wanted to!

mkdir ~/Dropbox/epiphany
unison ~/.gnome2/epiphany/ ~/Dropbox/epiphany/ -path ephy-bookmarks.xml -terse -auto -silent -ui text

Unison will sync the two files, merging them or giving output about conflicts (if you modified the file on both computers and it’s not able to merge them, like svn does). Also note that while usually unison works with directories I imposed to sync just the ephy-bookmarks.xml file, using the -path option.

As the file is not that big and it’s not modified so often I put the command on the crontab every 2 minutes. You should choose a period that fits your pc load/activity…

crontab -e
*/2 * * * * unison ~/.gnome2/epiphany/ ~/Dropbox/epiphany/ -path ephy-bookmarks.xml -terse -auto -silent -ui text

I think this can be useful to sync even other services/preferences…

Harden dropbox using safe encfs encryption

Comments // Written on Apr 16, 2009 // Net, Open Source

While continuing to share datas beetween my two workstations using Dropbox, I started getting worried about data safety. Looking at DropBox wiki I found this interesting page in which I highlighted  the part that attracted me.

DropBox guys are suggesting to use a simple file-per-file encryption very easy to achieve in any Linux environment thanks to encfs. I tried this method beetween my two Gentoo boxes and I’m very satisfied: it works like a charm, being terribly easy to set up.

Here’s what I did :

sudo emerge sys-fs/encfs
mkdir ~/Dropbox/Safe
mkdir ~/Safe
encfs ~/Dropbox/Safe/ ~/Safe

Encfs prompted me for an installtion method and I choose the automatic one (it set up default protection levels and methods without my unable interaction) then for a password. After setting up the password everything was ready to be used. I started putting my files into the Safe folder in my home and saw the corresponding encrypted files on Dropbox/Safe.

When I got home from work i installed the same ebuild, created the same dirs and typed for the same pass to encfs…Dropbox updated the encrypted folder and encfs did the rest…

I also set up my tomboy notes to be synced into the encrypted folder instead of the common one so that I now can share sensible notes without too many worries!

Easy, fast and seems quite safe to me…

Sync Skype chronologies using Dropbox

Comments // Written on Apr 15, 2009 // Net, Open Source

I use Skype both from work and home with the same account and a lot of times I received some links at work and forgot to save them on tomboy or send it by mail, so when I got home I could not find them.

Today I found a simple but rough solution to share my Skype chronology beetween my two computers, using the wonderful Dropbox service. First of all I found my skype setting and cache folder, which in GNU Linux is located on the userhome, under the hidden .Skype folder. Inside .Skype, there are some folders, named as the account you used on that computer and some config files. What I did is simply to move the folder of the account I wanted to share the chronology for inside the Dropbox folder and then symlink it on its previous location. So after closing Skype from terminal it was just a matter of

cp ~/.Skype/account_name ~/Dropbox/
ln -s ~/Dropbox/account_name ~/.Skype/

Then I logged in the othe pc via SSH and did the same symlink without copying the folder into Dropbox. This means that in the second pc I would have just the chronology of the first one and not the previous saved history. Maybe there’s a better way to do so, merging the two chronologies before sharing and sobstituting one to the other, but I didn’t care so I just overwrote my house Skype history (after a quick backup) doing

cp ~/.Skype/account_name ~/skype-account_name_bk
ln -s ~/Dropbox/account_name ~/.Skype/

The trick is done. Obviously mantaining two opened skype session on the two computers might generate errors. Also I noticed it’s quite expansive for the net as Dropbox tries to update every chronology file that skype modifies so every time you chat or receive any message it syncs some files, doubling the traffic. Anyway I reached my target and confirmed that Dropbox is terribly useful…

Google and friends crawling like hell

Comments // Written on Mar 31, 2009 // Net

The linux portal I manage receives 3000/4000 page views each day, revealed from different Analytics tools which works with Javascript, without any noscript.  This means that from those stats are completely excluded crawling bots, as they usually use perl scripts (or similar)  to fetch pages.

Yesterday I installed on my private server mod_defensible for apache2, a simple mod able to retrieve a blacklist of spammers, malevolous bots & company and to automatically give them a 403 error (access denied), so I decided to create a little report about the acceses on my server.

So using apache2 I created a new log, writing just some information I needed ( ip and unix timestamp ) and refining them (no css/images/js accesses, only .html and .php pages), and then a quick bash daemon that parses those logs and puts datas on my postgres DB every hour.

Results are amazing.

In 24 hours I got a total of 20500 accesses to linuxfeed and 9847 of those were made by 66.249.70.132. Know this guy? Yes it’s google… Ok I repeat in case you didn’t get it. 20500 access, 9847 by google.

That’s incredible but not enough. My ladder continues with 969 accesses from 74.6.17.151 (yahoo) , 903 from 66.249.71.237 (google again) and finally 340 from 67.195.37.89 (yahoo again). The total traffic I received from ‘good’ spiders is 12059 page views. This is more then an half of my whole site traffic. This is more then an half of my server load.

Then I focused on blocked bad guys stats. Mod_defensible did a great job stopping 6000+ accesses from blacklisted IPs. Particulary I noticed this guy ( 200.35.148.96 ) that made 5024 requests to my webserver. He received 5024 403 errors, perhaps this bot should have been coded in better way…

I just want to point out that I didn’t write those stats to criticize google or others search engines. If I want to be found on the net I’ll accept them to crawl me a lot. Google let’s you decrease crawling rate from webmaster tools (and I did id as soon as I saw these stats!) and the robots.txt lets you keep crawlers away. So you can decide in every moment to not be reached from everyone in the next months.

It’s just that I could not even imagine that their traffic might be even more (a lot more) then ‘real visitors’ and wanted to share my surprise… this web is perl-ed a lot!

Automatically fade background with Canvas and javascript

Comments // Written on Mar 26, 2009 // Net, Open Source

Using complex background images for div elements is very useful to create nice effects on web pages. Most of the images used as BG have a central pattern and then a gradient which ends at the image borders. If you use one of these image as background of a div you need to make them of the same size of the div (or bigger) so that it is able to cover the whole space with the gradient. Doing this means manually manipulating an image, increasing and decreaing its width/height.

I created a JS library that provides a simple way to avoid image manipulation, using Javascript to retrieve colors informations about the latest pixels of the image and to repeat that pattern until the end of the div. You don’t need to open any graphic program, you don’t need to add other divs, just include the script and it will do the dirty job for you.

If you’re interested on how this script works and what you could achieve by using it, you can retrieve more informations on the project page. Also take a look at the labs page, where you can see the script in action.

Running apache2 virtualhost with different users

Comments // Written on Mar 21, 2009 // Net, Open Source

On my dedicated server (running Debian Lenny) I run different websites and some of them are managed by other people. This means I had to give those people access via ftp and/or ssh to my box. As most of those sites use cms to manage content, they usually need the user which is running the webserver to be able to write their domain folders too.

In the past I managed to make folders writable both from the webserver and the user, adding every user I created for ftp/ssh access to the www-data group and then giving directories 664 permission. This way both the webserver and the user were able to write but I was not satisfied with this solution.

I knew that it was possible to wrap everything with SuExec and Cgi but I preferred running php forked by apache without CGI so this solution didn’t fit my needs.

I recently came to know the wonderful apache2-mpm-itk module. By enabling this, it is possible to achieve a true multiuser apache2 installation without wrapping anything to SuExec. Following some easy steps you would be able to specify an user+group for each virtualhost you run.

On Debian installation is quite easy as the apache2-mpm-itk module is on the repo. Note that installing it would remove common apache2 installation and the apache2-mpm-prefork as the module is compiled inside apache2. So to install it just

$ sudo apt-get install apache2-mpm-itk

As the module is built in you do not need to a2enmod anything. Just go straight on your virtualhosts folder ( /etc/apache2/sites-available ) and enable it by adding this line for each virtualhost.

<IfModule mpm_itk_module>
AssignUserId USER GROUP
</IfModule>

If you do not specify any user for some virtualhost they are going to run with default apache2 user (www-data, apache2, httpd or the one you specified on the configuration file).

Now, before reloading apache2 configuration be sure to reset permissions on your virtualhost, changing them from www-data to the new user:group using chown and if needed chmod. I usually do this

$ sudo chown USER:GROUP /var/www/some-virtualhost/ -R
$ sudo chmod 644 /var/www/some-virtualhost/ -R

Now you can safely reload your apache2 configuration and you’re done

$ sudo /etc/init.d/apache2 reload

Translate This 9.03.12

Comments // Written on Mar 12, 2009 // Net

In the latest release of Translate This I fixed a bug which affected wordpress installations that are not located in the root of your domain. This means that if your blog address is something like

http://my.domain.com/

everything worked fine, while if you have something like that

http://my.domain.com/myblog/

the old version would have returned a 404 error. This error was due to an absolute path used to indicate the iframe location and was fixed with the suggestions of Marco Battistoni.

Older Releases

As I didn’t publish anything about latest releases changes I will resume them below

9.03.11

In this release I added a very useful JS script that has the duty to hide the ‘Translate This’ icon on your editor when you move from visual to HTML mode. This is necessary as the script still do not support code editor for translation. I will try to realize that in the future but in the meantime I believe that is safer to disable the icon so that people do not try to translate in HTML mode.

I also improved the graphics inside the popup, moving elements and fixing some styles, and added language flags inside the selectbox. Icons have been realized by Icon Drawer and all the rights about them are their property.

9.03.09-1

This is a miny-minor release, needed to fix an incompatibility issue with contact-forms-iii. That was suggested by Rajesh in the comments .

9.03.09

In this release I fixed paths problem that where caused from the change of the plugin folder from translate to translate-this. That was my bad fault .

Page 1 of 41234»