Friday, December 21, 2012

Automated ClixGrid clicking


If you are reading this, you probably know what ClixSense is and it's game - ClixGrid. If you do not know - check it out. Here I'll show you how to automate the clicking on the game (ClixGrid) - there is no captcha here, so you can easily do that with a bit of programming. I made a script in my spare time, so you won't have to program.

Here is a video of how the script is working:



WARNING! USE AT YOUR OWN RISK! I'M NOT RESPONSIBLE IF YOU GET YOUR ACCOUNT SUSPENDED!

Current Version: 20161023 (Changelog below)

How it works:

I use Selenium tests to mimic human actions. All the actions are applied without using the cursor, so you can use your mouse wherever you want - the clicks will still happen on the right places. The script generates random numbers to target the box it'll click. If the box is clicked, the script generates another set of numbers. If not - it clicks it, waits for the ad to complete and closes the popup. Then if there are tries left, it generates numbers again. Selenium doesn't solve the focus problem, though. Using only this script, you will automate the clicking, but you won't be able to use your PC, as you'll loose focus of the advertisements window, which will stop the timer. To solve this, I used a virtual machine - it has it's own focus, so I can use my primary OS as usual :) Because Clixsense can change the elements on the page, the script can stop working. I've included update feature to the script - after all clicking is done, the script opens this blog post, checks for newer version and alerts the user if one is available. It's good to be always up to date, to ensure the right working.

What you'll need:


1. My script.
2. Mozilla Firefox.
3. Selenium IDE addon.
4. Selenium IDE Flow Control extension.
5. (optional, but recommended) VirtualBox or any other virtual machine software.

How to install:

1. (optional) Install VirtualBox.
2. (optional) Install you OS of choice.
3. Install Firefox.
4. Install Selenium IDE addon.
5. Install Selenium IDE Flow Control extension.

How to update:

Just copy the new script over the old one and reload it, if you have loaded it into Selenium.

How to use:

1. Open Firefox.
2. Go to GlixGrid's page.
3. Open Selenium IDE (Ctrl+Alt+S).
4. Open my script from File -> Open (or press Ctrl+O).
5. On ClixGrid's board click on any box, watch the advertisement and close the window. If Firefox blocks the popup, allow all popups from clixsense.com and then continue with the instructions.
6. After one successful click on the grid, the script is ready to be run. Click on one of the play buttons you see on Selenium IDE and the clicking begins :) Watch the first one, just to be sure it's working. Sometimes, on start, Selenium IDE steals the focus from the popup, which stops the counter and the ad never completes, so be sure you watch the first ad and then you can go somewhere till this is done. If you are running the script in a virtual machine, then you can use your host OS as usual, because the script is running in the guest OS, which have it's own focus, so the windows are always focused, no matter the focused window on the host OS ;) This way you get a complete automation without having to watch the ads!

Changelog:
21122012: initial release

22122012:
- Added pause of 1s before clicking on close link. Till now, the period was a random number between 0 and 2s, but when the number was too low, "Stay on this page" dialog appeared, which brakes the script. Now the number is between 1 and 3s, so the problem should be solved.
- Now after version update check, if there is no newer version, the script redirects you to the GlixGrid page, to see your results of the clicking.
- Added check for remaining clicks at the beginning of the script. That way if you run the script for the second time, it won't fail, instead it'll go straight to checking for newer version.
- Removed useless echo command.

20121224:
- Removed onbeforeunload event from the popup. The fix in the previous version helped, but did not solved the problem entirely. Removing onbeforeunload event prevents "Stay on this page" dialog from ever appearing. In general, the dialog appears when you try to close the popup before he successfully reported to the parent site about the completion of the ad. So if there is no dialog to prevent this, the ad won't be counted, which is bad, but the script won't be broken, so he'll run the ad again, till it's counted.
- Fixed version numbering.

20161023:
- Fixed the script as it was not running at all (the id of the Close link in the popup was changed).

Monday, December 3, 2012

Points2Shop & CashPirate Android app download (apk)


p2s_intro by glamurtv

Points2Shop

I have Rena3 tablet, which is a nice piece of Chinese hardware. Good tablet, but as any Chinese thingy it has a horrible support. The latest Android version is 2.3.5 beta, which is bad, as the tablet is dual core with 512MB RAM, more than enough for Android 4.x. Not only I cannot upgrade to latter version of Android, but most of the apps in Google Play are "not compatible" with this device. I've tried many ways to unlock more apps, but I couldn't do it. One of the apps I really needed was Points2Shop. I ended up installing it on my sister's HTC phone and copying it from there to my tablet. It works flawlessly. So if you are like me and you cannot get the app from the market, here is a download link for the apk itself. I'll try to keep it up to date. Have fun!

PS: Here is my referral link, if you are interested in helping me ;)

Version 2.0.1017 (uploaded April 19, 2016 from Nexus 7 2013)
Download link: Points2Shop_com.points2shop.apk

Version 1.1.6 (uploaded September 16, 2015 from Nexus 7 2013)
Download link: com.points2shop.apk

Version 180.4.1 (uploaded March 30, 2015 from Nexus 7 2013)
Download link: com.darksciencemedia.p2s.android.apk

Version: 78.1 (Legacy)
Download link: Points2Shop.apk

CashPirate


CashPirate is an alternative to Poinst2Shop, which in my opinion is MUCH better. They pay for mobile app installations and they pay well. Also, they do instant PayPal redeems for as low as $2.5! You can get that for 3 days in a not well known country like Bulgaria - who knows how fast you can cash out in the USA! And of course they have the typical referral programs (10% for first level, 5% for second), but they also give the guy who registers as a referral a 50% increase in the earnings for the first 1000 coins ($1), which means by the time you normally get $1, you'll have $1.5 if you register as a referral to someone. So if you want to give it a shot, here is my referral code (for 50% bonus): CBVTUG. The coolest part of the app is that they allow multiple accounts under the same IP, so you and everyone in your family can install and use it without any problems, as long as it's on different devices of course. And get that - they can all be referrals to each other! Payments are done pretty fast - mine came for less than a minute after I requested it. They also don't send you any emails, so don't worry about SPAM. Here is a download link to the apk, in case you cannot download it from Google Play (the first link in this paragraph):

Version: 3.2 (updated June 23, 2014 from Nexus 7)
Download link: com.ayet.cashpirate.apk

Useful software

Both Poinst2Shop and CashPirate want you to install software on your device to earn money. Soon you'll run out of resources on the device so it's good idea to cleanup a bit. There are a lot of programs on the market for uninstalling apps, but I think the best way is still to use the Settings -> Apps to uninstall them. The only problem with that is that there is no quick way to access directly that menu. You have to open the drawer, choose Settings, scroll down to Apps and then you can uninstall. Fortunately, there is an app, Manage Applications Shortcut, which is just a shortcut to the integrated app manager in Android. Hope that helps!

Thursday, November 22, 2012

How to gain 100-350MB more free space upon Windows installation



When installing Windows Vista or 7 on a new hard drive, the OS creates a 100MB partition right at the beginning of the drive. If you are installing Windows 8, then the size of that partition is 350MB. I have Acer Aspire One ZG5 with 8GB SSD, which is very small and I have to make custom Windows installation, that use less space. Nevertheless, every MB counts! So if you are like me or you just hate that small partition that the OS creates, let me show you how to trick the setup not to create it. It's really simple - create partitions manually, not through the installer. Here's how:

1. Boot your installation.
2. When the setup wants you to choose partition to install Windows to, hit Shift + F10. This should bring command prompt to you.
3. Type diskpart and press Enter. Diskpart is an utility coming with Windows, so you really shouldn't do anything special to get it. In case you make your own installation, make sure you leave diskpart utility on the setup disk.
4. Type list disk and remember the number of the disk you want to partition. In my case it's 0, so replace 0 with your number from now on.
5. Type select disk 0.
6. Type clean (this will erase all the info on the drive, if any).
7. Now if you want the whole drive to be one partition (as in my case), type create partition primary. If you want to have more partitions, type create partition primary size=n where n is the size of the partition you want in MB. The rest of the partitions you can create again here, or later with the GUI.
8. Type select partition 1.
9. Type format fs=ntfs quick.
10. Probably not needed, but just to be sure type active.
11. Type exit, to exit Diskpart and then exit again, to exit cmd.
12. From the setup choose the partition you've just created and proceed with the install without loosing 100/350MB :)

Wednesday, August 8, 2012

DBSyncer - A tool to synchronize databases through repository


Recently I started cleaning my PC from old, useless code and projects that I had been working on in the past and then I came across DBSyncer - a project intended to sync databases through repositories. Pretty useful if you and your colleagues (or friends) are developing a website or system, and you need a tool to sync the database between all the dev computers. I started developing this project in my spare time back in the beginning of 2011 because I needed such tool at work, where we were constantly  fighting with database synchronization through our subversion. But then in May 2011 I found a better job, where I didn't need this tool anymore, so development halted. Still, the made progress is pretty good - DBSyncer is fully working. I never released it because I wanted to implement a couple of features to it, but never got the time. Now, after more than an year, I'll release it as is - I'm sure there will be people happy to use it. I only replaced deprecated functions in newer PHP versions with working ones. So, what DBSyncer offers?

  • Automated database synchronization
  • Database change revisions
  • Database revert to revision
  • Well documented API
  • GUI

The main part of DBSyncer is it's PHP class - DBSyncer.php (only about 33kb). All other files are optional. If you choose to use only this file, you'll have to make the settings manually. Info about this, how to use DBsyncer and what methods it offers, is provided in the docs. If you want to use the GUI, then you'll need all files from the archive (available to download at project's page in Google Code). GUI can help you with the following things:

  • Install DBSync
  • Add new database
  • Import database
  • Remove database
  • See revision changes for each database
  • Apply revision to database both forward and backwards
  • Add or remove revisions
  • Export database without data (structure only)
  • Make changes to the config

All of these things are provided by DBSyncer.php. The GUI only helps you to manage databases visually. Also note GUI won't sync your databases automatically. If you want that, then you'll need to implement DBSyncer.php in your project and use its methods. See docs for more info.

Main screen
Screen showing database revisions

There is some unfinished work with the GUI - no "please wait" screen when applying revision (probably somewhere else too). If I have time, I'll fix this.

Final words - Although not entirely finnished, DBSyncer is still a good piece of work if it fits your needs. Enjoy!

Wednesday, July 4, 2012

EasyPeasy on Aser Aspire One


Yet another post of the series. This time I tried EasyPeasy on my AOA110. It works really good, with the exception of WiFi - no bundled driver inside the .iso image. Also brightness settings are not working - only fn key combinations can be used to control it. Nevertheless if you want to try it, you'll need:
1. EasyPeasy images.
2. UNetbootin.
3. At lease 1GB flash drive.
Now run UNetbootin and select EasyPeasy's image and write it to your flash drive. Boot the flash drive and have fun :)

Sunday, June 24, 2012

Overclocking Dell Inspiron 1000

Yesterday I was cleaning-up my hard drive (yeah, it happens from time to time :D) and found a screenshot of SetFSB with the clock generator needed for my old Dell Inspiron 1000 (which I sold a couple of months ago) to be overclocked. I decided to publish it here, on my blog, so other people can find it, too. I remember when I was overclocking this laptop, there was absolutely no info about it on the internet! I had to experiment, but eventually I found out that the clock generator is ICS952001AF. Settings FSB to 188MHz allowed me to run the Celeron inside to 2.8GHz from the stock 2.2GHz! I don't have any benchmarks or stress tests, but I remember 2.8GHz was the max stable frequency I got. I used it for half an year without any problems. Inspiron tends to get a little too hot, though. So use on your own risk!

Thursday, May 31, 2012

Microsoft AutoRoute 2001 Portable Launcher


I couple of months ago I dug up Mazda EPC2 Portable Launcher from my archives and shared it with you. Yesterday I dug up my old copy of AutoRoute 2001 and decided to try and make it portable. Since it worked I'll show you what you need to get it working for you, too :) Actually there are 2 tings you'll need - installation CD and my portable launcher (available in the Download section bellow). This time I followed the specifications posted by PortableApps.com platform :) Ok, let's get to the details:

1. Install your Microsoft AutoRoute 2001 on your computer.
2. Extract my portable launcher (download bellow).
3. Copy all the contents of AutoRoute to the App\AutoRoute folder from the extracted archive. You should have AutoRout.exe file in App\AutoRoute folder.
4. Uninstall Microsoft AutoRoute 2001.
5. Run the launcher and see if it's working :) Should be working. I tested this only on Windows 8 DP and CP, both 32-bit and 64-bit, but it should work on everything from XP and above.
6. Enjoy never installing AutoRoute 2001 again (if you still use it) :)

Downloads:
AutoRoute 2001 Portable
AutoRoute 2001 Portable Source

Monday, May 28, 2012

Automated JS/CSS combining/minifying system - JSS Build Environment


Recently I wrote a post about JS compressors and how they compare to each other. Now I've build a system for combining and/or minifying JS and CSS files. This system uses Google's Closure Compiler for JS minification and Google's Closure Stylesheets for CSS minification. Both of them require Java, so if you want to use 'Compress' option, then you'll need to install it and point JSS Build Environment to java.exe. I recommend extracting jPortable to a folder next to this EXE file.


Features:



- JavaScript combine and minify
- CSS combine and minify
- Automatic combine/minify when one of the input files is changed.
- Control over the sequence of combining
- Minimizing to system tray
- Single EXE without installer


Setup:



close-compiler is the folder containing compiler.jar file of Closure Compiler.
closure-stylesheets is the folder containing closure-stylesheets.jar of Closure Stylesheets.
Java folder contains extracted files from jPortable.
JSS Build Environment can run without all of these folders, but you'll only have combine option.

Usage:


To use this app, you need to add files to CSS or JS panels (or both), choose Output file and click Build. It's as simple as that. Of course this only activates combining. No compression is applied. If you want compression, then you have to setup files as described in Setup above and then check Compress checkbox before building.
Now let's talk about Auto Build feature. This is really useful feature when you need to build every time you change something. Auto Build monitors the files and when some file is changed it starts build procedure. Build procedure includes compression if it's checked, but I recommend not checking it, as compression takes time and you'll need to wait a lot just to see let's say your text in red. Combining Auto Build with minimizing to system tray and some balloons makes things look and work really good.


Download:


JSS Build Environment
Source Code (in Delphi XE)

Happy codding ;)

Friday, May 18, 2012

Minimizing Dropbox usage thus maximizing free space

I bet you already know about Dropbox and currently you are searching of a way to increase the available free space. I'm already at the maximum available space - 25.8GB. I've done Getting Started, Sharing staff, DropQuest 1 and 2 and beta photo upload (dough last 500MB never got to me). Referrals are also to the maximum. So right now I'm stuck with ~26GB till Dropbox releases another option for gaining free space :( Then I thought what if I shrink the size of my files instead of increasing my free space? It's a good idea, but I needed a way to make it without archives, as I wanted to be able to open the files with a double click. To answer this I first needed to analyze what type of files do I have and how often I use them. Here is my report:

Music files - MP3 mostly. Everyday use.
Video files - VOB, MOV, AVI, MKV and MP4. Using them from time to time.
Pictures - JPG mostly. Using them from time to time.
Text files - PDF, MHT (HTML site in one file), TXT. Most of the files are used once per year at best.
Programs - lots of EXE and DLL executable files. Using them on daily basis.

After the analysis I found out there is a way to compress 99% of my files and still be able to open them by just double clicking! Of course to do that I needed to change some formats, loose some (unnoticeable) quality and loose a lot of time (most of the time was for research, so you won't lose it as I'm giving you all info in one place), but it was totally worth it! I was able to shrink all my files and add a lot more and still have almost half of my Dropbox free! In numbers, I was able to compress ~35GB to ~15GB!!! That's 20GB saved! And I still have 10GB of free space with all my music and pictures being in a save place :) So, how I did it? Let's get down to the details:

Music files

MP3 is an old format and as such it's not the best. There are other formats which can provide better quality on the same bitrate. Also it's proven that 128 kbps MP3 is enough for most people. Only trained ear can make difference between 128 kbps and 320 kbps MP3. So compressing your MP3 files to 128 kbps will save you a lot disk space (saved me 7GB), but you'll loose some quality (not that you'll notice it). To minimize quality loss, use another file format, newer that MP3! There are OGG, WMA, AC3 and others. I personally used OGG, but WMA is better integrated (almost all MP3 players read it) - you decide. To encode my files into the new format I used MediaCoder with the following settings:

Video files

VOB files are VERY large files! They are one of the main reasons I got 20GB saved :D Other files are small, but not as small as I wanted to! So I searched Internet about the best new (newer almost always is better) codec that have support in players too. I ended up with Google's WebM. It was able to compress 250MB VOB into 32MB WEBM file! Of course there is slight (unnoticeable) quality loss, but when you watch this video say 10-15 years from now, the quality then will be much better and this VOB's quality will look awful with or without this small quality loss. The memories this video brings you are important, not the video quality itself ;) Other files are already compressed, so WEBP was able to slice the size in two without any quality loss! So how do I encode to WebM? Well, the best way I found is using an Add-on for Mozilla Firefox (I'm a Chrome fan, but sometimes Firefox beats the crap out of Chrome) called Firefogg.

Pictures

It turns out WebM has a sister project called WebP for pictures instead of movies :) So I used it. It was able to smack 5MB JPG into 1MB WEBP without any loss! For already compressed JPEGs with size of 1-1.5MB, WebP was able to deliver files with sizes between 100-150KB! Also WebP supports lossless compression with alpha channel, so you can smack your PNG files too :) GIF files are in the works ;) For more on how to compress your images using WebP see my earlier blog post.

Text files

Here I did a bit of cheating - I uploaded as much as I could in Google Docs and compressed text files which I do not use often (for an example my old HTML projects). All the text files were less than 100MB, so not much cheating. But there are some files left, too big to be uploaded to Google Docs. 55MB PDF file! Google Docs allows only 2MB file to be uploaded :( Almost all of my PDF files were larger. Not to mention MHT files. So what I did is I compressed those PDFs with Adobe Acrobat Pro using this tutorial. This sliced 20MB off of this large PDF! And the end result is again PDF! So it just compresses the PDF. The down side is reduced compatibility - older PDF readers won't be able to read it. Who cares - Chrome reads it :D What about MHTs? Well here I had to make a couple of conversions to be able to convert MHT to PDF and then compress it using Acrobat Pro. Chrome cannot open MHT files, but can print everything to PDF file. So I needed this MHT opened in Chrome no matter what! Well, the solution is simple - open it with IE and save it as complete web page. Then open this HTML file with Chrome and print it as PDF. After that crush it with Acrobat Pro and you should have smaller PDF than the MHT. If you are advanced web user like me, you can even open object inspector and remove useless stuff from the web page before printing - this will further reduce the size of the PDF ;) In the end, after the compression, I uploaded again to Google Docs files with sizes smaller than 2MB. End result - 50% less space for text files :)

Programs

This actually is quite simple - use PortableApps.com AppCompactor to compress all of your programs. Backup all programs before use. Set to best compression first. Compress them one by one and test them after compression. If the program doesn't run, copy over the backup and try again with other compression algorithm. In my case all compressed perfectly with the best compression :)


Conclusion

All file types can be opened with popular software. OGG is supported by all popular players, WebM is also supported by them and browsers like Chrome, Firefox and Opera. WebP can be opened with some picture viewers like Picasa and IrfanView and can be opened with the default Windows Photo Viewer by installing a codec supplied by Google. PDFs can be opened with latest version of your PDF reader or by Chrome. So all in all this is a win-win situation - you get more space and you are still able to use your files as before :)

ReactOS on Acer Aspire One (installation without CD)


As I mentioned earlier, I've tried ReactOS on my AOA110, but without any success. Here I'll show you how to install ReactOS without CD. First, there is not an easy way to make ReactOS run on those netbooks. At first I tried 0.3.14 using a flash drive with CDFS partition (some flash drives allow you to have a partition which the BIOS and OS sees as CD), but that failed. Then I tried chaining GRUB with Freeloader, but that failed too. In the end I was able to install ReactOS (56595) by first installing it in a virtual machine and then copying all files to the netbook's SSD and again using GRUB. After loading ReactOS it asked me for a lot of drivers, but I had them prepared and copied to the SSD  The bad new is only WiFi driver installed, but I didn't found any way to scan for WiFi networks. When tried to install video driver (GMA 950) using it's setup program, everything went fine, till next boot - blank screen after ReactOS boot screen. Also installing LAN (Realtek) driver through ReactOS' wizard ended in BSOD.

Drivers tested:
Video - only setup install possible, which crashes the system after reboot
Audio - wizard can't find the driver (XP version)
LAN - wizard finds the driver, but ends in BSOD (both 2000 and XP versions)
WiFi - wizard finds and installs successfully the driver
Web Cam - wizard can't find the driver (XP version)

There ware also some other drivers (ACPI, System device, USB something), but I don't know that they are and where to get drivers for them. ReactOS doesn't have them.

So, if you are still up to it, here is the full procedure to install ReactOS on your PC without using a CD:
1. Get all the drivers and extract them (ROS doesn't support ZIP files). You'll need XP drivers, but 2000/2003 might work as well.
2. You'll need to prepare USB flash drive with WinPE using WinBuilder or use Windows Vista/7/8 USB install drive. You may also use Linux, but if you know how to use it, you won't be reading this :D.
3. After creating the flash drive and ensuring it works, it's time to install ReactOS under virtual machine. I used VirtualBox for the purpose, as it's free.
4. Install VBox, create a virtual machine and a virtual hard drive (make sure it's VHD format), and install ROS. Shutdown the machine after you get to the desktop.
5. It's time to mount the VHD file. At this point it'll be good if you are running Windows 7 or better. If not, you'll need to mount it using VHDMount. Othewise use this procedure - type in CMD the following commands:

diskpart
select vdisk file=path_to_reactos_vhd
attach vdisk
assign

6. Now you should have a new drive in Windows Explorer. Go to your flash drive and create new folder with the name ROS. Copy in it all the contents of the VHD file (the new letter in Windows Explorer).
7. In ROS folder create a new folder called Drivers and copy all the extracted drivers.
8. Download GRUBinst, extract it and copy it to ROS folder.
9. From GRUB folder copy grldr file to ROS folder.
10. In ROS folder create a new file with name menu.lst and open in with Notepad. In in paste the following code and save it:


title ReactOS
root (hd0,0)
kernel /freeldr.sys

11. Get back to the diskpart to detach VHD by typing the following commands:

detach vdisk
exit
exit

12. You are about to install ReactOS on your PC. Just to be sure, you should have a flash drive containing bootable Windows based OS, ROS folder on it containing all the files from ReactOS + GRUB and Drivers folders containing GRUBinst and extracted drivers respectively. If you have all that, you are ready. Plug the drive in your PC and boot from it.
13. Open CMD (if you are using Windows Setup flash drive, wait till you get to HDD format window and press Shift + F10 - this will bring you CMD) and type diskpart.
14. In diskpart you'll need to find the drive number on which you'll install ReactOS. Typically that's 0, so from now on I'll use hd0 as drive, but if yours is another number, replace 0 with the number you need. Also, you'll need to change it in menu.lst file you created earlier. To see the number type list disk.
15. Type the following commands and your ReactOS should be installed. Note in my case C: is the drive I'll be installing ReactOS to and D: is my flash drive letter. Switch the letters as you need (if you need). Also note this procedure will destroy all your data on your HDD/SSD, not just C drive! All partitions will be lost! If you mistake the hard drive number you risk cleaning another drive! USE AT YOU OWN RISK!

select disk 0
clean
create partition primary
select partition 1
format fs=fat32 quick
active
assign
exit
xcopy d:\ROS\*.* c: /e /x /b
d:
cd ROS
cd GRUB
grubinst.exe (hd0)

16. Your ReactOS should be now ready to boot, so reboot the machine.
17. First you should see GRUB manager with only one option - ReactOS. If you don't, then something is wrong with GRUB installation. If you do, press enter and you should see Freeloader's options (ReactOS, debug etc.). If you don't, then there is a problem with chaining GRUB to Freeloader - check your menu.lst to see if the correct HDD number is written.
18. If everything is ok, you should be getting a wizard asking for a specified driver. If you have this driver, try installing it. If not, let the OS try to install some (probably it'll fail). Also note you may get BSOD while installing a driver. ReactOS will ask you for many drivers, so have patience.
19. Browse arround ReactOS and be happy :)

Wednesday, May 16, 2012

Aspire One AOA110/AOA150 BIOS mod - a disaster and a solution

Here I'll tell you how to revert back to the latest official BIOS of Acer Aspire One if you have this kind of trouble with the modded one.

The story:

Ok, a couple of days ago I decided to search for a modded BIOS, for my AOA110, with more options available in the menus. I came across this. I was happy, very happy with this discovery and I rushed to flash it! Flashing (under Windows) went fine. The new BIOS had many new options available in it, just what I wanted! I spent maybe 10 minutes poking around the BIOS - checked every option's meaning. Then I changed a a couple of them, that I thought will give a boost, and rebooted. Windows started loading and suddenly upon welcome screen my Aspire One powered off! First thought - some of the options I changed are making the system unstable. So I decided to go to the BIOS and switch option by option back to it's original state, to see which one is the one to blame. Yeah, right! I entered the BIOS, found the first option I changed and when tried to change it back to it's original state, the netbook powered off again! In fact the fan was spinning at it's best! This means the CPU is working too hard and it's overheating, leading to power off, to prevent it from burning. Ok, I though I'll load BIOS defaults, as this could be done really fast. I did it :) But no result :( Then I noticed the last comment, from mad_max, in the thread I downloaded the modded BIOS - he had exactly the same problem as me! If only had read that earlier... not that would have stopped me from trying :D So, while searching the internet for a solution, the netbook apparently cooled off a bit, as when I run it, I had a bit more time to work before power off. Still not enough to flash it. Then I though - I'll cool it in the fridge! So I did that :) After 3 hours of cooling I run it and this time I was able to open My Computer before power off :D Ok, the time needed to do that is about 40-50 seconds (haven't really measured it), which may be enough to flash the BIOS, but I wouldn't try it yet. I wanted a bit more time, so I froze my AOA110! It worked and I was able to flash it back to it's latest official BIOS version :)

The procedure:

1. Put your netbook to your freezer and leave it there for 30-40 minutes. As zstand from Reddit suggested, "Place the laptop in a large, sealed ziplock bag before placing it in the freezer/fridge. The humidity might cause some damage".
2. Meanwhile download the latest official BIOS and prepare an USB flash drive using this tutorial.
3. When you get your netbook out of the freezer, act as fast as you can - plug the power and the USB drive and flash using the same procedure mentioned in the article for preparing the USB drive.
4. After flashing check if the BIOS is the official or not. If it's not, put the netbook back in the freezer and try again. Sometimes this procedure doesn't work from the first time. If the BIOS is the official, your flashing was successful. Shutdown the netbook and let it warm up naturally.

Update 2014:

Since the links in the forum are dead, I took the liberty to export the modded BIOS from my AOA and share it here. I used Insyde Flash Utility for InsydeH2O Flashit V1.2j IHISI V1.7.2 downloaded from the official website of Acer. I made all the 5 dumps the utility allows, but first (G) is what most people want. Still, I never know, so I attached all of them:
AOA_3309_mod_G.bin /G Save current BIOS to file (from IHISI).
AOA_3309_mod_1.bin /1 Save current BIOS to file (1Mbits from memory)
AOA_3309_mod_2.bin /2 Save current BIOS to file (2Mbits from memory)
AOA_3309_mod_4.bin /4 Save current BIOS to file (4Mbits from memory)
AOA_3309_mod_8.bin /8 Save current BIOS to file (8Mbits from memory)

USE THIS AT YOU OWN RISK!!! I'M NOT RESPONSIBLE IF YOU BRICK YOUR DEVICE!!!

Monday, May 7, 2012

Converting multiple files into WebP under Windows (MultiWebP)

You know of Google's image format WebP? If you do and you want to convert your images to .webp, you'll notice it's a bit hard, as you have to do it image by image. I wrote a little batch file, called MultiWebP, which can automate this for you ;) You can download it bellow. There are two files - test.bat and encode.bat. The first is optional and is used to encode only one file, just to test the settings. The second file is used to encode the whole folder :)

Update: New version is out!
Details for MultiWebP 2.0:
- Only one file! test.bat and encode.bat are now combined in MultiWebP.bat.
- One file means only one line of settings, not two as before.
- Subfolders. MultiWebP now supports subfolders. You can run it on a parent folder and all files will be encoded, even those in subfolders.
- Progress. MultiWebP now shows total files to convert and files converted till now.
- Colors. MultiWebP now shows it's window in different colors, depending on the progress made. This is useful for remote observing (if you lay down on your bed and wait it to finish). Color levels: black - 0 to 32%, blue - 33 to 66%, aqua 67 to 100% and green when all is done.
- Beep. Additionally Windows' beep sound is heard upon all task completed.

Installation:
1. Download WebP package from Google and extract it somewhere. Optional you can download WebP codec to be able to open .webp files with your Windows Photo Viewer.
2. Download my scripts and extract them.
3. Place the two files next to cwebp.exe.

4. Create two shortcuts for test.bat and encode.bat and name them as you like.

5. Open Explorer and type in the address bar %APPDATA%\Microsoft\Windows\SendTo
6. Paste the two shortcuts there. Now you should see both of them in the Send To menu.

Settings:
You should read Readme.txt of WebP and learn about what cwebp.exe parameters are available. Then you should open test.bat/encode.bat, find cwebp.exe and change it's parameters. I've included some by default, so you can start using my scripts without changing settings.

Usage:
1. Create a folder where you'll put cwebp.exe supported images that have common source (shot with the same camera), to ensure settings will be the same for all files.
2. Right click one of the files and send it to test.bat.

3. Change settings for test.bat if you don't like the result and repeat step 2, until you are pleased with the result.
4. After you found your settings, copy them to encode.bat.
6. You are about to convert the whole folder, so make sure you don't have any unsupported by cwebp.exe files as they will be deleted in the end!
7. Right click on the folder and send it to encode.bat.

8. Go take a walk :)

Wednesday, May 2, 2012

JavaScript Compressors Comparison

Recently I got back a bit to my old hobby - writing JS in my spare time. There is something in me that makes me optimize things. I love optimizing, no matter if it'll be a drop in the ocean, a lost time. But no matter how much you optimize, you never can beat a JavaScript compressor. So, I decided to test a couple of JS compressors available for free online use and see which is the best. For this purpose I used two files, from some of my JS projects:

JSOS.js - 97.8 KB (100 227 bytes) of mainly procedure oriented code, written for my JavaScript Operating System 5 years back. The code is a crap. Not one standard is kept while writing. Hell, I didn't even knew there are standards back then. And I didn't knew about compressors neither, so I compressed as much as I could by hand.
portfolio.js - 45.9 KB (47 020 bytes) of mainly object oriented code, written for my portfolio. Code is a bit new (one year old or so), but I still don't like it :D

The compressors I choose to benchmark are:

1. Google's Closure Compiler
2. Yahoo's YUI Compressor
3. Microsoft's Ajax Minifier
4. Dojo's shrinksafe
5. Online Javascript Compression Tool

Ok, lets see how they do on default settings.

1. Closure Compiler
JSOS.js - 88.1 KB (90 220 bytes)
portfolio.js - 39.4 KB (40 374 bytes)
2. YUI Compressor
JSOS.js - 89.8 KB (92 035 bytes)
portfolio.js - 34.5 KB (35 406 bytes)
3. Ajax Minifier
JSOS.js - 88.4 KB (90 537 bytes)
portfolio.js - 33.9 KB (34 734 bytes)
4. shrinksafe
JSOS.js - 93.6 KB (95 885 bytes)
portfolio.js - 36.8 KB (37 767 bytes)
5. Online Javascript Compression Tool
JSOS.js - 89.2 KB (91 358 bytes)
portfolio.js - 34.5 KB (35 381 bytes)

Let's wrap-up these results in graphics:
Or in percents:
As we can see, the "default" winner for crappy procedure oriented code is Google's Closure Compiler with just 317 bytes ahead of Microsoft's Ajax Minifier. For object oriented crappy code, the "default" winner this time is Microsoft's Ajax Minifier, while previous winner, Google's Closure Compiler is at last place.
Now let's see what those compressors can do at their best:


1. Closure Compiler
JSOS.js - 35.5 KB (36 376 bytes)
portfolio.js - 31.5 KB (32 352 bytes)
2. YUI Compressor
JSOS.js - 89.8 KB (92 035 bytes)
portfolio.js - 34.5 KB (35 406 bytes)
3. Ajax Minifier
JSOS.js - 84.7 KB (86 767 bytes)
portfolio.js - 33.2 KB (34 056 bytes)
4. shrinksafe
JSOS.js - 92.3 KB (94 562 bytes)
portfolio.js - 36.1 KB (36 991 bytes)
5. Online Javascript Compression Tool
JSOS.js - 89.2 KB (91 358 bytes)
portfolio.js - 34.5 KB (35 381 bytes)

In graphics:
and in percents:
Yes, I noticed Closure Compiler, too! At first I thought it produced a non working code, but when I tried it - it works as a charm! I don't know how they did it, but they did it :) So apparently the "max" winner for crappy procedure oriented code is Google's Closure Compiler. For crappy object oriented code, the "max" winner is again Google's Closure Compiler with a lead of more that 1k of code. Notice Yahoo's YUI Compressor and Online Javascript Compression Tool - they both have the same numbers as for default test?!?!? Well, their default settings are actually their best settings. That's a bit disappointing, as default settings of some compressors are better that the best settings of YUI Compressor, and I know a lot of people are using it. So I recommend to those people to switch to Closure Compiler.

Let's make an average to name a winner by the normal formula:
1st place = 5 points
2nd place = 4 points
3rd place = 3 points
4th place = 2 points
5th place = 1 point
Results:

Closure Compiler YUI Compressor Ajax Minifier shrinksafe OJSCT
Points 16 10 17 5 13
So the order is:
1. Ajax Minifier
2. Closure Compiler
3. Online Javascript Compression Tool
4. YUI Compressor
5. shrinksafe
You agree with that? Neither do I. This formula is good for other uses. Here we should really find how many bytes are saved, average. Let's see the same table again, but this time with bytes and percents saved.

Closure Compiler YUI Compressor Ajax Minifier shrinksafe OJSCT
Bytes 95172 39612 48400 29289 41016
Percents 32.32 13.45 16.43 9.95 13.93
Now we see who the real winner is:
1. Closure Compiler
2. Ajax Minifier
3. Online Javascript Compression Tool
4. YUI Compressor
5. shrinksafe

So next time you need to shrink JS files, consider Closure Compiler as a good choice :)

Monday, April 23, 2012

Samsung P-SSD1800 Firmware update

Update 2013: My SSD died and I replaced it with CF card. For more info check out my blog post.

Last weekend I had to work all day on my Acer Aspire One AOA110. That's roughly 12 hours of painful waiting for the slow SSD to finish the simple tasks I was doing! At some point that day I started searching on the internet for a solution to this agony and found a firmware update to my Samsung P-SSD1800 8GB SSD. The update is for 8 and 16 GB variants, so AOA150 can flash it too. I did not rush into doing it because I knew I'd lose all of my info (not that you could store a lot on 8GB :D). It wasn't till today that I flashed it and I'm impressed by the results!
Here you can see the test before the update:
Here is the same test after the update:
As you can see, burst rate is doubled, access time is nearly twice faster and the drive now keeps much stable read speed! Write speeds are not tested, as that would have destroyed all my info, but I bet they are better, too. Note before the update the drive was called P-SSD1800, where after the update it's PATA SSD - that's normal. My original FW version was ver2.Y0C. The new one is ver2.M0J. So, if for some reason you already have this version, there is no need to flash it. Ok, let's get to the flashing part!

Things you'll need:
1. A flash drive.
2. HP USB Disk Storage Format Tool, Rufus or other utility that can make your flash drive DOS bootable.
3. AOA110SSDFWv1.rar, containing needed files to create DOS boot disk with HP USB tool, and the firmware itself.

Steps:
1. Backup things from your SSD and flash drive as both will be erased during this operation!
2. Insert the flash drive into one of your USB ports and run the utility from 2. above.
3. Format the drive with FAT32 file system and create a DOS startup disk using the files extracted from AOA110SSDFWv1.rar
4. After the disk is created, copy all the contents of AOA110SSDFWv1.rar to it, ignoring conflicts.
5. Reboot and boot from USB flash drive.
6. You'll have two choices now - (0) Erase SSD and (1) Flash SSD FW - choose (0) Erase SSD
7. This will trigger another dialog with options (0) Erase good Block only and (1) Force Erase All block - choose (0) Erase good Block only
8. After the erase you'll get "OK SSD is erased now time for Flash" and only one option to choose - (0) Flash SSD FW. Choose it :)
9. Another dialog (and the last of that type) shows with options (0) 8GB SSD and (1) 16GB SSD - choose the one right for your SSD. In my case this is 0, as I have 8GB version.
10. After that, the main window of the flasher program will be loaded. You need to press Enter once to start the process of updating. Some lines will start showing in the right side of the window and when all is done, you'll get big green PASS in the bottom left corner of your screen.
11. After that press X on your keyboard to exit the program.
12. Reboot PC and install your OS of choice.

Here is a video (thanks Simon Holland) of the final stage of the flashing procedure

Hope you can get better results than mine ;)

Update: I got this firmware update working on 16GB model. It failed 2 times, but eventually on the 3rd time it flashed successfully. Here are the results:
Before
After
Sorry about the warning balloon - I noticed it too late to test again. As you can see here we don't have such a boost, but in my opinion the SSD is feeling better with the new firmware ;)

Other posts related to Acer Aspire One:
Replace SSD with Compact Flash card on Acer Aspire One ZG5
Aspire One AOA110/AOA150 BIOS mod - a disaster and a solution
Save precious pixels by using thin scrollbars
ReactOS on Acer Aspire One (installation without CD)
Chromium OS on Acer Aspire One
MenuetOS/KolibriOS on Acer Aspire One
EasyPeasy on Aser Aspire One
Darkness Beyond Limits

Tuesday, March 27, 2012

Darkness Beyond Limits

A couple of months ago I was keeping my monitor's brightness setting to the maximum and it was normal for me, even in the evening with the lights off. But things have changed a bit with those tablets around - now I'm used to much less brightness than my monitor's setting allows. I like Android with it's apps (like RootDim) that can control backlit and go beyond the limits. So I wanted an app for Windows that can do the same, as my minimum brightness was too bright for night reading - that's how Darkness Beyond Limits was born. Unfortunately, Windows cannot control monitor's brightness like Android can. The only thing you can do is simulate lower brightness, but this won't actually be backlit going darker :( Nevertheless, the result is satisfying - you get much dimmer screen :) There are two possible ways to achieve that and this app (written in Delphi XE, so if you want to make changes (yes, I provide the source code too) you'll need to install it) supports both of them. XE outputs quite big file, but it assures it's Windows 7 compatible, so I preferred it instead of Delphi 7. Darkness Beyond Limits is really easy to use - it has no options and no hotkeys to mess with your other hotkeys, just a tray icon. The main goal here is to be dead simple. The app will remember your last brightness setting and will apply it on startup. So, if you want to start it with Windows, just put a shortcut inside your Startup folder. I've tested Darkness Beyond Limits on 1 PC, 1 netbook and 1 laptop with Windows 8 DP, Windows 7 and Windows XP respectively. It works quite well. Also I've made some power consumption measurements (see bellow). So, how does those methods work? I'll give you an explanation with pros and cons - you decide which method to use:

Method 1 (Power):
This method uses a transparent black canvas over (almost) all of your applications, making them look darker.
Pros:
- You can get almost black screen
- Power consumption can go down a bit, depending on your screen
- Always works
Cons:
- May produce 100% usage of a core under XP and below
- Taskbar stays ontop when clicked once. This can be used as a pro when setting set too low, but otherwise it's pretty irritating. There is a workaround, but it's for Windows Vista and below - un-check "Keep taskbar on top of other windows" option in your taskbar properties.
Method 2 (Gamma):
This method uses Windows' gamma settings to simulate darker screen.
Pros:
- No 100% usage under XP as Power method
- No Taskbar ontop as Power method
Cons:
- Doesn't always work (depends on the drivers)
- Can't go as dark as Power
- No potential power consumption savings
- Improper shutdown of the app will result in brightness level not returning to normal until system reboot or by running again DBL

Switching methods:

The default method is Power. If you want Gamma, after you've run DBL at least 1 time, open DarknessBeyondLimits.ini (should be next to the exe file you ran) and correct Gamma=0 to be Gamma=1. Save. Now when you start DBL it'll use Gamma method. System Tray icon will correspond to the method used.

Systems:

PC: monitor Fujitsu Siemens P20-2 on Windows 8 Developers Preview
Netbook: Acer Aspire One AOA110 on Windows 7
Notebook: Asus X51L on Windows XP

Power Consumption (only on Power method):

PC w/o DBL: 31.3W
PC w DBL: 29.6W
Netbook w/o DBL: 13.6W
Netbook w DBL: 13.6W
Notebook w/o DBL: 19.2W
Notebook w DBL: 37.5W

Note: All systems have their backlit set to minimum. Increased power consumption on Notebook is because of Windows XP using one core on 100% for DBL.

Conclusion:

As you can see from the graphics above, you can get less power usage, no change in it, or get a lot more of it. It really depends on your monitor. Some monitors use less energy when displaying black colors, so the darker the image is, the less power it consumes. If your monitor is not one of those, Power method will not increase power usage, unless you are using Windows XP, so if you are with XP I strongly recommend Gamma method for you. If you are energy saving maniac like me, use Power method (probably you won't be using XP, as it's draining more juice than 7, not to mention 8). If you prefer stability, use Gamma method.

Download:

Binary
Source code

Wednesday, February 29, 2012

How to get the best interest, quality and save time at the same time?

Are you trying to save some money by depositing in savings account? If so, good! Putting spare money in deposit is good way to fight inflation and even make some money. Currently, the inflation in Bulgaria is 4-5%, where deposit interests are 5-7% depending on the bank, so deposits are the best safe way to save money. Or are they? What if I tell you there is MUCH better way to save small amounts of money? Yes there is - it's food. That's right food can give you way better interest that every bank. How you may ask? It's actually really simple - with the whole global economics problems the prices of daily groceries rise constantly. If you buy something today, in 2-3 months it's price will be higher and usually it'll be more than the 7% your bank is giving you! For an example, 3 months ago a jar of beans cost 2.79 BGN (1.43 EUR) where now it costs 2.99 BGN (1.53 EUR) which is just above 7% rise. Another example is a bottle of spaghetti sauce - 3 months before was 1.59 BGN (0.81 EUR), now it's 1.99 BGN (1.02 EUR) or a massive 25% increase! Also, for the latest example, the quality of the sauce is now worse than before! So if you bought it before, not only you saved 25% + inflation, but you got a better quality too! Of course you have to buy a lot of bottles to really worth it. Here it comes the time saving too - buy bulk! Buy packages of 10 or 20, but first check the expiration date of course (most products have 1-2 years). That way you'll go only 1 time (loose time for one purchase), but you'll buy as for 10 times :) Time is money ;) Ok, some calculations:
Let's say you buy 20 jars of beans:
20 x 2.79 = 55.8 (before)
20 x 2.99 = 59.8 (now)
This is 7% saved in just 3 months or 2 "free" jars of beans! Considering you eat from those jars and the price rises again through the year, we can estimate around 10-14% APY! Not bad :)
Let's say you buy 20 bottles of spaghetti sauce:
20 x 1.59 = 31.8
20 x 1.99 = 39.8
Again, here we got 4 "free" bottles and an estimation of 50% APY!!! Get that! Not to mention the quality and time.
Now, here it comes the fun part - promotions! It's another way to save even more money and combined with bulk buying it saves A LOT! Yesterday I saw those jars of beans discounted to 2.19 from 2.99! That's 36%!!! Let's do the calculation again:
20 x 2.19 = 43.8
20 x 2.99 = 59.8
That are more that 5 "free" jars! Estimation of more that 50% APY if you buy only when a promotion is active! And there always will be a promotion when buying bulk - don't start searching for a promotion when you run out of food! When your reserve is less than 40% it's good to start looking for promotions to refill it ;) Also promotions can be used to save money and time even when the prices are not going up constantly. Right now there is a promotion for my favorite rice - 1.99 BGN (1.02 EUR) for 1 kg package, where it's normal price is (for a loooong time) 2.45 BGN (1.25 EUR). Calculation:
20 x 1.99 = 39.8
20 x 2.45 = 49.0
Around 4 "free" packages of rice or estimated 15% APY!
Only one golden rule when buying bulk - buy one to test it before buying a lot, because the quality may got worse and you'll end up with a lot low quality food!
In the end, you can get over 20% APY when combining different foods. Let's say you gave 1000 BGN (511 EUR) for bulk buying this year at 20% APY average:
1000 x 20% = 200 BGN saved through food for 1 year
1000 x 7% = 70 BGN max saved through deposit for 1 year
As you can see you can easily get over 3 times better interest from food than from your bank. The more food you buy, the more savings you have :) It's up to how much you eat and how many people are there in your house. Of course bank deposits will still remain the best safe way to save money, as you can't spend 100 000 for food, but you can put them in deposit. So next time you see a promotion of a food you regularly eat, don't hesitate - buy! If you don't have the money - find it and buy! Presuming you have a deposit account, you'll be able to repay the debt when next salary comes, so get money and buy the food, as it'll give you better interest than your bank will!

Monday, February 13, 2012

MenuetOS/KolibriOS on Acer Aspire One

This is my next conquest in the series "OS for the Acer Aspire One". I've managed to boot MenuetOS and KolibriOS (it's based on MenuetOS) on my AOA110 by using a flash drive. Some may ask why? Because I can :) KolibriOS is a bit easier to make as it has bootable CD image already build on their site, where MenuetOS has only a floppy image and we have to make a CD image out of it. But the hardest (and dangerous) thing to prepare is your flash drive! You have to divide it into 2 partitions - one with CDFS file system (the FS on all compact disks) and one normal (FAT or NTFS). Not every flash drive supports that, and the way to be done depends on the controller in it. I really should make another post about how to do that, because it's really big question, but for now search Google how to do it on your flash drive and then follow the instructions below. Of course if you have an U3 flash drive, then you don't need to search anything, just use Universal Customizer to insert the CD image into your CDFS partition. After you get the things going with your flash drive, everything else is pretty easy - put the CD image into your CDFS partition on your flash drive, reboot and boot from it :) This way you should be able to boot other OSes (like Windows XP), but I haven't tried it yet. Now let me show you the steps to boot MenuetOS, as it's a bit harder:

1. Download Menuet32.
2. Use UltraISO or other imaging software to put .img file into your CD's boot sector like that:
2.1. Click on Bootable -> Load boot file...
2.2. Choose .img file
3. Save .iso image.
4. Open the program corresponding to your flash drive and burn your .iso image to your CDFS file system.
5. Reboot your netbook and boot from you newly added USB-CD

KolibriOS steps are just two - 4 and 5 from the above ;) Hope you like the experiment :)

Friday, February 10, 2012

Chromium OS on Acer Aspire One

Recently ReactOS 0.3.14 was released with USB support and I decided to try it. Unfortunately I got blank screen on my AOA110 right after the beginning (after loading a couple of drivers) of the installation :( So I decided to search for other operating systems and try them on this Aspire One AOA110. Then I remembered trying Chomium OS on my PC a while ago (failed miserably) and decided to give it a shot. It worked with a little exceptions:
Mouse sensitivity setting is not working
Brightness setting is not working. Fn key combination is working good though.
To get Chromium OS running on your machine you'll need:
1. 4 GB flash drive
2. Latest Hexxeh build
3. Image Writer
4. A little time
Steps are really simple:
1. Insert flash drive
2. Run Image Writer
3. Select img file
4. Select USB flash drive you inserted
5. Click Write
6. Wait to finish
7. Reboot and try your Chromium OS build :)

Thursday, February 2, 2012

Mazda EPC 2 Portable Launcher

I've searched a lot around the net for a portable version of Mazda EPC (Electronic Parts Catalogue) 2, but didn't found anything, so I decided to do it myself (back in 2010). Installation of Mazda's EPC is really pain in the ass, not to mention you loose all of your History when reinstalling. Here I'll show you 3 things:
1. How to prepare Mazda EPC 2 to be ready for portable launching
2. How to make your portable launcher.
3. Links to my portable launcher and source, in case you don't want to compile yourself (you still need to prepare the EPC though)

Ok, lets go!

Note: No PortableApps.com Format Specifications are met as there were none back in 2010. Still, this launcher works like a charm even in the latest PortableApps.com platform.

Part 1 (preparing Mazda EPC 2 to be ready for portable launching):
1. (Optional, but recommended) Install Windows on a virtual machine.
2. Install your Mazda EPC 2
3. Import all of your CDs in the same folder as your BIN folder.
4. On your PC (or on another PC, if you don't use virtual PC) create a folder to store your portable version of EPC. Inside of it create 2 folders - App and Data.
5. Copy all of your EPC files in App folder.
6. In Data folder create folder called Settings. In Settings folder you should put 2 files - borland.reg and MAZEPC.INI (this one I recommend you to get it from your own installation - it's stored in your Windows folder, e.g. C:\Windows)
End structure should be:
MAZDAEPC
- App
-- A1 (if you have this disk installed)
-- A2 (if you have this disk installed)
-- B1 (if you have this disk installed)
-- B2 (if you have this disk installed)
-- B3 (if you have this disk installed)
-- BACKUP
-- BIN
-- LOCAL
-- SAVE
- Data
-- Settings
7. Now prepare the launcher (part 2) or download it (part 3) and put it a side to your App and Data folders.
8. Run the launcher. You should get an error of a missing file. Go to the PC you installed Mazda EPC, find the file (typically in your System32 folder) and copy it inside your App\BIN folder (so it's next to mazdaepc.exe). Do this for all the files needed and in the end you should get Mazda EPC 2 protable running ;) I don't remember the list of files you need to copy, as I did this two years ago, but that's the way I've done it and it's working perfectly (tested on XP x86, Vista x64, 7 x86 and x64 and even 8 Developers Preview x64).
9. Enjoy!

Part 2 (writing and compiling the launcher)
1. Either install NSIS or download it portable from PortableApps.com
2. (Optional if you want icon) Either install IcoFX (or other icon editing software) or download it portable from PortableApps.com
3. Make a file called Mazda.nsi and paste the following code in it:

SetCompress force
SetCompressor /SOLID /FINAL LZMA
SetDatablockOptimize on
!include 'LogicLib.nsh'
!include "Registry.nsh"
Name "Mazda EPC2"
OutFile "MazdaEPC2Portable.exe"
VIProductVersion 1.0.0.0
VIAddVersionKey ProductName "Mazda EPC2"
VIAddVersionKey Comments "by metal03326"
VIAddVersionKey FileDescription "Launcher for Mazda EPC2"
VIAddVersionKey FileVersion 1.0.0.0
VIAddVersionKey ProductVersion 1.0.0.0
VIAddVersionKey LegalCopyright "Copyrights 2010"
CRCCheck off
SilentInstall silent
XPSTYLE on
Icon "Icon.ico" // Remove this line if you don't want Mazda's icon
Var AppDir
Var SETTINGSDIRECTORY
Section 'Main'
StrCpy $SETTINGSDIRECTORY "$EXEDIR\Data\Settings"
StrCpy $AppDir "$EXEDIR\App"
ReadINIStr $0 $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "InstallPath"
StrCmp $0 "$AppDir" +2 0
WriteINIStr $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "InstallPath" "$AppDir"
ReadINIStr $0 $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "SavePath"
StrCmp $0 "$AppDir\SAVE" +2 0
WriteINIStr $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "SavePath" "$AppDir\SAVE"
ReadINIStr $0 $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "LocalPath"
StrCmp $0 "$AppDir\LOCAL" +2 0
WriteINIStr $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "LocalPath" "$AppDir\LOCAL"
ReadINIStr $0 $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "BkupDir"
StrCmp $0 "$AppDir\BACKUP" +2 0
WriteINIStr $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "BkupDir" "$AppDir\BACKUP"
${For} $R0 1 10
ReadINIStr $0 $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "DataPath$R0"
StrCmp $0 '' +4 0
StrCpy $R1 $0 2 #
StrCmp $0 "$R1,$AppDir\$R1" +2 0
WriteINIStr $SETTINGSDIRECTORY\MAZEPC.INI "ExecEnv" "DataPath$R0" "$R1,$AppDir\$R1"
${Next}
CopyFiles $SETTINGSDIRECTORY\MAZEPC.INI "$WINDIR\MAZEPC.INI"
IfFileExists $SETTINGSDIRECTORY\borland.bak 0 +5
Messagebox MB_YESNO|MB_ICONEXCLAMATION "Previous registry backup of 'HKLM\SOFTWARE\Borland' found. This maybe is caused by improper termination last time. If this is the case and the termination was done on this computer, please click 'Yes'. Do you want to use this backup before continuing?" IDYES +1 IDNO +3
DeleteRegKey HKLM "SOFTWARE\Borland"
nsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\borland.bak"`
Delete $SETTINGSDIRECTORY\borland.bak
ClearErrors
EnumRegKey $0 HKLM "SOFTWARE\Borland" 0
IfErrors 0 +2
Goto +5
nsExec::ExecToStack `"$WINDIR\system32\reg.exe" export "HKLM\SOFTWARE\Borland" "$SETTINGSDIRECTORY\borland.bak"`
Pop $R0
StrCmp $R0 '0' 0 +10
DeleteRegKey HKLM "SOFTWARE\Borland"
nsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\borland.reg"`
SetOutPath "$AppDir"
ExecWait "$OUTDIR\BIN\mazdaepc.exe"
Delete $WINDIR\MAZEPC.INI
IfFileExists $SETTINGSDIRECTORY\borland.bak 0 +4
DeleteRegKey HKLM "SOFTWARE\Borland"
nsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\borland.bak"`
Delete $SETTINGSDIRECTORY\borland.bak
SectionEnd
4. (Optional if you want icon) Extract mazdaepc.exe icon with IcoFX (or other icon editing software) and place it next to Mazda.nsi
5. Compile Mazda.nsi with NSIS and you should get MazdaEPC2Portable.exe file next to Mazda.nsi
6. Place it next to App and Data folders from your prepared (part 1) Mazda EPC 2 portable and run it!
7. Enjoy.

Part 3 (download time!)
Here are links from previous 2 parts as well as links for the source code and the compiled launcher. Enjoy!
borland.reg
My MAZEPC.INI (I really recommend using yours)
Source code (Mazda.nsi)
Compiled binary (MazdaEPC2Portable.exe)

Wednesday, February 1, 2012

Save precious pixels by using thin scrollbars


Hi all. Recently I bought second hand Acer Aspire One AOA110 ZG5 and found 1024x600 pretty inconvenient for browsing. Then I found Thin Scroll Bar extension for Google Chrome. I know it's not much, just a couple of pixels, but still it's good. So if you are a Chrome user, give it a shot. Hope you like it.

PS: It also makes tiny scrollbars to all dropdowns.