Multiple scripts update

April 7th, 2010

following are the modified scripts and their changes:

aa_all_common.user.js – fixed progress notification not being displayed on multiple concurrent executions, added debug support
aa_sp_common.user.js – fixed md5 hash not being correctly processed; fixed on every post callback when a postid is not found
aa_sp_mod_common.user.js – added support to ask for forumID in MoveTopic function
sp_warn_helper.user.js – added more include urls; added automatic explanation support; changed behavior to not clear suspension on warn; increased ban spammer execution wait to 25 seconds
sp_acrhive_pm.user.js – added more urls to include; changed behavior to archive only the messages older than 7 days and leaving at most 50 messages in folders

Related posts

Major change: switching from tighurl to yourls

March 8th, 2010

I just migrated from tighurl to yourls. I must say the interface is nicer and the overall user experience is better as well. Not to mention that it integrates better with WP and twitter autoposter 🙂

Related posts

*.ru sites are now banned from my emails

February 4th, 2010

After banning *.cn sites, it’s high time for the russians to go as well. I am truly sorry innocent russian people who want to email me their website: I no longer accept such emails. Notice that I am taling about websites contained in the email, not email addresses or other stuff 😉

Related posts

Using SWbemRefresher in delphi

February 1st, 2010

Somebody asked me to help him get a working delphi code for SWbemRefresher. I obviously tried the first natural approach of using the WbemScripting_TLB unit but that didn’t work.
So, since I couldn’t get the early binding to work (using the interfaces and such) and since the VBS code from MSDN works (I previously tested it), I went with late binding just as VBS, which obviously worked. here’s the code:

http://msdn.microsoft.com/en-us/library/aa393838%28VS.85%29.aspx

function GetObject(Value: String): IUnknown;
// from russel: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20875677.html
var pUnk: IUnknown;
pmk: IMoniker;
pbc: IBindCtx;
cbEaten: LongInt;
clsid: TGUID;
begin

// Check value to determine if this is a programmatic id or a moniker
if (CLSIDFromProgID(PWideChar(WideString(Value)), clsid) = S_OK) then
begin
// Attempt to get the active object, clear the result on failure
if not(GetActiveObject(clsid, nil, result) = S_OK) then result:=nil;
end
else
begin
// Moniker name
if (CreateBindCtx(0, pbc) = S_OK) then
begin
if (MkParseDisplayName(pbc, StringToOleStr(Value), cbEaten, pmk) = S_OK) then
begin
// Attempt to bind the moniker, clear the result on failure
if not(BindMoniker(pmk, 0, IUnknown, result) = S_OK) then result:=nil;
// Release the moniker
pmk:=nil;
end;
// Release the bind context
pbc:=nil;
end;
end;
end;

procedure getprocesslate;
var objServicesCimv2,
objServicesDefault,
objRefreshableItem1,
objRefreshableItem2,
RefreshableItem,
objRefresher:OleVariant;
i:integer;
begin
// Get namespace connections
objServicesCimv2 := GetObject('winmgmts:root\cimv2');
objServicesDefault := GetObject('winmgmts:root\default');

// Create a refresher object
objRefresher := CreateOleObject('WbemScripting.SWbemRefresher');

// Add a single object (SWbemObjectEx) to the refresher. The "@"
// is used because _CIMOMIdentification is a singleton class- only
// one instance exists. Note that the
// SWbemRefreshableItem.Object property must
// be specified or the SWbemRefresher.Refresh call will fail.

objRefreshableItem1 := objRefresher.Add(objServicesDefault, '__CIMOMIdentification=@').Object;

// Add an enumerator (SWbemObjectSet object)
// to the refresher. Note that the
// SWbemRefreshableItem.ObjectSet property
// must be specified or the SWbemRefresher.Refresh call will fail.
objRefreshableItem2 := objRefresher.AddEnum(objServicesCimv2, 'Win32_Process').ObjectSet;

// Display number of items in refresher and update the data.
ShowMessage('Number of items in refresher = ' +inttostr( objRefresher.Count));
objRefresher.Refresh;

// Iterate through the refresher. SWbemRefreshable
// Item.IsSet checks for whether the item is an enumerator.
for i := 1 to objRefresher.Count do
begin
RefreshableItem:=objRefresher.Item(i);
if RefreshableItem.IsSet then
ShowMessage('Item with index ' + IntToStr(RefreshableItem.Index) +
' is an enumerator containing ' + IntToStr(RefreshableItem.ObjectSet.Count) + ' processes')
else
ShowMessage('Item with index ' + IntToStr(RefreshableItem.Index) +
' is a single object containing WMI version ' + objRefreshableItem1.VersionCurrentlyRunning);
end;
end;

Related posts

Major upgrades and changes

January 31st, 2010

During the past couple of weeks I’ve been doing some changes with my server; this might have been noticed from outside too.
Getting down to business, it’s like this:
– I dropped my second ISP so basically my main server remained without a backup internet connection. It’s too expensive to keep a backup during these times 🙂
– I upgraded my server from my old desktop dell pc PIII with 256 mb RAM to a newer server dell pc dual proc PIII@866Mhz with 512 MB RAM and 2 19GB SCSI HDD in software raid (0 for swap and 1 for rest). Sometime in the near future I plan a memory upgrade, not sure yet how much since the MB has only 4 memory slots and all 4 of them are filled. Obsiously I moved the 80GB hdd from the old pc to the new server 😀
– I installed centos 5 latest CLI only and switched from “source-based” to “rpm-based” using yum (you might not know but everything on my old server was source based. needless to say that upgrading was a real pain specifically when I had to upgrade commonly used stuff such as libs or compilers or even interpreters)
– I downgraded mysql from 5.1.x to 5.0.y (it’s basically what centos came with)
– upgraded xmail from 1.23 to 1.26
– upgraded apache as well from 2.0 to 2.2 (centos came with)
– downgraded php from 5.2.x to 5.1.6 (it wasn’t properly supported by most of my sites anyway)
– upgraded gallery2 plugins to latest (not gallery 2 it self yet)
– upgraded smf from 0.9 to 1.1
– upgrade wordpress from 2.8.6 to 2.9.1 (did you know that the migration tool DOES NOT work? I just found out myself)
– upgraded php link directory from 2.1.1 to 2.2.0
– partially upgraded joomla and components to 1.5 latest
– dropped bugzilla and a bunch of other stuff

and now, I’m watching the logs to see what else is not behaving properly and fix it.

I had so many things I wanted to write about while I was doing upgrades but I forgot most of them. I’ll try to summarize how it all went.
– I wanted to start out clean and fresh so after installing and upgrading all the needed software, I started installing the first sites. And I started with wordpress.
My first idea was to create a reverse proxy with apache but I just couldn’t get that working with wordpress.
So I then decided to actually move the old things to the new hdd and export then import the DB data. However, I did the stupid thing of changing all tables to use myisam engine so now I had to install all the software from scratch so that the db structure is recreated as needed and then semi-automatically add the data. Now that was painful.
I have to mention that I had a lot of trouble moving the data around too, as I needed a jumper for the storage hdd (the 80 gb one) to make it primary and I also needed a longer ide cable so I could fit both the hdd and the cd-rom in the casing. I took the jumper out of the cd-rom since I couldn’t find an ide cable so right now I’m running with no cd-rom. I shouldn’t need that anyway, unless the system goes down since I do everything from remote.
There is still the problem of accommodating the new server space-wise since the old one was a desktop, “flat”, and this one is tower.
I also had to change the fans since they were pretty loud.

Well, that’s about all I remember now. But since I was struggling with this for over a week, you can imagine how much trouble I was in. Anyway, let’s hope for the best and that now I can resume my site-migration from html+ssi+cgi to joomla.

Related posts

False/True is not a valid integer value for field blabla

January 10th, 2010

Ok, so you designed a small mysql table with a boolean field which got translated to tinyint(1). You then wrote your query in delphi and populated your querys fields and the field got mapped to a TSmallIntField.
And then, on top of everything, you placed a db-aware checkbox on the form to set that field and now you are getting the error
“False/True is not a valid integer value for field blabla”.

What to do? Well, since delphi won’t map your field to a TBooleanField as it should (since the field is actually an integer), you must do it yourself. So, close the project, open your favorite text editor and modify the dfm and pas files so that those fields are now of type TBooleanField.

Then, right before the form declaration add the following:

TBooleanField=class(DB.TBooleanField)
public
constructor Create(AOwner: TComponent); override;
end;

and in the implementation section

{ TBooleanField }

constructor TBooleanField.Create(AOwner: TComponent);
begin
inherited;
SetDataType(ftSmallint);
end;

If you need this in more then one form, then create a unit, like MySqlBooleanField.pas and then add it to the uses clause AFTER the DB unit.

That’s it, you’re all set.

Related posts

New contact page

January 4th, 2010

A couple of days ago I created a new contact page based on joomlas contact page layout. Default. And then today I got a spam message. I researched a bit on how to add captcha to it and tried 3products: securityimages, Alikon secure form, and anotehr one I don’t remember.
Finally I gave up and installed chrono forms which indeed is a cool thing.
Unfortunatelly it has troubles with joomla’s internal SEF.
Well, that’s not a big deal for me right now since the old /contact.html page is redirecting to the new url anyway but I will probably try and figure something out whenever I’ll remember about this and will have time for it.

Until then, the new contact page is much better than the old one 😀

Related posts

Killed web project your-quotes

January 2nd, 2010

I just killed the web project your-quote (was at .info then moved at .ciuly.com where now only an information page about it’s “death” appears).

Forgot to mention that I dropped the entire DB schema with all users and associated information. that info is still present in the backups but as always, privacy is respected.

Related posts

testing “new” wp to twitter plugin

January 2nd, 2010

with my “new” url shortener: the old alus.ws which moved to s.ciuly.com

Related posts

“Compacting” web sites

January 2nd, 2010

Having a lot of domains that bring in no cache is too expensive, especially now with this world-crisis, so I decided to drop the domains that don’t pay for themselves.
Thus alus.ws, the url shortener service has moved to s.ciuly.com (s from short).
ciuly.info moved to info.ciuly.com
empty-directory.info remains as it is at least until march when the domain expires. I have set up dedicated adsense channels to see the exact revenue the site is bringing. Based on that I will decide if to keep it or not.
ciqcs.com moves to ciqcs.ciuly.com

Related posts