February 2012
3 posts
3 tags
What's the conversion on e-mail newsletter with a...
I have measured that in the past week. One of my websites has more than 500.000 user accounts. I picked the users who were not on the site in the last week, because they have already seen the news on the site, and got some 384.000+ distinct e-mail addresses. I needed to contact them regarding an important issue about the website. The e-mail was composed like this:
Hello,
you are reading this...
4 tags
Using JavaScript to split text string into word...
I got an interesting problem today. I was supposed to check some HTML form before submitting to see if the text entered by the user in textarea has some specific words in it. Googling around I found a lot of stuff like “how to split text separated by commas” and such, but I simply wanted to extract words from a paragraph like this one.
My instinct was to use String.split() function,...
3 tags
New way of spamming: taking over free e-mail...
Today I found out something really interesting. I send an e-mail newsletter to some 380.000+ subscribers. Suddenly, I got a flood of auto-reply messages, coming from various Yahoo mail users. The auto-reply message contains different spammy content with links, all written in a very personalized manner. Looks like spammers were able to hack into user accounts, most probably using easy to guess...
January 2012
3 posts
4 tags
How to use IDB files of Quicken Home Inventory on...
Directly load your IDB file from Quicken Home Inventory on any 64 bit Windows system. It works on 32 bit as well, of course. Today, a new version of Attic Manager is released, version 3.00. This version is able to load data directly from IDB files, there is no need to install any additional software. You don’t even have to have Quicken installed. This also means that you can run this option...
kerneldaemon494 asked: Why aren't you using InnoDB instead of MyISAM?
2 tags
Why is MySQL still a toy database
I have been using MySQL for a very intensive read-write web application (averaging 102 queries per second) for more than two years. I had ups and downs with it, like crazy MyISAM behavior that readers can block writers AND OTHER READERS. Basically, a table level lock is issued for read. I have 100+ records in a table, so it takes a while to find anything that is not indexed. In the meantime, users...
December 2011
3 posts
6 tags
Scrolling back in screen
A few years ago I discovered screen, a nice Linux tool that enables you to detached from terminal with commands running and all in the background. You can even connect later from a different computer and continue where you left off. I initially used it for rtorrent, but now I also use it to administer remote computers, for example when I start to do something that might take more than a day, I can...
3 tags
Why is Firebird better DBMS than Oracle?
Beside being free (both as beer and also open source), you don’t need 24x7 DBA and there are generally less headaches. Here’s a nice example explained by Norman Dumbar in a mailing-list post. Norman administers over 600 Oracle databases and about 40 Firebird ones:
Oracle uses log files for REDO and has ROLLBACK_SEGMENTS or UNDO Segments (depending on Oracle version) for UNDO. It...
5 tags
Using Quicken Home Inventory Manager on 64bit...
No, Quicken does not support 64bit Windows 7 yet. And there are no plans to do so. A few months back, GuacoSoft has released a new version of Attic Manager that is able to load data from Quicken directly. You can then export it into csv, excel, whatever OR simply use Attic Manager to manage the inventory.
Initial version of Attic Manager with this support (2.03) was only able to load data from...
November 2011
2 posts
3 tags
YouTube bug report bug LOL
Looking for a way to report a problem with YouTube software I found a link “Report a bug” a the bottom of the page. However, when I clicked it, I got redirected to:
http://www.google.com/tools/feedback/intl/en/error.html
Which says:
An error has occurred
We are sorry but we were not able to capture your feedback.
Stuck SSH session
When logging from my laptop to remote SSH servers I had a strange problem. Whenever a big chunk of text needs to be returned, my SSH session would stuck and completely stop working. It would not disconnect, but just stay there doing nothing. I would have to log in again. By “big chunk” I mean something like 20+ lines. Output of “ps ax” for example.
This mad me so mad,...
October 2011
7 posts
4 tags
3 tags
Disabling alerts stops JavaScript execution in...
Today I learned about interesting issue with newer versions of Firefox (I use FF7). It has a nice web developer-friendly feature to disable alerts. This is really useful when you place alert() by mistake in some loop and you can’t get out because as soon as you click OK, you get another one.
New Firefox has a checkbox to disable future alerts. And this is great. So, what’s the...
4 tags
How to export data from QHI? →
Unfortunately, Quicken Home Inventory does not work on Windows 7, and you might have a hard time switching to another program because QHI does not have an option to export the data.
However, there’s a way to work around this. A program called Attic Manager, can import the data directly from Quicken database, even if you don’t have Quicken installed. It even works on 64bit Windows. You...
4 tags
How to use Quicken Home Inventory on Windows 7...
If you are looking for a way to use all the data you have already entered on Windows 7 box, you came to the right place. Although the short answer is: “you really can’t do that with QHI”, there is an easy solution to this problem…
There is a nice inexpensive replacement called Attic Manager, which is able to load data from QHI even on Windows 7 computer without Quicken...
3 tags
Building wxWidgets 2.8.12 on old MinGW with GCC...
I had a application using wxWidgets 2.8.0 and then 2.8.8 in production. There were some bugs in earlier wxWidgets versions on Linux, so printing was not working properly. I decided to upgrade wx and that fixed it. Now I wanted to use the same version for Windows version of my application. I originally used some (now old) MinGW version and just wanted to rebuild and be done. But, I got build errors...
2 tags
nginx hogs cpu when proxying large files
I have a server where nginx is used as frontend for Apache. nginx serves static content and Apache serves PHP pages. This is a common setup.
Today I migrated stuff to a new server and needed to copy a 7GB database file to another server. I figured HTTP would be fastest way to do it. Unfortunatelly, DNS change already went thought so I could not serve the file on the static domain nginx was...
3 tags
Merging a huge git conflict
Both me and my colleague work separately working on same git tree while being offline for a couple of days. Result: following “git pull” I got a huge conflict spanning about 100 of files.
This meant that manual resolution is out of question. Enter “git mergetool” and “kdiff3”. I installed kdiff3 from linuxpackages.net (version is for old Slackware 11.0, and I...
September 2011
4 posts
1 tag
Google Apps problems
Seems to be a fine day at Google today, perhaps engineers are pulling hair.
This morning, I was looking at a spreadsheet in Google Docs and suddenly some 20 values simply vanished right before my eyes. I wasn’t even working anywhere near that part of the sheet. I was inserting new values at bottom and somewhere in top-right corner the values were gone. I tried undo and to scroll around (big...
Stackoverflow.com scaling problem
I have been stackoverflow user almost from the very start of the website. I recall reading some Jeff Atwood’s blog posts and thinking how naive he is. He has a classic case of Microsoft fanboy-ism. He swears by .net and MSSQL server and spits on Linux, PHP and… well… entire LAMP stack.
When stack became popular the website started to get a lot of traffic and Jeff was all like...
5 tags
Performance of PHP if, switch, arrays... using...
For the game I’m making I have a bunch of array which represent a puzzle player needs to solve. Ensuring puzzle is solvable is CPU intensive, so I pre-calculated a couple of thousands of puzzles and select one randomly. Since puzzles are static data which is not going to change, I decided not to burden the database with this because DBMS is always overloaded with other stuff anyway.
My...
4 tags
Safe way to dual-boot Linux and Windows 7
I had a client’s machine installed with Windows 7 and some free hard disk space for Linux. I decided not to install the Linux boot loader because:
I did not have Windows install/rescue CD at hand
in case something goes wrong I could not boot into Windows
I had some experience in the past with Windows XP where it simply did not work
Since re-installing Windows or even fixing Windows if it...
August 2011
8 posts
2 tags
How to explain recursion to a kid
Once upon a time, there was this kid that wanted to know about recursion. His father told him:
Son, once upon a time, there was this kid that wanted to know about recursion. His father told him:
Son, once upon a time, there was this kid that wanted to know about recursion. His father told him:
Son, once upon a time, there was this kid that wanted to know about recursion. His father told him:
...
3 tags
Benchmarking PHP vs C for pure loops and array...
I’m creating a gaming website and one of the games has a complex CPU-intensive AI. Many possible positions for player and computer need to be examined before heuristics can do their work. For this I stack the game state, play a hypothetical move and run AI on it again. The number of moves it looks ahead is configurable, but the more there are the number of possible combinations grows...
Sign-up the moment you visit the website 3 times...
More often than not I find myself in situation to want to post something to a website forum I have been following for a long time. Latest example is today with HackerNews. I have been reading HN for about 6 months and today was the first time I was compelled to post something. I was able to comment the existing threads right away (which is nice), but not able to post a new link - most probably...
3 tags
2 tags
Access computers behing firewall with SSH
At our company we manage 100+ Linux computers remotely. Those are mostly clients for our ERP application, and sometimes you simply need to log in to fix something or help the user. Most of them are behind the firewall. In the past, we always had a deal with client’s IT staff to open a certain port on their firewall and forward it inside to SSH port at our machine. This works nice, but there...
3 tags
7 reasons why Yii framework is better than...
I guess this will not be the first nor the last text comparing those two frameworks, but I got so amazed with Yii that I have to write it.
Let’s be clear, CodeIgniter is just a little bit more of a simple MVC framework. Yii is a complete web-development framework used for rapid web application development. Let’s compare them in detail…
CodeIgniter is great for beginners. If you...
3 tags
Script to SCP changes from git repository to web...
I’m using Git to track source code changes and I host most of my websites on servers where I have SSH access. I never liked ftp much, so I’m using SCP to upload all the files. One of the main tasks is to upload the source code files that have changed since the last release. To do this, I first use gitk to find the last revision that got uploaded to the server and then diff the changes....
Moving ahead...
Today I got sick and tired with problems of posterous.com, the service I used to host my blog. I heard Tumblr is really good so I decided to give it a chance. My first test is whether I can post the source code snippet, which is very important to me because I often post code samples.
for (int i=0; i < 10; i++) { printf("%d\n", i); }
June 2011
4 posts
2 tags
Weird GMail login path...
Today I noticed something really strange. I’m logging into my GMail account, and the login page redirects the browser to some youtube.com subdomain before redirecting back to my inbox.
Looks like now I can “like” YouTube videos without having to log in! Hurray!
Although this is a strange way to make it work, I appreciate the end-result even if it means one more redirect. I just...
3 tags
Things that hamper my productivity
Almost each day I’m facing obstacles that cut my workflow, make me go around or just make me go mad. Here are some that repeat every once in a while or just happened recently:
1. Firefox crashing 2. Google Apps multi-login failure 3. Linux terminal 4. Liquidweb routing 5. Xorg server killing keyboard 6. stuck SSH sessions
Ok, let’s go into details:
1. Firefox crashing
One of the...
1 tag
Facebook CAPTCHA fail
I just got a CAPTCHA for a link I wanted to share on Facebook. WTF? Maybe I should be using twitter after all.
However, the big problem is that CAPTCHA dialog doesn’t really work. I’m using Firefox 4, the CAPTCHA words show for a few seconds and suddenly entire dialog is gone and I only have Submit and Cancel button. Of course, trying to submit fails the test and dialog pops up again...
1 tag
Compete with the best in the world... countdown
CountdownGames.tv is a website where you can play the games of logic and knowlegde against the best players in the world. Every day a new round of 6 games is introduced and players compete for the top spot in monthly rankings.
Come play at: www.CountdownGames.tv
May 2011
1 post
1 tag
Final nail in GoogleApps coffin
I have 4 domains using google apps accounts and been mostly using e-mail on them. Today some of the domains switched to new whatever and multiple-domain feature started to wreak havoc. I was able to use multi-account for about a month until today. Even that was a major PITA as I had to log into accounts in correct order, otherwise you get the darned “page is redirecting is such way that...
March 2011
1 post
2 tags
A message to GMail team
Please, please, PLEASE, stop changing the € sign in my messages to word EURO. You don’t translate $ into DOLLAR, so keep my € as it is.
February 2011
1 post
2 tags
Converting MySQL database to Firebird
I decided to automate conversion of MySQL database to Firebird. I got tired of manual find&replace process, and created a small parser that changes from MySQL to Firebird syntax. Currently it only supports database structure dump (no data, only structure) from PHPMyAdmin. Not all datatypes are supported, but feel free to “fix” it. It’s written in PHP and it’s open...
January 2011
1 post
1 tag
Google's new Apps problem
I’ve been using gmail account for personal stuff for some years now, and I also have a google apps account for company domain. I the past I was able to log into both using the same browser in different tabs. In 2011 all apps accounts will be upgraded to new software, so you can use them as regular google accounts. This is great, except there’s one bug that makes this change actually...
October 2010
3 posts
1 tag
Problem with wxWebConnect and printing
I started using wxWebConnect by Kirix in one of my applications and ran into problems with printing. When using the latest XULRunner 1.9.2.10 the Print() function would not work at all. Looking into wxWebConnect code, it seems that it did not manage to get either of settings for XULRunner 1.8 or 1.9. First I thought about using 1.8, but had some problems downloading it and I tried 1.9.1.13...
1 tag
2 tags
How to install Perl module
I am losing 15 minutes googling everytime I need this.
# perl -MCPAN -e shell
...
cpan> install Term::ReadKey
September 2010
2 posts
2 tags
Converting MySQL database to Firebird - part1
I have a heavy-used website powered by LAMP stack (CentOS Linux, Apache 2, MySQL and PHP). It started on a shared hosting so I had to use MySQL. Year and a half later, I switched shared, virtual hosting and not run it on a dedicated server. I decided to try Firebird to see how it performs and also how it compares to MySQL in RAM usage, disk usage, etc.
The software
The system is CentOS...
2 tags
Changing timezone on CentOS 5.5
I wanted to change the timezone of my CentOS server to be UTC-3 or -4. I followed some instructions on the Internet, and did this first:
# rm /etc/localtime # ln -s /usr/share/zoneinfo/Etc/GMT-4 /etc/localtime
However, the clock (“date” command) now showed 4 hours more instead of less. I tried something like:
# ln -s /usr/share/zoneinfo/Atlantic/South_Georgia /etc/localtime
and that...
July 2010
4 posts
2 tags
Creating screencast with audio on Linux
By screencast I don’t mean slideshow, but real-time recording of screen. I used the following software:
- recordmydesktop - mencoder
Recordmydesktop is great program, it only has one subtle bug: it does not allow X or Y coordinate to be zero, so I had to move all the windows 1 pixel to the right. No big deal. I recorded on a 1024x768 area using 1680x1050 screen, so there was plenty...
1 tag
TweetMeme fail
I have an issue they described here:
http://help.tweetmeme.com/forum/topic/467
However, this is what really sucks:
“If you encounter the problem please could you report it in this forum. We need a bit of information to help us, including your Twitter username and the browser you are using.”
I call that BS. As if they don’t have that information available already. My twitter...
1 tag
CKEditor with dark background
I have a website with dark background and light colored text and needed some WYSIWYG editor for on of the forms. Only special requirement is support for smileys. I considered:
CKEditor
TinyMCE
openwysiwig
Xinha
wmd
wmd is not WYSIWYG, so that one was off. openwysiwig was easiest to configure, but same as Xinha it did not have simleys. So, I was left with “power” ones.
...
2 tags
PHP unserialize bug and CodeIgniter
Using PHP’s serialize function to serialize and array or object where some element is a string with UTF8 data creates the serialized string properly. However, unserialize function fails to unpack that data. I ran into this when setting session flashdata from my CodeIgniter application. The solution I find to work (not sure if it’s perfect though) is to use mb_unserialize function...
June 2010
2 posts
4 tags
Printing from Windows machine to CUPS printer via...
I have a laser printer installed on a Linux box which is working from Linux correctly. I can also print from other Linux machines in the network via CUPS. One of the machines in the network runs Windows. I shared the printer via Samba, so that Windows can “see” it via standard Windows networking. Windows has driver for this printer installed, but CUPS won’t allow it to print. The...
Something's wrong with routing at #liquidweb
I cannot reach some of my websites for days now (from Europe):
traceroute to guacosoft.com (67.225.154.235), 30 hops max, 38 byte packets 1 192.168.0.44 (192.168.0.44) 1.558 ms 1.578 ms 1.398 ms 2 WIRELESS-CORE.panonnet.net (82.208.248.250) 4.029 ms 3.961 ms 3.912 ms 3 CORE-WIRELESS.panonnet.net (82.208.248.249) 4.229 ms 4.289 ms 4.095 ms 4 213.163.35.241 (213.163.35.241) 13.144 ms 7.760 ms...
May 2010
1 post
1 tag
A few useful Linux commands
…I learned listening to TuxRadar radio…
xxd - hexadecimal dump of a file, works both ways (you can edit the dump and save back to file)
xinput list - list and set up input devices for X window system