Learning PHPinux

Yamaha YPT310

Posted in Hardware, Music by gf4e on July 3rd, 2008

I have decided on buying a Yamaha YPT310. It has everything a beginner needs, and is affordable at the same time. 61 Touch Sensitive keys, 32 voices, a lot of instruments and styles, MIDI capabilities. So I will be able to learn how to play, and at the same time will be able to connect it to my laptop through a built-in MIDI in/out interface. So the keyboard + MIDI-to-USB adapter and I am good to go :) Okay rest of me, time to earn some money!

PDF to Text + PHP

Posted in Development, PHP, Software by gf4e on July 3rd, 2008

I have had a little project at work. The task is to convert a .pdf file into plain text, and then cut some parts out of the text to use them in my database. Well, the hardest part of it all was that I had to use PHP to do it. I had been looking for a conversion tool, but never really found anything. FPDI did not do what I needed, so I came across xpdf. I had to use “exec()” function of PHP to perform the conversion, but the output turned out to be very messy. So after some manipulations with the text I managed to convert almost all breaks. How much time I am going to spend on trying to “preg_match” the whole text for the stuff I need, I don’t know. I am sure it is not going to be easy, since it is not even HTML with all its tags and stuff. The thing is the conversion output format strictly depends on how the document was formatted in pdf. Well, according to my .pdf file, the creator was way far from publishing. Oh yeah, the tool is called pdftotext and is a Windows executable. However the package is distributed under many operating systems, so everybody can find a suitable package.

No WWW

Posted in Internet by gf4e on July 3rd, 2008

This 3w thing has always made me mad. I can understand when DNS servers have “www” as an alias of every domain, but when you go for http://domain.com, but cannot access it unless you put it with “www” before, that just gets me. Whether they do it on purpose, or server administrators are just lame, I don’t know. So I decided to put a no-www.org button on my page when I get to have my own domain and hosting. Be smart people, learn how to adjust your BIND settings!

Synth for a beginner

Posted in Hardware, Music by gf4e on June 25th, 2008

I have wanted to buy a keyboard for myself for more than a year, but never got a chance and money to. Now as I might have the money by the fall, I have started to search for the best one for a beginner. I was kind of looking at Yamaha YPT310 or even 210, but still unsure because I know there are a lot of different manufacturers out there, which I do not even know about. Just have no idea what to choose. I just want it to be with MIDI support so I could hook it up to my laptop and use along with FruityLoops or Propellerhead Reason

cURL behind proxy and all the heavy stuff…

Posted in Development, Internet, PHP by gf4e on June 25th, 2008

Had to find a way to get webpages through proxy, and cURL for PHP was very helpful. Soon I am going to post a script with a possibility to use a proxy or not. Such a learning tip from me for people that might look for the same thing. I also decided to use Smarty and MDB2 with its MySQL driver for my new website automated monitoring system primarily because the script itself was too small to show to anybody :D Even though everything works well, I did not even realize that I would need a normal design for it, which I have no idea where to get. Anyways, cURL proxy usage example soon.

Tagged with: , , , ,

Learning Xerox, making money

Posted in Canada, Development, Life, PHP by gf4e on June 25th, 2008

Almost a month ago I got a job at a Xerox premium partner, funnily the position is stated to be a Sales Manager, but I am definitely not doing what I am supposed to do. Well, I guess it is because I got it only for the summer, since I need to go back to Toronto to continue studying. So I stick to my PHP and programming skills, while improving their clients’ website monitoring system. Well, there was no system at all when I came, but I decided that the process of getting new tenders has to be automated. It is another thing I will be developing aside from my shady project :) So I got all these materials and manuals as to learn my new job, which I will not be doing, though I think it will be useful in life. All the production and managerial books and catalogues I decided to read. Just to know the theory of selling with Xerox. If only people were buying our products instead of HP or Canon :)

Windows Vista = nice + inconvenient?

Posted in Software by gf4e on June 25th, 2008

I have had Vista on my precious laptop for almost a year now, but I am seriously thinking about installing something else instead. The only reason I have not installed another OS is because I don’t want to lose my license, which I do not even have a DVD for. This is probably the most annoying thing about this version of Windows. It creates a recovery partition on your hard drive taking around 7-10 GB of your space, and puts there everything exactly in the form, in which you got it when you bought it. So all you can do with that recovery partition is “recover” your Vista back to the original state. That means that you cannot do a fresh install, and therefore, you cannot control the process or choose any type of software or settings to set up. This is some crazy stuff, because I always thought that if you buy a copy of the OS, then you are entitled to an OEM DVD, so you can at least have those 10 GB for your own needs. It comes with all that stuff that I do not need, such as HP software, different CD burning and movie-making stuff. Almost 1 GB of games that you have to buy and a lot of other useless stuff. Also there is the new dumb defragmentation tool, which completely sucks compared to the one in XP. There is UAC, which pops up every now and then. The hardware requirements are just messed up, do not even want to talk about it. Aero is a little slow on older machines. BUT, I have to say in terms of security, it is a lot better than XP. I have been on the web the entire year and have not even picked up a single virus. So I guess Windows Defender must be working well. The Aero looks really nice, especially on widescreen big displays. I do not know what to say. When you just start using it, you think how dumb it is, then when you get used to it, you start thinking it is not that bad after all :D LOL I also had to find that EasyBCD tool to work with my Ubuntu without installing GRUB into MBR. By the way, I had to remove the partition where Ubuntu was, so now I do not have anything *nixy on my laptop. I have been so busy that I cannot even write something here.

Firefox 3 Beta 5 on Ubuntu 8.04

Posted in *nix, Internet by gf4e on May 6th, 2008

I have had it with it. It keeps freezing every minute no matter what pages I open. Even the lightest google.com hangs the browser. Had to use Opera instead.

Tagged with: , , ,

XAMPP - a fast way to create a local web-server

Posted in *nix, Development by gf4e on May 5th, 2008

If you do not want to compile Apache, PHP, MySQL and other stuff, there is a very easy way to get the whole web-server thing going. First thing you have to do is download XAMPP from here for your favourite OS (Linux, Windows, Solaris, Mac OS X). Then simply follow the installation instructions on the website (It is really simpler than anything, for all you have to do is extract the archive). Finally, you will have a webserver with Apache, PHP, MySQL, FTP-server, an accelerator, and everything that might be enabled. It also has a web-configuration tool that allows you to set passwords for everything through your favourite browser. Amazing package for home networks and local webservers.

Programming style

Posted in Development by gf4e on May 1st, 2008

Having worked with PHP for about 5 years, I have finally realized that there are so many different styles of programming. I mean, every developer has his own or ripped off somebody style. The most popular scripts have always seemed to diffcult for me, and may be I am just not qualified enough, but now I am starting to confuse myself with what I actually want to do. I am practicing OP, but I guess if you use it everywhere, your performance will fall down like an apple from a tree. So I decided that I have to find a compromise between OP and regular programming style. Right now I am focused on simplicity and performance, so I don’t want it to be to complex from the very beginning. I am planning to put only the most basic functions into my project. There will definitely be a plug-in system, authorization, default database and a simple template engine. I am writing everything myself, because I do not want to use these heavyweight third-party classes. The plug-in system will allow everybody extend the core without actually getting into the core code. Hope everything works out well.

Tagged with: , , ,