Skip to content


Kitten Sitter

Gigi (giselle) the tortoiseshell cat that adopted us a few months ago delivered her load of 4 beautiful kittens a few days ago. She came inside, called out for my wife Pia. When Pia did not reply, she searched for her and climbed on to her lap. After a couple of minutes, Pia was feeling the cat’s belly as we were noticing some movements there the last few days, and she noticed something was starting to ooze out of her.
We took her outside, put her on a mat and witnessed as she started to deliver the little ones. We shamelessly videoed the whole event (that I’m not going to publish). The kittens have different colors (as expected). And Gigi is taking good care of them.

Gigi and kittens

Now you should know that cat have different temperaments and attitudes. Some are vocal and very talkative (like our Garo). Others are shy and reserved. Others are aloof, etc..
Gigi is like nothing I have seen before. She is clearly the strongest of the bunch as all the other cats in the neighborhood (males and females alike) move out of her way and step back when she hisses at them. And her hiss is barely noticeable. She’s very calm and steady. On the other hand she’s very warm with people. She will rub on anyone’s feet. Will not balk away if you try to pet her. And will gladly climb into any welcoming lap. She doesn’t vocalize much and before she gave birth we rarely heard her voice except for the casual “beep” (half a “beep-beep”) if someone steps on her tail because she’s always laying behind our feet when we’re in the kitchen!
Now Gigi is not litter trained. Mainly because she takes care of business (and sleeps) outside. But since the kittens came, we decided to keep them inside (closed porch). Gigi is happy with the arrangement since she doesn’t have to fend for her litter. Garo comes in for feeding on that same porch a couple of times every day, but he’s a pushover and she doesn’t worry about him much. We even closed the small opening he used to enter, so he now stands outside and yells for someone to open for him. So, when Gigi wants to eliminate, she has to go outside. She could simply leave, but we noticed that before leaving she comes looking for us. Every single time, before going outside, she comes looking for either one of us and starts taking loudly. We know we have to do something because she never speaks otherwise, and she’s never loud! When we follow her to the porch and stand next to the kittens, she rubs her head on our feet once and then steps out. She makes sure that the kittens are asleep before she leaves. And she only stays out for a few minutes each time. She trusts us to handle the kittens: no hissing or any sort of complaint when we do that, but she licks them thouroughly after we put them back. So I’m guessing that she wants us to kittensit for her while she’s away! Have you ever seen such a behaviour?

Update: after exactly 7 days, gigi was very vocal again. She was going out more and after a few trips, she came back and started taking her kittens one by one to hide them in the bush across the street. Pia was not too happy with that.

Another update: Xena came back after 2 days of absence. She delivered her litter somewhere in the neighbourhood. She is coming to feed more often now and is back to her playful and hyperactive self.

Yet another update: it’s been about a week since we noticed Xena’s delivery. She was very noisy today, even more than usual. And she was exploring the house. At about 6pm, I was taking a nap when I heard a scream. Pia was screaming (joyfully as I learned later) because Xena was carrying one of her kittens in her mouth and she took it straight into our living room. She went though the whole ritual 5 times (telling us she was going, drinking some water our milk, then going to get a kitten). I’m writing this update now sitting on the floor next to them. She is tired, but purring loudly. And the 5 are taking turns at feeding. bliss…

Posted in Blogging, Cat.

Tagged with , , , .


Easy Mail Sender Authentication Using SPF

There are different wayt to authenticate emails as being legit. One of the easiest to implement is SPF.

Basically what you need to do is add an SPF record to your domain’s DNS zone. But since most DNS control panels do not have this record, you can simply add it as a TXT record.
The OpenSPF site provides the syntax used to identify the resources on your network or otherwise that are allowed to send email on behalf of your domain. But I always find it easier to use a simple form to generate that record. Below are a few helpful sites that offer such a form/wizard:

I know GMail checks the SPF records. Yahoo Mail prefer DKIM. For more info about DKIM and setting that up check this old post by Brandon Checketts.

Posted in Work.

Tagged with , , , , , .


Match SSL Certificate to Key and CSR

Renewing an SSL certificate is usually straight forward. But sometimes you’re not sure which CSR to use. Or if you need to generate a new CSR, which SSL key. Here are the commands I use to verify the certificate related files:

  1. openssl x509 -noout -modulus -in mydomain.crt | openssl md5
  2. openssl rsa -noout -modulus -in mydomain.key | openssl md5
  3. openssl req -noout -modulus -in mydomain.csr | openssl md5

The MD5 hash should match.
You could use a bash script to search a directory for a specific MD5 hash. For example:

  1. for f in $(ls $SOMEDIR); do echo $f; openssl x509 -noout -modulus -in $SOMEDIR$f | openssl md5 | grep "MYMD5HASH"; done

I guess the above could use some work :)

for the CLI-phobics check out this certificate key matcher

Posted in Tools.

Tagged with , , , , .


Feral Felines

There’s always been plenty of cats in our neighborhood. And they all stroll up and down the same trail facing my office window almost daily when the sun is up. But recently they decided to come closer and into our lives. Continued…

Posted in Blogging, Cat, Mood, Pets.

Tagged with , .


Apache Reverse Proxy + SSH Reverse Tunnel

Disclaimer: This setup is just a bit crazy, and I wouldn’t recommend it for a production site. Works for me.
I needed to allow some clients to test a web app I’m working on. But I didn’t want to deploy the code to a server for now for different reasons (mainly memory constraints). So the solution was to setup a reverse proxy using apache to my local machine. Check out the code after the break Continued…

Posted in Tools, Work.

Tagged with , , , , , , .


Suspend Ubuntu Desktop

Simple command line: pm-suspend
An interesting alternative would be: pm-suspend-hybrid

Continued…

Posted in Tools.

Tagged with , , , , , , , , .


Quick SSH Tunnel using Putty

Two easy steps to create a tunnel from a remote server port to your localhost. It’s handy if you’re trying to connect to a mysql, jboss, etc. installation bound to localhost only (for better security. Check out the screenshots after the break Continued…

Posted in Tools, Work.

Tagged with , , , , , , .


Django Class-Based Generic Views

After working with Paypouy on a quick project using the php-based, shared-hosting-friendly CodeIgniter, I’m back to the more familiar waters of Python/Django.

I was asked to create a small organizer/calendar type app for a client to be used mainly from a smart phone. The app seemed very straight forward, so I thought I’d rely on the generic views for most of the work.

Check out some of the code after the break Continued…

Posted in Blogging, Coding, Work.

Tagged with , , , , , .


Safely Rebooting RimuHosting VPS (via API)

First, get the API keys from the control panel at https://rimuhosting.com/cp/apikeys.jsp
API Keys page

The documentation for the API can be found here

So to reboot, I use the following script:

  1. #!/bin/bash
  2. APIKEY=00000000000000000000000000
  3. VPSOID=0000000
  4. VPSNAME=whatever
  5. curl -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: rimuhosting apikey=$APIKEY" -X PUT -d ‘{"reboot_request": {"running_state": "RESTARTING"}}’ https://rimuhosting.com/r/orders/order-$VPSOID-$VPSNAME/vps/running-state

That seems to be much safer than running: sudo reboot

Posted in Tools, Work.


Using ePubLib for Android

I’m rewriting the Examine the Scriptures Daily android app. With the ESD files published as ePub files it’s easier to get the data now, and it will allow more languages to be supported without the hassle of converting from WTLib.

Here’s the code snippet I’m using to read the ePub book. The library I’m using is ePubLib, and I’m displaying the page in a standard WebView:

  1.    // Load the book and get a specific date
  2.     AssetManager assetManager = getAssets();
  3.     try {
  4.         // find InputStream for book
  5.         InputStream epubInputStream = assetManager.open("es12_E.epub");
  6.         // Load Book from inputStream
  7.         this.book = (new EpubReader()).readEpub(epubInputStream);
  8.         getSpecificdate("2012-12-1");
  9.     } catch (IOException e) {
  10.         Log.e("epublib", e.getMessage());
  11.     }
  12.  
  13.     private void getSpecificdate(String day) {
  14.         Date d;
  15.         int dayOfMonth;
  16.         int monthOfYear;
  17.         Calendar cal = Calendar.getInstance();
  18.         try {
  19.             d = dateFormat.parse(day);
  20.             cal.setTime(d);
  21.             String hrefDate = hrefFormat.format(d).toUpperCase();
  22.             dayOfMonth=cal.get(Calendar.DAY_OF_MONTH);
  23.             monthOfYear=cal.get(Calendar.MONTH);
  24.             hrefDate += (dayOfMonth==1) ? ".xhtml" : "-split"+dayOfMonth+".xhtml";
  25.             hrefDate = dblzero.format(monthOfYear+4)+hrefDate.substring(2);
  26.            
  27.             // Here’s the part you’re looking for
  28.             Resource r = this.book.getResources().getByHref(hrefDate);
  29.             WebView wv = (WebView) findViewById(R.id.webView1);
  30.             String data = new String( r.getData() );
  31.             wv.loadDataWithBaseURL("file:///android_asset/", data, "text/html", "utf-8", null);
  32.         } catch (ParseException e) {
  33.             e.printStackTrace();
  34.         }
  35.        
  36.     }

Posted in Coding.

Tagged with , , , , , , .