Klondike is a dice poker game.
Klondike is loosely based on poker originating in cheap casinos on the American frontier. Its really easy to play if you know anything about poker; even if you don’t its still pretty easy.

What you need to play

  • 5 dices
  • A sheet of paper to keep score
  • 1 or more people

How to play the game
The banker or dealer rolls first and creates a poker hand from his roll.
The players then each take there turn to roll the 5 dice and try to make a poker hand.
Five of a kind (4, 4, 4, 4, 4)
Four of a kind (3, 3, 3, 3,1)
Full House, Three of a kind and a pair (4, 4, 4, 5, 5)
Three of a kind (6, 6, 6, 3, 1)
Two pairs (5, 5, 3, 3, 1)
One pair (5, 5, 1, 2, 6)

Only one throw is allowed.
The numbers are ranked high to low as 1, 6, 5, 4, 3, 2.
Any dice that are not used are ignored.
The dealer wins a tie.

Example game play
The dealer rolls, (5, 5, 5, 3, 1) and has three of a kind.
Player 1 rolls (6, 6, 6, 2, 5) and has three of a kind but the dealer wins ties.
Player 2 rolls (3, 3, 2, 2, 2) and a full house beats the dealer.
Player 2 wins.

The casino variation is played with 10 dice using a table with a layout with three sections, “win”, “lose”, “Beat two aces”.  The banker rolls five dice and sets them sides.  The players then take turns rolling the other 5 dice trying to beat the banker.  A player that bets on win must try to throw a combination that is higher then the bankers, while a player that bets on lose has to try to roll less then the banker.  A player that bets on two aces must throw at lest two pairs.  Because all ties win for the house, the house has the edge on ‘win’ or ‘lose’ bets at 5.194%.  The house edge on ‘beat two aces’ is 11.111%.

King’s Cup

A classic drinking game that evolves filling a cup (the kings cup) with random shots of liquor for the unfortunate loser of the game.
As with all drinking games the point of the game is to get drunk.

You will need

  • A large cup (must be able to hold several shots)
  • A deck of cards (jokers removed)
  • 2+ players

Set up
Place a large cup in the center of a table with cards spread around it face down.

How to play the game
Each player picks a card from the face down cards and follows the rules below.
Once done the turn order goes to the left.
Mob rules – majority always rules, if they say drink when or if you messed up, you drink.

Ace- Social, everyone drinks.
2- Is for You, you pick someone to drink.
3- Is for Me, you drink.
4- Is for Whores, girls drink.
5- Rule, make a rule everyone must follow until the next 5 is picked.  If rule is broken, that person must drink.  See below for example rules
6- Is for dicks, guys drink.
7- Multiples of 11, The person who picks this card begins to count..”1″, the next person continues saying.. “2″, and the nextplayer says..”3″, and so on.  As soon as you reach 7 (whoever it lands on), the player says “F*CK YOU!” instead.  The direction then reverses (so the person who just said 6, now must say 8 and whoever said 5 says 9), and continues untill 11 is the number to be said and instead saying “F*CK YOU” and the direction again reverses.  Whoever f*cks up…DRINKS!

8- Don’t be late, a.k.a thumbs on table or points to the sky.  Whoever is the last to pick-up on the play must drink.
9- Nines is rhyme.  The person who draws this card will say a word, then the person to the right has to say a word that rhymes with it.  This continues around the table until someone messes up.  This person has to drink.
10- Waterfalls.  The person who picks this card has a choice of playing waterfall.  That person begins to drink.  The person next to the starter then begins to drink soon after, the player next to them begins drinking after the follower, and so on.  The trick is you can’t stop drinking until the starting player stops, then each player in order can stop once the player before them has stopped.
Jack – Go Back, the person before you drinks.
Queen- Questions (my personal least favorite).  Player turns to the person next to them and asks a question (ex: Have you ever licked a donkey’s butt hole?)  Then that person must turn to the next person and ask a relevant question (ex: Wouldn’t a Donkeys butt hole taste like candy?) the person who fumbles drinks.  Each question must be answered with a question!!
King- This is the kicker.  Whenever a king is drawn, that person must pour however much of their drink they wish into the empty cup on the table.  The person who draws the last king MUST DOWN THE KINGS CUP!  You could see what chaos would occure with more than one deck and several diffrent types of booze!

Variations of this Game

There are lots of different variations of this game, replacing some rules with others.  Some of the more common rules that I have seen are:

  • “Little (Green) Man (Wee Man)” – Before a player takes a drink, he must remove a “little man” from the rim of his cup before taking a drink.
  • “Don’t Break the Circle” – The cards around the King’s Cup must continue to make a circle around the cup through touching one another while people pull their cards on their turns.
  • “No First Names” – No using another player’s first name.
  • “Aristocracy” – Whenever a player addresses another player by name, they must give them a suitable title, such as Baron or Lady.
  • “Drink, Drank, Drunk (3D)” – No player may say drink, drank or drunk.
  • “Dyslexia” – All players have their names reversed, so, for example, Tom becomes Mot.
  • “Numbers” – Whenever a player says a number of any type, he/she must take that many drinks.
  • “In My Pants” – After the conclusion of any statement, a player must say “In My Pants” or another phrase, such as “In my bed”, “When I’m naked”, “Because I’m a slut”, etc.
  • “First Person” – No one can use any pronouns (e.g., I, my, me, mine, etc.) Very interesting when combined with the “In my pants” rule.
  • “S” – Any player to say a word beginning with “s” must drink.
  • “Orgasms” – Whenever someone says a certain word, the other players at the table have to fake an orgasm. The last person to do so has to drink.
  • “Pointing” – Often phrased something like “Whenever I point at Ronan he must drink” or “Whenever someone points they have to put their face on the table until the next person points”.
  • “Polite Society” – No swearing.
  • “Srebmun” – All numbers must be pronounced backwards.
  • “Two Hander” – All drinking must be done with both hands simultaneously contacting the glass, cup, or bottle.
  • “Rob Lawlor” drink with left hand and with pinky in the air. Sometimes, the rule can be more general and dictate that all players may drink with their non-dominant hands only.
  • “Rick James” – When anyone says anything, they must end the phrase by saying “BITCH!”.
  • “Superheroes” – Players can’t say any others’ names, and have to replace them with a superhero’s name. One can assign them, or just make them up.
  • “Pirate” – All players must look into the can and say “Aaarrrr!!” (like a pirate) before they drink.
  • “Fuck” – Every sentence must have “Fuck” in it.
  • “Add a Drink” – Every time a drink needs to be taken, one must add one more drink to whatever amount of drink must be taken (i.e: one shot is needed, so two shots are taken)
  • “Righty Tighty” – One must hold his drink in his right hand until the game is over.
  • “Hook up Rule” – All players can only be referred to by the name of someone they have hooked up with in the past.
  • “Pockets” – Anyone who puts their hands in their pockets must drink.
  • “Chins” – Everyone must keep chins on table unless taking a drink.
  • “Balls” – Every time anyone takes a drink, they must act like the beer can / cup / bottle is a penis, and ‘caress the balls’ beneath the ‘penis’ as they’re taking a drink.
  • “Eye Contact” – No person playing the game can make eye contact with another person playing the game. The consequence of this is both people must drink.
  • “Face-Touching” – No player is allowed to touch his own face during the remainder of the game.
  • “Period” – Everyone must speak the applicable punctuation for everything they say (period).
  • “Let it Ring” – No player is allowed to answer any cellphone or text anyone till the game is over. If caught doing so they are required to finish thier drink before the game continues
  • “Dress Code” – Certain items of clothing may be forbidden to be worn by any player. Bras and underwear are popular choices, especially when playing with other strip rules.


Jackpot is a dice game that was played in many taverns in the middle ages.  People could often find the game’s layout on the taverns tables.  In lower-class establishments the layout is often crudely carved into the tables surface, whereas finer establishments have been known to use specific tables set aside for the game.

This game is also known as Dragon’s Hoard.

What you need to play

  • 2 dice
  • 2 or more players
  • Some chips (Max of 33 chips need, most of the time a lot less are required)
  • A game board descried below (can me made with a pen)


Game Board
The game is usually nine circles with the numbers 3 through 11 inside them.  A design is drawn in the center.

How to play the game
Players throw the dice in turn.  After each throw, the players place a chip on the corresponding number on the layout.  For example, if a player throws a total of 4, he places a chip on the area of the layout marked 4.  The dice are then passed counter clock wise.  Once a number on the layout has three or more chips on it, the next player to roll that number collects them.

If a player rolls a pair of 1’s, (known as Dragon Eyes), that player places a chip on all the numbers on the layout.
If a player rolls a pair of 6’s, (know as Stealing the Hoard), they collect all the chips on the layout.
Play continues for a pre-determined time, or until it is agreed to end the game.

links for 2009-12-19

  • When Paris-born, Israeli-raised Yael Naim met David Donatien, a West Indian drummer, the two sat down to share their rich musical experiences. Combining Yael’s classical education and love of pop and jazz, this collaboration lead into recording 13 beautifully arranged compositions, mostly sung in Hebrew, with instrumentation of piano, guitar, cello, bass and percussion. While the mood ranges from melancholic to sweeter and hopeful notes, she carries intimate feeling throughout her songs.
    (tags: music audio blog)
  • The easiest way to create an image gallery within WordPress is by using the add feature (from WP 2.5+), but to give your gallery something extra you may wish to add the Lightbox effect. Originally developed by Lokeshdhaker.com, Lightbox has gained widespread popularity because it is easy to use and it gives a professional and stylish finish to your images.

links for 2009-12-17

CakePHP – Security.level

I been having reports from my users that they are getting randomly logged out of my web applications. After much debugging I found that CakePHP regenerates the session on every request.

File: core.php
* The level of CakePHP security. The session timeout time defined
* in 'Session.timeout' is multiplied according to the settings here.
* Valid values:
* 'high' Session timeout in 'Session.timeout' x 10
* 'medium' Session timeout in 'Session.timeout' x 100
* 'low' Session timeout in 'Session.timeout' x 300
* CakePHP session IDs are also regenerated between requests if
* 'Security.level' is set to 'high
Configure::write('Security.level', 'high');

After changing the ‘Security.level‘ to medium the problem stopped happening.

Get special folders with SHGetKnownFolderPath

This application will print the special folders that you should be storing your applcations data in.
UAC on Windows Vista/7 will no longer alowe you to write to files in the “C:\Program Files\” with out elevation to administrator. Instead you should be writting your settings file to the “LocalAppData” folder and your output and log file to “Documents” folder.

More information on UAC

Source code:

#include <shlobj.h>
void GetSpecialFolder( REFKNOWNFOLDERID rfid ) {
LPWSTR wszPath = NULL;
HRESULT hr = SHGetKnownFolderPath ( rfid, KF_FLAG_CREATE, NULL, &wszPath );
if ( SUCCEEDED(hr) )
wprintf( _T("Path: %s\n"), wszPath );

int _tmain(int argc, _TCHAR* argv[])
GetSpecialFolder( FOLDERID_ProgramData ); // Shared program data directory for all users
GetSpecialFolder( FOLDERID_RoamingAppData ); // Per-user program data directory (roaming)
GetSpecialFolder( FOLDERID_LocalAppData ); // Per-user program data directory (non-roaming)

GetSpecialFolder( FOLDERID_ProgramFiles ); // App install directory
GetSpecialFolder( FOLDERID_Documents ); // Logs, reports, output
return 0;

Why don’t we have free phones yet?

“Re:Should be” by canajin56 (660655) on Wednesday December 16, @12:21PM (#30459990)

At least you guys have a choice of providers. Here in Canada, we almost have government-backed monopolies with even higher monthly bills.

Are you kidding? It’s not like we’re limited to the big 3 (Rogers, Telus, Bell), we have all sorts of other providers! There’s KOODO, their ads lead me to believe they don’t do all that nasty hidden fee stuff. Oh, rebranded TELUS to seem less evil? Oh, well, there’s always FIDO, they make the same claims about being not as evil as Rogers in all their ads! Oh…they’re owned by Rogers, to rebrand and seem less evil, too? Well, there’s always Solo Mobile. Oh…same deal with Bell? Virgin Mobile? Oh, Bell again? Why do they need TWO sham fronts? My favorite customer gouging one was the guy who ran up the $60,000 monthly bill, because they sold him an “Unlimited* Data** Plan!” that didn’t cover any data usage other than the phones built in browser, so all that smartphone shit that also used data was billed at dollars on the kilobyte. The best part of that was the way Telus or whoever it was was unrepentant “It’s not our fault he did not fully read the contract, but out of sheer generosity we will reduce the bill to a mere 6 grand!” A close runner up is KOODO/Telus’s promise of “No activation fee”, while there is a cancellation fee that is due in advanced when you sign up! Sort of like Blockbusters “No late fee *cough*but-there’s-a-restocking-fee-if-you-return-it-late*cough*”
Source: http://apple.slashdot.org/comments.pl?sid=1480704&cid=30459990

**Mostly thinking out loud**

Why don’t we have free phones yet?
Well lets look in to the barriers to a free phone. Software stack (OS), Hardware (the physical phone), Cell phone network (Cell phone towers and RF frequencies).

The software is pretty much done for us now that Google has released http://www.android.com. Even before  the android there where plenty of free open source smart phone stacks.

The hardware is a little tricker, it takes a lot of effort to build a solid phone with the right feature set. But over the last few years we have seen great strides in open hardware such as http://www.arduino.cc/. Everything from Servos, webcams, wind turbines, to even more complex things like Graphics cards, GPS, and multi-touch tablets.  There is even an open hardware cellphone Openmoko (FreeRunner) that has its own software stack. The hardware can be made with enough smart people behind it.

The network required an array of physical cell phone towers spread across the coverage area and RF frequency that the Cellphones can use to communicate with the cell phone towers (How cell phone talk to each other). The RF frequency sold by the government to the highest bidder for billions.  There is no way for an open source group or any small business to enter the field. Roadblock.

So how do we work around the cell phone networks?

Distributed network.

One option is you could use short range open RF frequency and hop your signal from device to device until it found its detestation (Mesh_networking). Every device on the network would be responsible for receiving message checking to see if the message was meant for them if not sending it on to the next node. After a connection is made a short route could be created to optimize the connection and a backup route in case the first rout drops off. Every time a device comes in contact with anther devices it could create a list of contacted devices and the last time they saw them. This list would help in creating routs between people. The more users on the network the better chance there is that your message would get delivered.


These are just the ones that I can think of off the top of my head. I’m sure there are many more.

  • Fractured networks. If two people are too far apart and there are not enugh nodes to connect them to each other they will not be able to send a message between each other.
  • Privacy. If the message has to be relayed thou many different devices there is a chance that it could be intercepted by one of these devices and read by an unintended target. Public and private key encryption should help with reducing the ability for third parties to spy on conversations but the risk is still there.
  • Battier life. Since every device would be essentially active all the time they would consume a enormous amount of power.  Think of your current cell phone and how long the battery lasts when you are talking on it. At most a battery charge would only last a day.
  • Wear and tare. Again since all the devices are talking all the time the devices would break down a lot faster then your normal cell phone. instead of years think maybe one full year. More disposable electronics means more trash in our landfills, ect…
  • DOS attacks. Since every device has the requirement to repeat message that it receives to every other devices on the network until a destination is found the system acceptable to denial of service attacks.
  • RF frequency. Collisions between two different devices talking on the same channel.

Distributed networks doesn’t seem to be the right option for a free cell phone network.

I never

I Never is a drinking, word game.
This is an absurdly easy game. It’s not about how much you drink, but what you can find out about your friends. This is a game you don’t just want to play with your buddies, you will want some girls in the mix and preferably people that have lived an eventful life.

What you will need
Some non-bashful people who have lived at least a semi eventful life.  A good mixture of guys and girls is important.

How to play the game
Everyone sits in a circle and the person that suggested the game goes first.  They say, “I have never….” followed by something that he or she may or may not have done. (See below for some examples)  If anyone has done the event they have to drink.  The person to the right goes next and starts with, “I have never…”.  The games gets good as people try more daring things.
“I have never…”

  • Cheated on a test
  • Cheated on a Girl/Boy friend
  • Stole from a homeless man
  • Made out with a stranger
  • Slept with a stranger

Feel free to suggest some other “I have never…’s”

links for 2009-12-11

CakePHP – Disable validation in controler

When upgrading an old web application to start using CakePHP but the old systems was riddled with invalid data. When the creating the CRUD system I need a way of updating this invalid data.

The following line of code will disable the validation in the controller.

$this->Story->validate = array(); // Stop valadation on the story.

Source: Cakephp Save with a table where the primary key is not ‘id’

CakePHP – Search bar

This code snippet will create a search box that uses can use to search for text in the database.
The control creates a query to search certain fields of publsihed stories

View or layout:
echo $form->create('Stories', array('url' => array('action' => 'index')));
echo $form->input('search_text', array('label' => false));
echo $form->end('Search');

function admin_index( )
$conditions = array( 'Story.terms !=' => '0' ) ;
if( isset( $this->data['Stories']['search_text'] ) )
$this->set('title', ' Search "'. $this->data['Stories']['search_text'] .'"' );
$conditions = array(
'Story.published' => '1',
'or' => array(
'Story.title LIKE' => '%' . $this->data['Stories']['search_text'] . '%',
'Author.name LIKE' => '%' . $this->data['Stories']['search_text'] . '%'

$data = $this->paginate( 'Story', $conditions);
$this->set('data', $data );

Indian Poker

Indian Poker is a drinking, card game.
I just played this game for the first time this weekend. It was very simple to learn and really good after a few beers. It’s a pretty silly game and if you are in the right mood it can really make you laugh.

“They speak of my drinking but never think of my thirst”
-Scottish Proverb

What you need to play

  • A deck of cards
  • 2 or more players

How to play the game
Everyone is dealt one card face down so no one can see the cards.  Each player licks the back of the card and sticks it to their forehead.  You should be able to see all the other players cards, but you should not be able to see your own.  Starting with the dealer each person bets with number of drinks if they think they have the highest card or they fold.  If a player folds they have to drink as many drinks as the highest bet.  (I suggest that you put a 5 drink max bet to be reasonable).  Once everyone has called or folded, everyone reveals their cards to each other and whoever has the highest card does not have to drink.

If there is a tie, a private match between the players is held.  Aces are high.

UPS vs FedEx

I ordered some cables from this online store in the states (I live in Canada) the cost in goods was $30 for both packages.

The first time I ordered the cables I was in a rush so I used FedEx air 2 day, it cost me about $26 in shipping and arrived in two days.  Total 30+21= $51 CND
The second time  that I ordered cables from this store I wasn’t in a rush and decided to use USP ground shipping instead of FedEx for $13. A savings of $8 or so I thought. When it I arrived at my door a 10 days later I was asked to pay $40 in brokerage fees (COD) on top of the $13 in shipping fees that i already paid. Total: 30+13+40 = $83 CND. I refused delivery.

$53 in shipping and brokerage fees from UPS,
$51 for shipping and the product from FedEX.

In this case it would be cheaper for me to make a new order from the store and get FedEx to ship it then it would be for me to accept the USP shipment and pay the brokerage fees, and thats exactly what I did.

Two weeks later I get a call from UPS asking why I refused delivery. I told them my story and how its cheaper for me to make the purchase again then it is to pay for outrageousness  brokerage fees that they where charging and ended the conversation with ‘Why would anyone choose to use USP over FedEx?’

They asked me to pay for the current  ($40) brokerage fees and additional ($13) shipping it back to me on top of the money I already spent on shipping the first time. For a total of 40+13+13= $66 CND due. I refused.
They told me that I would not get package delivered and it would be returned to sender. Prefrect maybe I can get the seller to ship me the products via FedEx this time and it would still save me $45 (=$66-$21) in the end.

Last time I ever use USP.

links for 2009-12-03

  • Recently, on del.icio.us mailinglist, I asked the question “Does anyone know the database schema of del.icio.us?” .
    I got a few private responses so I wanted to share the knowledge with the world.

    The Problem: You want to have a database schema where you can tag a bookmark (or a blog post or whatever) with as many tags as you want. Later then, you want to run queries to constrain the bookmarks to a union or intersection of tags. You also want to exclude (say: minus) some tags from the search result.