Category Archives: Work stuff

Color Name from Hex to Color

I have to implement the color extractor from image so I have too look at the php script that can extract color in image to hex code, but then need to convert hex or rgb to human color name. So this is useful.

In case you are looking for this. It’s an array of color name matching with RGB in format

$colors = array(
"Acid Green" => array(176, 191, 26),
"Aero" => array(124, 185, 232),
...
...

Look at this link: http://pastebin.com/KsPbPU1j

jStarbox Does Not Show Stars on Hidden Tab

If you are using jStarbox so you know what I refer to.

I have downloaded Flat Bootstrap Responsive Website to tried jStarbox and was on the UI implementation. It was so messy because I have it on my hidden tab. After switch the tab to appear the rating stars not display as expected. I spent about 2 days for this as I am not that good with jQuery and Javascript much.

jStarbox

The visible tab is fine, but the hidden tabs seems has problem. I am not sure because of the design or the jStarbox does not have this prevention.

It appeared that .colorbar not set to the size of .positioner after visible. (.positioner still have width of 0px) here is what I do.

starbox.starbox(‘setOption’, ‘average’, averageVal); //call method to reset the average value

var size = 85; //manual fixed the size

positioner.children(‘.stars’).children(‘.colorbar’).css(“width”, (averageVal*size)+”px”); //add style

To try jStarBox Click here https://github.com/sabberworm/jStarbox

Recruit 1 Web Graphic Designer & 1 PHP Web Developer


I am recruiting new member for IT team. 1 Position of Web Graphic Designer, 1 Position of PHP Web Developer
I really like someone to join the team. Please let me know if you are qualify.
General Qualification:
1. Age 26 – 35 years old
2. Thai nationality
3. 2 – 3 Years Experience
4. Fair English communication

Salary is 25,000 Baht – 40,000 Baht depends on your experience.
Our office located in Silom, Bangkok. Easy to commute by BTS/MRT

More qualification is after the jump or download this recruitment description here
Continue reading Recruit 1 Web Graphic Designer & 1 PHP Web Developer

Testing New Invoice Format for SPM


The project I am talking about is an online/offline payment solutions for Australia merchant. BPAY and PostBillPay is very popular to merchant in Australia. After this patch done, I will expand the project bigger and that would effect a lot of product of our company. This is including accept credit card and all will need PCI Compliance. None of Thai Banking doing this or very few.

This time, I will need to patching the invoice generator to fix the bug on the first of August. All the tests are good and believe tomorrow test will be good. I was on this problem for about 2 months already. The first month I have to fix the logic of wrong fee calculation and that was fixed. Now is the patch for the new invoice that will display the correct amount of fee that charge to clients.

Sometimes, working on financial stuff is too scared for wrong things happen, but after fix and test for many times that could make us confident for the results. Tomorrow too, I am very confident it would pass very easy.

Review Text-Link-Ads


I have use Text-Link-Ads service since April 2007 and found out that it worth to use their service. From low and unstable earning website, now it is almost stable earning.. I earned every single month until now $1,326.50 already.

Let me describe what is Text-Link-Ads in my opinion:
Everyone in this market know that making a website need advertisement or sponsors. Either image/flash/popup or intelligent relevant ads like Google Adsense… there is a very simple one…. very old type of advertisement… It is Text link advertisement.

Text-Link-Ads is a company that publish text links on their network via XML which cached on the publisher website. How much the quality of website you have, how much you earn from there.

How does it works?
(Expert can skip this paragraph) For who is new and not understand this.. this is a very clear explanation. TLA’s text links (now I use a shorthand word) will be called from your website script either php/asp or other server side script and will provide a small streaming text in XML standard format, then your website script will save it to your website space (which called cache) in a limited time (your website script will update this cache often daily) and then display text links on your webpage. (You are not a programmer? oh no worry, TLA provide the script as well.. there are a plug-in for blog like wordpress and so on)

How much I can earn?
This really depends on how much quality of your website has and how long your website has published on the internet. Let’s look at my case. At april 2007, my website is 7 years old. I would say my website has unique contents. I have not much earning on the website either Google Adsense or any ads network, but it’s nothing to lose to add another ads that doesn’t make your website crap, isn’t it?
TLA allowed you to place up to 10 spots of text link so the maximum is 10 links multiply with the earning for each link. I sell about $25 for each link (not yet deduct TLA commission) so the maximum is $250 each month (If I can sell all 10 spots) In the reality, you could earn maximum about $100 a month for just 10 text link, isn’t that great?.

Apply?
You first need to submit your website so they can review if your website has good quality, but hey!, you have nothing to lose, just submit it. Apply here.

At first, I don’t even think I could have them approved, but I did it. You might have to wait for 3 – 4 months before you could get a first advertiser. If you have a great site, you would get it right away on the first month. TLA pays via PayPal (no fee) and the other ways, so get start and earn money for your website.

From the screenshot above, here is a TLA pdf statement that you could see it in detail. Please remember, this is only 1 website earning!!

and next post I will review another ads network which is invited me from TLA and it is as good as TLA and earn even more sometime. Again.. I wanna tell you it is only for one website.. If you have more quality website, you earn more.

Momcashblog.com Malware Attack


This is a second time that my site, KrpMag.com (It is currently reported and I am appealing with them so I am not going to make a link since google will take it as a relationship between malware sites), has been report to StopBadware.

The relationship on “Reported Attack Site!” said I have a malware that hosted on momscashblog?!?!? WTF I have no link or relationship with this site before. I have scanned my whole files and can’t find any virus or trojan. Fortunately Google webmaster tool has a lab tool (this time) so I can see what is the malware!!!

My website must got some kind of hi-jack on wordpress that I was trying to update to the new version everytime, but for the plug-ins, you wouldn’t know which one has a good protection. The best of protection is.. make the file un-writeable on those plug-ins.

The malware look like this.

It was injected in plugin name “wp-polls” and I have the new version downloaded from developer site and couldn’t find that part of script in it. So this has been hi-jack by WordPress hole since November 2009, I am sure.

Once the javascript encode and write to the page look like this

So this will produce a hidden-iframe that point to momscashblog which has been reported Malicious software includes 3 trojan(s), 3 exploit(s), 1 scripting exploit(s).!!!! OMG

So, you must use Google Webmaster Tool or findout where is the suspicious javascript/iframe injected in your WordPress directory. I hope this help.

Tweeter to WordPress Comment


It happened for a long time since I put Tweeter box in side bar on KrpMag. I didn’t expect this happen doh, but I actually wanna have people get participate on blog as much as possible so I add Tweeter box. I don’t have time to fix it since then.

It was funny that people tweeted through my Tweeter box, but then all the comments from comment box are gone. Maybe they are lazy to put a comment at the end of the page (That I have it modified it to a forum. LOL)

So now I redirect both to tweeter and comment if readers put comment of them in Tweeter box. And my website will become more activities again.

Prodution time: 2 hours
Production cost: $50

Fun Web Application on FaceBook

I have created a fun application on FaceBook using FBML (Facebook Markup Language) and FBJS (you can guess of that… end with JavaScript)… Oh it was fun.

Above image show you it was a Google Map. I use my DX900 Acer phone which has GPS send the location through my server and then keep a location to generate the map by showing the markers and path. One of my friend is also crazy working on it just like I did. Haha.

This is an idea to apply for anything with GPS, FaceBook, Map. I just use static map so it does not load a memory of computer or phone browser. Also then you can post your location to your facebook wall and friend’s home live feed by clicking on the map.

It show the thumbnail map and the location of the latest spot you were at!!

So the programming on FaceBook is not difficult at all, but you need to learn their tags and API.