Intergalatic Best Chocolate Chip Cookies

I know everyone has their favorite Chocolate Chip Cookie recipe.  This recipe is about to change that. You won’t find a better chocolate chip cookie as far as the Hubble telescope can see. This recipe courtesy of my sister-in-law, Haili.

One key to making any drop cookie is to use a consistent portioning method.  I like to use small ice cream scoops – now marketed as cookie scoops.  I have a couple of them – a 1 TB and a 2 TB measure.  They really speed up the process of portioning the dough to create cookies that are evenly sized for even baking.  They’re not inexpensive though (approx. 12 – 14 bucks each) but will last a lifetime.

Extra geeky tip
You can also use a regular tablespoon and a scale to ensure even portions but it’ll take some more time. You’ll get extra geek points though if that helps.

Chocolate Chippers


  • 8 T unsalted butter
  • 8 T butter flavor natural shortening
  • 3/4 cup sugar
  • 3/4 cup brown sugar
  • 2 tsp vanilla
  • 2 eggs
  • 2 3/4 cup flour
  • 1 tsp salt
  • 1 tsp baking soda
  • 2 cups walnuts (halved or coarsely chopped)
  • 2 cups chocolate chips


  1. Cream together butter, both sugars, vanilla.
  2. Add eggs one at a time, mix.
  3. Whisk together dry ingredients.
  4. Add 1/2 dry ingredients to wet mixture, mix. Add rest, mix.
  5. Add remaining dry ingredients, mix
  6. Add chocolate chips and nuts, mix.
  7. Preheated oven cook at 375 for 11 minutes.

Tagged with: , , , , ,

Edit File Upload Size for PHP Applications

I’ve been asked this question a number of times for a variety of PHP-based applications including Moodle, WordPress and Omeka and so it’s worth documenting here.

The installation of PHP is what is controlling the maximum size of your file uploads.  By default, you are restricted to a maximum of 2 MB upload file size.  Here are the settings that control this configuration:

1. upload_max_filesize – This sets the maximum size of an uploaded file

2. post_max_size – This sets the maximum size of post data.  This setting is related to the upload setting in that it must be the same or larger than the value set in upload_max_filesize.

3.  memory_limit – This set the maximum amount of memory in bytes that a script is allowed to allocate.  Generally this setting should be larger than post_max_size.

Step-by-step – edit php.ini

Edit the php.ini file (note:  there may be more than one php.ini file on a server – typical locations are /etc/php.ini, /etc/php.d/cgi/php.ini or /usr/local/etc/php.ini):

 #  vi /etc/php.ini

Sample php.ini file:

; File Uploads ;
; Maximum allowed size for uploaded files.
upload_max_filesize = 20M

; Data Handling ;
; Maximum size of POST data that PHP will accept.
post_max_size = 25M

; Resource Limits ;
; Maximum amount of memory a script may consume (128MB)
memory_limit = 32M

Save the file and close it. Then restart the web server (showing an example of restart with Apache on RedHat ecosystem distro):

# service httpd restart
Tagged with: , , , , , , ,

Dangers of Yosemite

I’ve actually never been to the park, but I’ve certainly seen its wonders in photographs.  It’s clear from Ansel Adams’ famous photographs that amidst all the wonders are unexpected dangers.  Taking a misstep off a cliff felt palpable when I saw the resulting screen from my Mac OSX upgrade to Yosemite end with a blank grey screen showing a circle with a slash through it.

The installation was going swimmingly well and then ended with a grey screen showing a “no”  symbol (for lack of a better descriptor)  happily displayed in the middle with no text, errors, or other messages.  So I turned to the Google for help.  It became clear pretty fast that I’m not alone in this.  This seems to be a thing.  So here’s the fix I used:

Reboot your computer and hold down command + R as the system boots up.  It’ll display a status bar and eventually boot into a graphical screen that will allow you to run disk utility.

Run disk utility and select the Mac Harddrive [not the OS partition] and run the Repair Disk Permissions feature and then restart the computer.  It will display the various permissions it is fixing and once it’s finished you can restart and it should boot into Yosemite.

Here it is step by step [make sure computer is off]:

  1. Turn on Mac
  2. Hold command + R as the system boots up
  3. Once in recovery mode select a Computer Harddrive [not the OS partition]
  4. Run Repair Disk Permissions
  5. Reboot

Drop me a note if you have a different experience or a better way to fix this.  Good luck!

Tagged with: , , , , ,

Getting My Geek Card Revoked

Did you know that you can see the International Space Station (ISS) from Earth with your naked eyes?  Spouse told me that he’d seen it fly by one night. I didn’t believe him at first.  So of course I Googled it and then rp_Screen-Shot-2015-04-26-at-4.40.39-PM-284x300.pngmy memories of everything space from about fifth grade, reminded me that the country freaked out in the 50’s when people learned that Sputnik had been launched by the Russians and could be seen through binoculars proving that the US had been beaten to space by the USSR.  Of course, Sputnik was tiny in comparison to the ISS.  The ISS as manmade space objects goes is HUGE!  And when you see it with your bare eyes you’ll understand. It really is quite visible and bright no binoculars needed.

There are both apps and websites to help figure out when and where it’s visible (along with a lot of other interesting stuff).

Here are links to a few of them.

Tagged with: , , , , , ,

You’ll Get Forked if You Try This

I was having a discussion about code obscurity relative to different programming languages and had to mention this particular piece of malicious code from the unix shell.


This is a fork bomb and works like this:

:(){ :|:& };:

The :() defines a function called ':'
The {:|: &} says to run the function : and sends the output to the : function again.
That allows it to run in the background which prevents the children from being killed once the parents are auto-killed. 
The ; is a command separator and the following : calls the function the first time and initiates the chain reaction.

The worst/best part of this is there’s nothing about this sort of code that requires and administrative/root privilege to run.

Tagged with: , , , , , ,

Auto Register Linux Client in AD (DNS)

Occasionally, I’ll build a prototype server just to kick the tires of some new system or application.  When I do that, I know that it’s a temporary set up and don’t want to spend time setting up a static IP address and registering it.  Fortunately, there’s a way to dynamically register a name with the DHCP server. See the ‘dhclient’ man page for more details but the short of it is:

Make sure the interface is down first:
[root@localhost]# ifconfig eth0 down
then type     

[root@localhost]# dhclient -F

where is your FQDN

Now try

[root@localhost]# nslookup



Tagged with: , ,


My FAQ for routine MySQL admin tasks:

Set the root password:
$ mysqladmin -u root password NEWPASSWORD

Change the root password:
$ mysqladmin -u root -p ‘oldpassword’ password ‘newpassword’

Recover a lost or forgotton MySQL root password:

1. Stop the MySQL server:
(For RedHat, Fedora, CentOS, Oracle Linux)
# service mysqld stop

(For other *nix varieties you can look for the .pid file that contains the server’s process ID.  The location of this varies between distros, hostnames and configurations.  Usually it is called either or  You can stop the server by sending a kill signal to the mysqld process by using the the path name of the .pid file passed as an argument like this:

# kill `cat /mysql-data-directory/’

2.  Create a text file containing the following statments to update the root password.  Type the two statement one on each line.
UPDATE mysql.user SET Password=PASSWORD(‘NewPassword’) WHERE User=’root’;

Save this file and make sure the mysql user can read the file. This example uses the name mysql-reset-file as the saved filename.

chown mysql:mysql mysql-reset-file 

3. Start the MySQL server with the –init-file start-up option:
# mysqld_safe –init-file=/home/user/mysql-reset-file &

The server should start and execute the query in the mysql-reset-file at startup changing the root password.  After the server starts, delete the mysql-reset-file you created.

Create a database:
$ mysql -u <useridwithcreatepriv> -p

login with your password then

mysql> create <databasename>;

Create a user:

Delete a user:

grant privileges to a user:

SHOW GRANTS for mark;
GRANT SELECT ON userdb.* TO mark;
REVOKE SELECT ON userdb.* FROM mark;

change a user’s password:

SET PASSWORD FOR mark = Password(‘password’);

mysql> drop database <dbname>;


Tagged with: , ,

Sinclair ZX80


I ran into a folder tucked away in a box that’s moved with me from place to place over the years without having been opened more than a couple of times. I’ve been on a mission to scan all kinds of childhood artifacts to rid myself of the burden of the all the paper originals. This folder contained some of my favorites so when I saw it, I moved it to the front of the scanning queue. It’s all the paperwork that came with the first computer I ever owned: a Sinclair ZX80.

Although the ZX80 was the first computer I ever owned, my experience with and exposure to computers came with using my school’s TRS-80s. My science teacher in high school was very forward thinking and had his own fully expanded TRS-80 Model I that included two floppy disk drives and a printer that he kept at the school. Additionally, there were five or six other basically equipped Model I computers (4k level 1 I think) for use by the students. As a part of freshman science we had to learn the rudimentary aspects of computer programming. He taught us how to program in BASIC and everyone in class had to write a Russian Roulette program.

I was hooked. I couldn’t get enough time with them. Not only did I write the Russian Roulette program, I wrote a graphics routine that started the game by displaying a clunky set of blocks in the shape of a gun along with another block that moved across the screen from the gun to represent the “bullet”. For me, it was the beginning of using the computer to present all kinds of schoolwork.

microaceadUnfortunately, I didn’t have enough time at school to work on programs but also didn’t have enough money to buy my own TRS-80. So one day in late 1980 while flipping through a Popular Electronics magazine (I was a teen subscriber) I saw an ad for a kit computer called the MicroAce. It was $149.95. That was still a lot of money for me but was also the closest computer I could imagine being able to buy given that all the other computers of the day were at least $299 with most being $600 or more. Plus, it came as a kit and I thought that would be fun. I was just starting to learn about electronics, electronic components and circuits, how to solder, and how to etch circuit boards, so it seemed like a good project. MicroAce even advertised that if you couldn’t get the computer to work after you assembled it, you could send it in to them to repair for $20.00. I started to save up to buy one.

Christmas came that year and I think I asked for very little hoping that Santa would put a little cash in my stocking instead. The new year came and then Sinclair did somesinclairadbwthing that changed the game for me. They too had been advertising the ZX80 in Popular Electronics towards the end of 1980. But their ad, like the MicroAce, was black and white but unlike the MicroAce it didn’t do much to hook me. In black and white, the MicroAce was a much nicer looking machine. So I had pretty much ignored the Sinclair. In fact, at one point on the MicroAce ad it listed “Licensed by Sinclair Research Ltd.” which to me meant I was effectively getting the Sinclair ZX80 for way less money. (Sixty dollars back then and as a kid *was* a lot of money). Interestingly, I never saw a color ad for the MicroAce. It was years later when I saw that it had a red colored keyboard which looked terrible to me.

In January of 1981, my issue of Popular Electronics arrived with the usual barrage of computer advertisements for all those expensive computers from Ohio Scientific, Pet, Radio Shack, Apple, Atari, “The imagination machine” and of course Heathkit that I couldn’t afford. It also had the usual ad for the MicroAce which I would read over and over. But that month the ad for the Sinclair ad had changed – it was in full color. ZX80-adWow. That really made a difference. The ZX80 with its blue keyboard white body and orange lettering was beautiful. Now I began to agonize about how to justify to myself that based merely on appearance I wanted the ZX80 more than the MicroAce and that it was going to cost me an extra fifty dollars.

I worked some extra hours at my dad’s business and saved and scrounged and eventually forked over the cash to my mom who called in my order for the Sinclair ZX80 in February 1981. It arrived a few of weeks later in a small unmarked cardboard box. It had a blue and white paper label affixed to the top of the box with my name and address and the return address in the US for Sinclair Research. I knew it would be small but it was really small. That had been one of the selling features for me. I liked the idea, as the ad stated, that it was “portable”. None of the other computers of the day were remotely portable. Even though it was tiny in a cheap kind of way, I liked it. Here, I’ve scanned my original invoice that I’ve kept all these years: Sinclair ZX80 Invoice

The size wasn’t the only thing that surprised me. Besides being little it didn’t behave anything like the TRS-80s at school.  I could get past the tiny membrane keyboard – afterall Sinclair had made it possible to enter whole Basic keywords with a single key press so there was a lot less typing. And I wasn’t a typist at that point so I appreciated the single keyword entry. But every time I pressed a key the screen would flicker. And when I ran a program the display would disappear entirely. I had learned how to use character graphics with the TRS-80s to make little interactive games. But when I converted these programs to run on the ZX80 there was no animation; only the final output displayed at the end of the program run. I was totally confused.

As it turns out, to break that $200 price barrier which was the ZX80’s claim to fame, Sinclair used the CPU for processing the display which meant that for a brief moment when there was keyboard input the processor had to interrupt to process the keyboard input and the display would blank out.  Likewise, when the CPU was performing calculations it was busy and couldn’t maintain the display so the screen blanked out until the program was done. I was not very happy.  Unfortunately, it took me longer than 30 days to figure this out. Sinclair had a try it for thirty days or your money back kind of program but at a time long before the internet, there was no quick way to understand what was going on. I tried to return it anyway. I packed it up in its original box and sent it back. Sinclair simply sent me another one with a form letter from Nigel Searle saying that it was outside the return window but they were sending me a new machine to replace it. Here’s the scanned copy of that letter:return letter

The difference was interesting. zx80-iss1 I must have originally received an early American market issue one unit. It had a thinner case with rounded edges on the top case and a shiny keyboard membrane, (like the one shown – left) as depicted in the ads from early ’81.  The second, replacement ZX80 I received looked sturdier and had a slightly thicker case with squared edges on the top case and a matt finish keyboard membrane.  I could tell this replacement was “better” in the sense of being more durable, but I really liked that first model with the softer edges better. But there wasn’t anything else to do so I made the best of it and kept it and continued to learn to program in Basic.

I had also noticed in those ads from early ’81 that Sinclair was coming out with expansion options. A new 8k BASIC interpreter, a 16k RAM upgrade and a printer. So I was looking forward to those upgrades. At least for the memory. Learning to prograzx80 rom ram replacementm in 1k of RAM even then was a challenge. I was starting to learn Z80 assembly at school mostly because it was the cool thing to do at the time as the TRS-80 also used the Zilog Z80 processor but also because I realized that the only way to get an interactive display with the ZX80 would be through machine language.

It wasn1024px-Sinclair-ZX81‘t long after that that Sinclair announced the ZX81 as the successor to the ZX80. I was massively disappointed. It had been completely redesigned appearance-wise. It was a sleeker black case with small raised red lettering and a keyboard membrane that was black and white with red accents. It looked ok but not nearly as cool as the ZX80. On the plus side, it offered a new mode of operation called “slow” mode which was flicker free. But I had just bought a ZX80 a few months before and I wasn’t going to buy another computer. I felt a little duped by Sinclair. But it seemed like a sunk cost so I decided to stick with them.

The best I could do was upgrade the ROM to the 8k model to have all the functionality minus the flicker-free slow mode.  Having integer BASIC had been pretty terrible so getting floating point math was a pretty important upgrade. So I waited for it to be released and saved some money for when it came out. I bought the 8k rom upgrade a few months later. It came in a plain manilla envelope (below right) along with an instruction sheet (below left) and a keyboard overlayzx80 rom replacement. I was really disappointed in the overlay. That alone was almost the reason I stopped using my ZX80.

Rather than develop a keyboard overlay that added the new ROM’s functionality to the keyboard and also matched the color scheme of the original ZX80, they simply supplied overlays that were from the ZX81. The overlay didn’t fit very well on the ZX80. It slid under the top case a little on one edge and was held down by the two plastic grommets at the other edge. So it was always a little loose.  It looked like some tatty add-on that wasn’t quite supposed to be there. Its red and black styling made the ZX80 look old, worn out and tired.  Today we’d call it a cheap hack.
rom upgrade folder opt

Interestingly,  I never installed either of them.  Shortly before Christmas, and before I could even open the case to install my new ROM, my ZX80 developed an issue and after calling in a couple of times to Sinclair support, they had me send it in.  I hadn’t purchased the twenty-five dollar extended warranty that Sinclair offered but I learned that if you called them enough they’d relent and do something to help you out. It was the least they could do after taking my two hundred bucks without warning me about the lack of a video display. So again I packed it up in its plain cardboard box and sent it off to Sinclair to be repaired. Much to my surprise, and joyful amazement at the time, they sent back a ZX81 to replace it!  I was so excited. I finally had access to “slow” mode with out having to pay anything. They didn’t charge me for the repair. They just sent me a new computer. It did extend the useful life of my Sinclair by about another six months.  But in the end, I really wanted a “real” computer and bought a used TRS-80 model 1.

In retrospect, it would have been better if I had kept the original ZX80 as their value has stayed high over the years due to the few of them sold and having survived all this time.  I picked one up about ten years ago (the one in the picture at the beginning of this article) for about $100.  I still keep a small black and white TV around just for it.  I also still have my original ZX81.  It was an interesting time in the development of the PC.  I’m glad I had the chance to experience it from the ground up.

Tagged with: , , , , ,

Happy Heart Day

Today is Valentine’s Day.  My spouse and I had our first date on Valentine’s Day four years ago.  While we tell everyone this story, I’ve never written it down.  So a new year, a new blog, and another Valentine’s day.  Here goes.

We met on February 7 of all places at the YMCA, in the lockerroom.  I know, I know, it’s the worst gay stereotype, ever. But that’s how it happened. We were pretty much living the stereotype that day as we both were cruising towards a quick encounter or possibly a one-nighter.  But as we continued talking past the exchanging numbers bit, we realized there might be more to explore in one another.

We walked out together and as we walked through the corridor towards the exit he turned to me and said, “I don’t think I can have sex with you.  I think I might like you.”  I told him that was incredibly sweet and asked what alternative he might like.  Things never go this way. We decided to have a date; a real date.  We planned it for a week later.

Of course neither of us realized at the time that one week from the 7th was Valentine’s Day.   I think we were both pretty giddy. We exchanged e-mails daily and talked on the phone.  I think he might have even have stopped by to say hi where I work as he walked by on his way to where he parked.  The e-mails we exchanged that week are some of the nicest I’ve ever received from anyone.

Four days of that week passed before I realize that our date was going to be on Valentine’s Day.  It seems silly looking back that it made me extra nervous about our date.  But it did. We discussed keeping the date simple.  He would make dinner at his place and I would bring a movie.  He teased me that I had to pass muster with his housemate’s dog, Chiquita. We hadn’t discussed what to do about the arrival of Cupid.

I decided not to scare him by brining roses or chocolates, but simply bought a bunch of flowers and a vase to adorn the dinner table.  We finally e-mailed about Heart Day a little and he told me if I was good Chiquita approved, he would let me be his Valentine.

Well, needless to say, it was a lovely dinner.  He made Chicken Provencal with vegetables and couscous, and a lovely salad.  We had strawberries for dessert with Nutella and watched the movie, Vertical Ray of the Sun.  We decided to continue dating and that we would keep our hands off one another for at least three weeks.  So much for the stereotypes, eh?

The rest is, as they say, history. It’s been four years and we’ve had lots of adventures including an amazing wedding over two years ago from the  and then another simpler wedding a year later, but in Canada where it is bona fide legal on paper.  But, alas I’m meandering….back to V-Day.

Unfortunately, this year, he’s been working a night shift and so we won’t get to spend Valentine’s Day together.  For the last few weeks, I’ve been hiding those little chalky candy hearts with the little sayings printed on them so he finds them when he gets home or goes off to work.  Some around the house, a few in his car. I made reservations at one of our favorite restaurants and bought him a little card and put the last candy heart into it.  As I told him in the card, I hope the little trail of hearts leads to as much joy and happiness the next four years as it has in the previous four.

If you ever read this crazy stuff sweetheart, I mean it.  🙂 

So, tonight, I arrived home and on the piano is a vase we received as a wedding present that’s never been filled with flowers.  In fact, we were just talking about it a couple of days ago.  Well, tonight was his turn.  After surprising me with flowers at work a few days ago, once again a vase, the wedding present vase, has surprisingly appeared filled with flowers; this time on top of our piano. The vase has a dozen pink roses and is holding down a little pink envelope and card just for me.  Isn’t love sweet?

Hope your heart day is as happy as mine….

Tagged with: , ,