seoxys.com» English http://www.seoxys.com Sun, 30 Sep 2012 22:34:18 +0000 en hourly 1 http://wordpress.org/?v=3.0.1 The Azure License: meaningful attribution http://www.seoxys.com/azure-license/ http://www.seoxys.com/azure-license/#comments Tue, 27 Oct 2009 20:59:01 +0000 kenneth http://www.seoxys.com/?p=233 Open-source licensing can be a real nightmare. Some licenses are nearly impossible to decipher, while some (namely – the GNU GPL) are just pure evil.

I have been trying to find a software license which, like the Creative Commons Attribution license, would let the licensee do pretty much anything with the software, except it would require attribution in a meaningful way. That is to say, documentation and/or credits of any derivative work.

The MIT license came closest to this, and it is the base on which the Azure License was written.

A good way to give attribution, as required by the license, would be a friendly “Contains code by Copyright Holder [linked]” or “Special thanks to Copyright Holder [linked]” in the about box.

Without further ado, the Azure License:

The Azure License

Copyright (c) {year} {copyright holders}

Attribute to {individual or group name} - {link}

You (the licensee) are hereby granted permission, free of charge, to deal in this software or source code (this “Software”) without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sublicense this Software, subject to the following conditions:

You must give attribution to the party mentioned above, by name and by hyperlink, in the about box, credits document and/or documentation of any derivative work using a substantial portion of this Software.

You may not use the name of the copyright holder(s) to endorse or promote products derived from this Software without specific prior written permission.

THIS SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS SOFTWARE.

http://seoxys.com/azure-license/

Plain text Azure License

]]>
http://www.seoxys.com/azure-license/feed/ 0
ATTemplate: Simple Templating System in PHP http://www.seoxys.com/attemplate-simple-templating-system-in-php/ http://www.seoxys.com/attemplate-simple-templating-system-in-php/#comments Wed, 01 Jul 2009 10:13:42 +0000 kenneth http://www.seoxys.com/?p=203 Let me say this first: I do not believe in big bloated MVC PHP frameworks. I believe in having custom code that runs as fast as possible. For recurring useful functionality, such as templates, I believe in using simple, efficient and flexible dedicated standalone modules.

For the past several years, I have been using a home-grown templating system that functioned by parsing template files which would have a dedicated / invented syntax. It would replace, for example, %TAG%, with a value. It had several more advanced features too, such as conditionals, recursion, embedded PHP, and more.

And while it functioned just fine, it implemented a custom parser, and required templates to be written using a non-standard syntax. But, after having used Ruby on Rails, I was inspired to design something better.

ATTemplate is the result of this. The main idea behind ATTemplate is that PHP in itself is already a parser, so why reinvent the wheel?

ATTemplate is very lightweight and relatively simple, but it’s very powerful without being bulky. It allows for everything the other templating systems can do, including loops, nested templates, recursion, conditionals, etc.

How to use

Here’s how you’d use ATTemplate:

<?php

// Include the ATTemplate class
require_once 'attemplate.inc.php';

$template = new ATTemplate();

// Optionally, you can give it properties, like so:
// $template = new ATTemplate($property_array);

$unread_messages = rand(0, 20);

// Sets property 'unread_messages' to 10.
$template->set('unread_messages', $unread_messages);

$template->set('title', 'ATTemplate Test');

$property_array = array(
    'first_name' => 'John',
    'time' => date('H:i:s'),
    'friend_requests' => array(
        array('name'=>'James', 'followers'=>rand(0, 200)),
        array('name'=>'Josh', 'followers'=>rand(0, 200)),
        array('name'=>'Aaron', 'followers'=>rand(0, 200)),
        array('name'=>'Eric', 'followers'=>rand(0, 200)),
        array('name'=>'Mike', 'followers'=>rand(0, 200))
    )
);

// This pushes the content of $property_array into the properties
$template->push($property_array);

// Prints the parsed template
echo $template->parse('index.phtml')

?>

And here’s what your template could look like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <title><?php echo $title; ?></title>

</head>

<body>

<h1>Welcome, <?php echo $first_name; ?></h1>

<?php if($unread_messages>0): ?>
<h2>You have <?php echo $unread_messages; ?> unread messages!</h2>
<?php endif; ?>

<p>You have received friend requests from the following people:</p>
<ol>
<?php foreach($friend_requests as $friend_request): ?>
    <li><?php echo $friend_request['name']; ?> (has <?php echo $friend_request['followers']; ?> followers)</li>
<?php endforeach; ?>
</ol>

<p>The time is <?php echo $time; ?></p>

</body>
</html>

License

You’re free to use the code in whatever you want, commercial or not. Modify it, redistribute it, do whatever you want with it.

The only requirement is that you need to give me credit.

Also, please do shoot me an email if you use this in your project.

ATTemplate by Kenneth Ballenegger is licensed under the Azure License.

Download

Download ATTemplate!

]]>
http://www.seoxys.com/attemplate-simple-templating-system-in-php/feed/ 2
Meet iLaugh 2.0 – Social Jokes http://www.seoxys.com/ilaugh-2/ http://www.seoxys.com/ilaugh-2/#comments Tue, 16 Jun 2009 15:02:52 +0000 kenneth http://www.seoxys.com/?p=201 After months of hard work, controversy and perseverance, iLaugh 2.0 is finally launching.

iLaugh puts a database of over 50,000 jokes in the palm of your hand. Vote on your favorite jokes, compile a list of your favorites, share jokes with your friends via Twitter and Facebook, and most importantly, have a good laugh.

With iLaugh, you have complete control over which jokes you want to read. The Categories feature gives you the ability to only read the jokes that interest you. Additionally, you can filter out adult jokes or jokes voted down by the community.


(click on the image to go to ilaughapp.com)

]]>
http://www.seoxys.com/ilaugh-2/feed/ 0
Warmonger: Warcraft III Autorefresh for Mac OS X http://www.seoxys.com/warmonger-warcraft-iii-autorefresh-for-mac-os-x/ http://www.seoxys.com/warmonger-warcraft-iii-autorefresh-for-mac-os-x/#comments Mon, 15 Jun 2009 08:19:42 +0000 kenneth http://www.seoxys.com/?p=197 One of the most popular articles on this blog has always been my tutorial on how to hack an War3 autorefresh bot for Mac.

However, it’s still quite a clunky hack, and many commenters have been unable to get it work smoothly. Even I gave up on it when I upgraded to Leopard.

Introducing Warmonger

Warmonger is a Mac-like autorefresh bot for Warcraft III. It does that and only that, but it does it well, reliably and most importantly, natively.

Warmonger is completely free, too.

Download Warmonger

Using Warmonger is easy: Create a game on Battle.net, switch to Warmonger and hit Refresh, get back to War3 and enjoy your autorefreshing game.

Warmonger knows to stop automatically when your game starts. Once it’s launched, you don’t even have to worry about it anymore. It really is that simple.

]]>
http://www.seoxys.com/warmonger-warcraft-iii-autorefresh-for-mac-os-x/feed/ 38
Apple’s Increasingly Ridiculous Rejections http://www.seoxys.com/apples-increasingly-ridiculous-rejections/ http://www.seoxys.com/apples-increasingly-ridiculous-rejections/#comments Thu, 11 Jun 2009 23:40:39 +0000 kenneth http://www.seoxys.com/?p=195 Three months ago, I submitted an update to iLaugh and iLaugh Lite, numbered 1.1.1 that fixed many bugs but didn’t change anything to the functionality of the app.

Today, after three whole months in review (seriously, I’m not making this up!), they decided to finally tackle the issue and issue me a rejection for no other reason other than “because we said so.”

See for yourself.

Please note, this is for iLaugh 1.1.1. iLaugh 2.0 is still in review, as a new application, and there’s no reason it should be rejected. In fact, the premium edition has already been approved and is already live on the App Store.

Speaking of iLaugh 2.0 – the first public screenshot ever:

]]>
http://www.seoxys.com/apples-increasingly-ridiculous-rejections/feed/ 37
Dynamic mass vhost with Apache and mod_rewrite http://www.seoxys.com/dynamic-mass-vhost-with-apache-and-mod_rewrite/ http://www.seoxys.com/dynamic-mass-vhost-with-apache-and-mod_rewrite/#comments Wed, 29 Apr 2009 15:57:14 +0000 kenneth http://www.seoxys.com/?p=185 In the process of setting up a new web-server with Mosso’s CloudServer, I came up across an interesting problem that took be the better part of the day to figure out.

The new server is completely unmanaged, which means that I have no web control panel to manage things. But worry not, that’s actually a good thing, because it means I have no web control panel to complicate and fuck up things either.

But it meant I had to setup Apache manually, including the vhosts so that my domain get mapped to the correct content. The problem is I have north of ten domains, each with their own subdomains. I could do it the standard and documented way of adding a VirtualHost for each domain, or I can be clever and have it do the work for me.

My first idea was to go with mod_vhost_alias:

UseCanonicalName Off

LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon

VirtualDocumentRoot /home/kenneth/www/%0/public
VirtualScriptAlias /home/kenneth/www/%0/cgi-bin

This worked like magic, automatically translating the domain requested to the path. http://domain.com/* would translate to /home/kenneth/www/domain.com/public/*. But, www.domain.com would translate to a folder named www.domain.com. This meant one of two things: either I had to create dirty symlinks in my www folder, or anybody accessing my domain from the www. subdomain would get a 404 error, both of which are unacceptable.

Another option would be to change that code like such:

VirtualDocumentRoot /home/kenneth/www/%-2.0.%-1.0/public
VirtualScriptAlias /home/kenneth/www/%-2.0.%-1.0/cgi-bin

This works by taking the last two parts of a domain, but it has two big flaws. Firstly, it completely ignores any subdomains. Secondly, it doesn’t work with multiple-tld domains, such as .co.uk domains.

After a whole afternoon of trying different things, I came to the optimal solution, through URL rewriting.

With this solution, domains, whether they have www. or not, map to the same domain.tld folder, and subdomains also map to folders in the same root folder (www, in my case).

UseCanonicalName Off

<Directory /home>
Options FollowSymLinks ExecCGIAllowOverride All
</Directory>

RewriteEngine On

RewriteCond %{REQUEST_URI} !/home/kenneth/www
RewriteCond %{REQUEST_URI} !^/icons/
RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC]
RewriteRule ^/(.*)$ /home/kenneth/www/%1/public/$1

RewriteCond %{REQUEST_URI} !/home/kenneth/www
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC]
RewriteRule ^/(.*)$ /home/kenneth/www/%1/cgi-bin/$1 [T=application/x-httpd-cgi]
]]>
http://www.seoxys.com/dynamic-mass-vhost-with-apache-and-mod_rewrite/feed/ 2
Personal Hub, Business Cards, Art Potfolio http://www.seoxys.com/personal-hub-business-cards-art-potfolio/ http://www.seoxys.com/personal-hub-business-cards-art-potfolio/#comments Sat, 18 Apr 2009 16:35:49 +0000 kenneth http://www.seoxys.com/?p=181 I’ve recently won a prize of a thousand free business cards in a contest, which gave me the perfect excuse to stop procrastinating and start designing pretty business cards. Below are a few images of these beauties.

To match these nifty-looking business cards, I today designed and launched a new personal “hub” site to overcome the usability and the not-so-friendly look of the old one.

Going from this:

To this:

My blog shrinks the image, go visit the site, it look much better in reality.

The last thing I wanted to show off is something I should’ve shown off a long time: my formal art portfolio.

Click on the (very modest) title page to view the rest.

]]>
http://www.seoxys.com/personal-hub-business-cards-art-potfolio/feed/ 0
An Open Letter to John Gruber http://www.seoxys.com/an-open-letter-to-john-gruber/ http://www.seoxys.com/an-open-letter-to-john-gruber/#comments Fri, 10 Apr 2009 19:17:35 +0000 kenneth http://www.seoxys.com/?p=161 Dear Mr. Gruber,

I have read your recent article entitled How to Block the DiggBar in which you argue that the the DiggBar is fundamentally evil. You then go on to show how you go out of your way to block traffic coming from a shortened Digg URL.

I’m all for calling out jackassery on the internet and am an avid reader of your RSS feed, in which you usually do a pretty good job of that. In fact, Daring Fireball is, according to NetNewsWire the feed I give most attention to. However, this specific article perturbs me in a number of ways.

Firstly, regarding the topic of the DiggBar itself, I disagree with you in that the DiggBar is the possibly very best possible implementation of that specific feature. I’ll be the first to agree with you that framing the content is not an ideal solution, but I fail to see a better one.

The DiggBar may have its fair share of flaws. It may or may not attribute to Digg some of the search engine ‘juice’ that is rightfully the publisher’s. However, it is important to note that Digg has denied this claim, and I, for one, believe them until proven wrong. It is also important to note that if it weren’t for Digg, the publisher wouldn’t receive the search engine ‘juice’ — or the traffic for that matter — in the first place.

I personally think they have done a pretty good job using the available technologies. The fact is that the DiggBar is primarily a tool for Digg users, and that for that purpose it is a very useful and both well-designed and well-engineered tool.

The second thing that troubles me about your article is how you go out of your way block Digg traffic, and by sharing the know-how encourage others to do so too.

This will certainly not be of any benefit to the publishers. In fact, it will most likely destroy any chance of them becoming popular on Digg. While I agree with you that average Digg users are of incontestably lower average quality than your average reader, it is widely agreed that just like any publicity is good publicity, any traffic is good traffic.

One definitely does not lose anything by letting Digg users use the DiggBar on one’s site. Blocking the DiggBar will only have two effects: to turn free traffic to one’s site into no traffic at all; and to ruin the experience of Digg user’s who’d like to use one of the site’s most attractive features in conjunction with one’s site.

Lastly, I also have a gripe with the tone of your article. I find it to be misleading in that it gives your opinion — a negative portrayal of Digg — and passes it off as fact. Your description of the DiggBar, for example, does not actually fully describe the DiggBar, but rather enumerates several negative facts concerning it. This immediately gives the reader a fully negative view of the DiggBar that it perhaps doesn’t deserve.

Yours sincerely,
Kenneth Ballenegger

]]>
http://www.seoxys.com/an-open-letter-to-john-gruber/feed/ 2
Growing iPhone Development Into A Viable Business http://www.seoxys.com/growing-iphone-development-into-a-viable-business/ http://www.seoxys.com/growing-iphone-development-into-a-viable-business/#comments Wed, 08 Apr 2009 20:28:00 +0000 kenneth http://www.seoxys.com/?p=155 When one hears stories from iPhone developers, they’re either from the lucky ones who made insane amounts of money and laugh all the way to the bank, or rather from disappointed developers who consider their efforts a failure.

The latter tend to blame the App Store for the failure of their application(s). Granted, the App Store is a harsh market which has both its advantages and its flaws. But, in my humble opinion, a good craftsman never blames his tools.

The App Store has trends that can be analyzed, and if you’re going to be developing for the iPhone, you need to learn how to adapt. I have learnt this first-hand through experimentation, and have learnt many valuable lessons along the way.

Last September, while working on a much bigger iPhone game, I thought it would be cool to create a quick one-trick application for viewing jokes. I never envisioned that iLaugh would become my most lucrative app that would keep me going while I develop the aforementioned game.

The Y-Axis shows daily revenue in US dollars.

Let’s leave the end of the graph (Feb-Apr) aside for a minute, we’ll get back to it.

You can see the initial release spikes, typical of the App Store, and then a very depressing downwards trend right after release. For the second release, 1.1, I upped the price from $0.99 to $1.99. Which slightly lowered the initial spike revenue. But at that stage, I had a much more mature app which unfortunately, due to lack of effective marketing stagnated at a sub-$20 daily revenue.

But in February, I made pretty much the best decision I have ever made. That, of course, was to release a Lite version. I initially thought it would be a nearly cost-free way to get some free advertising for the premium version. The main reason I put ads inside the Lite version was actually not to create revenue, but rather to give users a reason to upgrade. But, other than that, the Lite version was an identical, fully functional copy of the premium version.

As you can see, it did a pretty decent job of advertising the premium version. Since the mid-Feb release of iLaugh Lite, daily revenue for iLaugh has been much higher than it previously was.

Fortunately, iLaugh Lite became quite popular on the iTunes App Store, and while never entering the global top 100, it has charted as high as #29 on the Entertainment chart, and has been in the top 40 entertainment apps nearly since its release.

While this did have some unexpected consequences, like bringing my entire server down due to excessive traffic which brought the iLaugh service down and forced me to upgrade to a better server, the benefits were pretty clear.

This graph shows daily iLaugh Lite downloads.

This equates to about 100,000 monthly downloads.

Here’s a graph that shows the web-service traffic this generates (since each joke is fetched from my server, this gives me a pretty good overview of the actual usage of the app). Unfortunately, I only started using this particular analytics package on March 2nd, so that’s when the graph starts.

To date, iLaugh has served over 6 million jokes, and it’s going at about one million per week.

So far I left out one pretty important thing: ad revenue. But one always leaves the best for last, right? So here goes:

As the installed user-base for iLaugh Lite grows, so does daily ad revenue. Currently, I’m seeing pretty good numbers. I have around 6 million monthly ad impressions, and as you can see in the above graph, I’m seeing around $100 daily ad revenue.

While these aren’t mind-shattering numbers, I think they give a pretty good overview of what one can achieve as an average developer for the iPhone platform.

]]>
http://www.seoxys.com/growing-iphone-development-into-a-viable-business/feed/ 23
Best of iLaugh http://www.seoxys.com/best-of-ilaugh/ http://www.seoxys.com/best-of-ilaugh/#comments Fri, 03 Apr 2009 16:23:39 +0000 kenneth http://www.seoxys.com/?p=153 Here are a few jokes I picked out as winners from the contest:

Warning: some of these jokes may be rated R

The nun teaching Sunday school was speaking to her class one morning when she asked the question, ‘When you die and go to heaven…which part of your body goes first?’

Suzy raised her hand and said, ‘I think it’s your hands’.

‘Why do you think it’s your hands, Suzy?’

Suzy replied, ‘Because when you pray, you hold your hands together in front of you and God just takes your hands first’.

‘What a wonderful answer!’ the nun said.

Little Johnny raised his hand and said, ‘Sister, I think it’s your feet’.

The nun looked at him with the strangest look on her face. ‘Now, Little Johnny, why do you think it would be your feet?’

Little Johnny said, ‘Well, I walked into Mommy and Daddy’s bedroom the other night, Mommy had her legs straight up in the air and she was saying, ‘Oh! God, I’m coming! … and if Dad hadn’t pinned her down, we’d have lost her’.

The Nun fainted

Did you hear about the guy whose whole left side was cut off? He’s all right now.

“Dairy farming s’a rough life”, one young man lamented, “what with my two brothers and me having to divvy up the milking of two hundred cows each morning.”

“Wow, that does sound exhausting” remarked one onlooker.

“Yea, well, it’ll be better soon when my pa gets another hundred head.”

“How can it be better with more cows to milk?”

“Well, shoot! Any fool can divide 300 by 3.”

At the exact same time there are two young men on opposite sides of the Earth. One is walking a tight rope between two skyscrapers. The other is receiving oral sex from a 98 year old woman. They are both thinking the exact same thing:

Don’t Look Down!

Q: Why do men like women dressed in leather?

A: They smell like new car.

Your mom is so fat that when she fell in love, she broke it.

Your mom is so fat that when she tried to sit up, she rocked herself to sleep.

An infinite number of mathmaticians walk into a bar. The first mathmatician says to the bartendender, “I’d like a beer, please.” The second mathmatician says, “I would like a half a beer, please, sir.” The third mathmatician, smiling, says, “I’d like half of a half of a beer, please, good sir!” The bartender, glancing down the line, says, “You’re all morons!”, pours two beers and walks away.

A priest and a rabbi are at a wedding. They see a kid bending over to tie his shoe. So the priest goes to the rabbi: “Oh man, I’d really love to screw that kid”. The rabbi says: “Out of what?”

A priest offered a Nun a lift.
She got in and crossed her legs, forcing her gown to reveal a leg.
The priest nearly had an accident.
After controlling the car, he stealthily slid his hand up her leg.
The nun said, ‘Father, remember Psalm 129?’
The priest removed his hand. But, changing gears, he let his hand slide up her leg again
The nun once again said, ‘Father, remember Psalm 129?’
The priest apologized ‘Sorry sister but the flesh is weak.’
Arriving at the convent, the nun sighed heavily and went on her way.
On his arrival at the church, the priest rushed to look up Psalm 129. It said, ‘Go forth and seek, further up, you will find glory.’
Moral of the story:
If you are not well informed in your job, you might miss a great opportunity.

A man is getting into the shower just as his wife is finishing up her shower, when the doorbell rings.
The wife quickly wraps herself in a towel and runs downstairs.
When she opens the door, there stands Bob , the next-door neighbor.
Before she says a word, Bob says, ‘I’ll give you $800 to drop that towel.’
After thinking for a moment, the woman drops her towel and stands naked in front of Bob , after a few seconds, Bob hands her $800 and leaves.
The woman wraps back up in the towel and goes back upstairs.
When she gets to the bathroom, her husband asks, ‘Who was that?’
‘It was Bob the next door neighbor,’ she replies.
‘Great,’ the husband says, ‘did he say anything about the $800 he owes me?’
Moral of the story:
If you share critical information pertaining to credit and risk with your shareholders in time, you may be in a position to prevent avoidable exposure.

]]>
http://www.seoxys.com/best-of-ilaugh/feed/ 0