Wednesday, March 12. 2008Domains avaliability checker
About a month ago I've written a simple domain checker, which is using whois.net to get the domains availiable. The main goal was to find free 3-symbols domains.
BASH: #!/bin/sh if [ $# -lt 1 ] then echo "usage: `basename $0` extension Check domains avaliability examples: `basename $0` com "; exit 2; fi EXT=$1; LAST_FILENAME=/tmp/dc_$USER$EXT.last if [ -f "$LAST_FILENAME" ]; then LAST_DOMAIN=`cat $LAST_FILENAME`; fi for DOMAIN in {{0..9},{a..z},-}{{0..9},{a..z},-}{{0..9},{a..z},-} do if [ "$DOMAIN" \< "$LAST_DOMAIN" ]; then continue; fi trap "echo $DOMAIN > $LAST_FILENAME;exit;" SIGHUP SIGINT SIGTERM STATUS_STRING=`wget -qO - http://www.whois.net/whois_new.cgi\?d\=$DOMAIN\&tld\=$EXT | grep 'Status'` echo "$STATUS_STRING" | grep 'free' && echo "$DOMAIN.$EXT" >> ~/domains_found_$EXT.txt && echo "the domain is free: $DOMAIN.$EXT" | mail -c my@mail.com -s "free domain" other@mail.com sleep 7 done The thing is very simple and the results can be kept on. Additionally it sends mail messages about each found domain. Lets see, what it brought for the .de domains ( about 9000 free domains was found Continue reading "Domains avaliability checker" Saturday, March 8. 2008Map objects recursive in perl
One interesting thing I've got stucked on - if we have some multilevel arrays/hashes (which aren't the same in perl), there is no standard way to change all the object's values. The only thing I've found usefull is map function, which nevertheless works only for map arrays. However, it could be very usefull, to have a possibility to change each scalar element of some multilevel object. For example, if you ever used XML::Simple, you could observe the following behavior with values, which contain new lines.
XML: <root> <elem>asdf</elem> </root> Continue reading "Map objects recursive in perl" Wednesday, March 5. 2008Relicensing PHPurple
Just a short message. PHPurple is falling back to GPL. It will get neither PHP nor any other (commercial) license ever. The ground is simply, the libpurple is GPL'ed itself and the developers count is so much, that there is no chance to get a special permission to do this. If you interested in details of this discussion, take look at the libpurple's developers mailing lists.
Sunday, March 2. 2008PHPurple 0.1.0 pre-alpha
The first pre-alpha is released and can be downloaded at http://sourceforge.net/projects/phpurple/. The common documentation I've started to make was placed to http://phpurple.rubay.de/.
The main features implemented are: - send and recieve IMs - fully implemented account dsn like string - ability to make account specific settings - basic work with buddy, buddy group and buddy list Continue reading "PHPurple 0.1.0 pre-alpha"
Posted by Anatoliy Belsky
in C/C++, Linux, PHP5, PHP5 extentions
at
16:14
| Comments (35)
| Trackbacks (0)
Friday, February 29. 2008Building static executables on Linux
An interesting question I had to answer a couple months ago was - how could I compile an executable statically, so then it works on various linux distributions without the need to install some additional libs. Of course, such the executables are bigger as that, which was compiled in order to use the dynamic libs. But if one wanna to have an independent production executable, this is what one could need.
So, I will explain the thing with the help of an example program, which uses ncurses. First I'm creating the project dir, for example: BASH: user@host~$ mkdir ~/programming/static_test user@host~$ cd ~/programming/static_test Continue reading "Building static executables on Linux" Sunday, January 20. 2008Postfix + Dovecot SMTP and IMAP on Debian Etch
Yesterday I was configuring the mail server on my hosting. Because I'm mostly doing programming, not administration, I'm writing this notes which are serving as a simple how to, if I must do it once more in a couple of years.
In spite of the fact I've done all on Debian, all the described things schould work on some other Linux distribution as well. First install Postfix and Dovecot The configuration will fulfill the following points:
Continue reading "Postfix + Dovecot SMTP and IMAP on Debian Etch" Saturday, January 12. 2008phpurple new oo design,
and so it will be in the future ...
Namely, i had the excellent oo design suggestion from the Alexey on the pecl mailing list (and it is better, than I could invent), and it works fully for php 5.3 and unfortunately partly for php 5.2. So lets take a look on it ... just get the latest version ... CODE: user@host~# svn co https://phpurple.svn.sourceforge.net/svnroot/phpurple/trunk phpurple
Continue reading "phpurple new oo design, "
Posted by Anatoliy Belsky
in C/C++, Linux, PHP5, PHP5 extentions
at
19:43
| Comments (0)
| Trackbacks (0)
Monday, December 24. 2007phpurple
Some time ago i've started to write the binding for the libpurple, the im lib. About 3-4 weeks ago i had a simple functional implementation, which i've presented on php pecl and libpurple mailing lists. Subsequently i've completely revised the whole thing to be OO and would present it again. There is the same minimal functionality implemented, but all is OO. So, lets begin. First install the php development package and get the code:
CODE: user@host~# svn co https://phpurple.svn.sourceforge.net/svnroot/phpurple/trunk phpurple Continue reading "phpurple"
Posted by Anatoliy Belsky
in C/C++, Linux, PHP5, PHP5 extentions
at
19:39
| Comments (20)
| Trackbacks (0)
Sunday, December 23. 2007I know the future weather
A simply and cool script for the weather forecast. May be even correct
.. thanks to Weather::Underground perl module PERL: #!/usr/bin/perl use Weather::Underground; Continue reading "I know the future weather" Find files with appointed size from command line
If you have a hosting, you usually have limited disk capacity on it. Some times there are file managers in the hosting control panel, some times not. Here I will explain how to get disk space used, if your hosting control panel has no file manager. | So, each GNU system always has two built-in commands to determine the disk and file space usage. They are 'du' and 'df'. Because most hostings working with GNU based operating systems like BSD or Linux, we have a right to suppose, that we have ssh login and aforementioned commands available on it. If it's so on your hosting, read further
Continue reading "Find files with appointed size from command line" Software MIDI synthesizer for SuSE
I'm a midi fan, but since I have a soundcard without the ability to load soundfonts in the memory, I looked constantly for a solution, which will make possible to listen midi. And I found timidity.
| So, the ability to listen midi files means at the same time the ability to edit midi files, and that's exactly what I'm pressing for. I've tried to play midi with timidity, and the result exceeded all my expectations. But the first difficulty for me was - not all sounds was on the right place or was missing at all. So first what I needed was a good midi map and soundfonts. First I've searched SuSE root tree and found some things under /usr/share/sounds/sf2, but their quality was not sufficiently even for purposes of listening and they was incomplete. Than I've found some really good soundfonts there (ftp://ftp.lysator.liu.se/pub/awe32), they have much fewer "gaps" and can be already used, but I don't know if they are completely GPL friendly. Finally, when I found two solutions - the timidity rpm from Arklinux and freepats (SuSE recommended), that containing all complete midi maps and all the soundfonts needed, I've understood how great fits the timidity for midi playing. And now I'll tell you, how to make a software midi synthesizer with timidity. Continue reading "Software MIDI synthesizer for SuSE" aMule daemon for SuSE
aMuleis a very comfortable p2p client. For Linux it has even the daemon aMuled and the text style interface aMuleCMD, which means a great solution for the remote control. | First install amule (with yast apt or whatever you use) or download aMule here http://www.amule.org/ and compile it. Don't forget to create or edit /home/username/.aMule/amule.conf.
Continue reading "aMule daemon for SuSE" Stop image hotlinking with Perl
Sometimes there are things, which can bring everyone to the rage accumulation. For example if traffic of the server is exceeded because of hotlinking and it's measured at least in hundreds of megabytes. | So, for me this is only a story about someone else because I'm always using the following script, if the traffic of the server is not unlimited. I've used Perl to convert or resize images, because according my measurements Perl was doing this at least twice as fast as PHP and more qualitatively as PHP (this concerns anyhow PHP4). Only the one weakness can prevent you from using this script - it works with HTTP_REFERER server variable and since some browsers, firewalls or proxies for any reasons don't sending this field to the webserver, you can punish innocent people, who want only to see your images. But the advantages are evident - you can place your images out of the web space and show them only if they has been called from your web site. Lets go on.
Continue reading "Stop image hotlinking with Perl" Many graphic files to one book howto
One day I needed to make a big pdf file from many graphic files. There was no simply solution for this and I wrote this little shell script.
There are several programs, that can convert any file to pdf (for example OpenOffice). But if you have 100 separate files and you want to make a one book from them or print them, it's no so pleasant to do this manually, adding file by file to OpenOffice and then saving as a .pdf or printing. That's why I'm showing you my solution for this. Continue reading "Many graphic files to one book howto" Starting the blog
So ok, I'm starting my own blog now. I had already some articles on my old website and will transfer them later here too.
« previous page
(Page 2 of 3, totaling 31 entries)
» next page
|
CategoriesQuicksearchArchives |