20120611
To Do: Cook Beans!
For anyone who thinks that going vegan is expensive... totally not the case.If you are vegan and don't already own one, or if you're considering going vegan and have no idea where to start, investment #1 should be a pressure cooker. Not very many people (in Canada?) own one, but they're soooo common in India, and I've got my indian friends to thank for turning me on to mine.
You can buy massive dried bags of lentils of various colours (dal), kidney beans (rajma), chick peas (chana), or black beans for next to nothing. Compare the contents of one bag ($4 maybe?) to the same mass of beans in 20 (?) cans of water for >= $1 each!
And due to the simple equation from high school that most have forgotten, PV=nRT [1], you can cook dried gram at a much lower temperature if the pressure is increased (V, n, & R are held constant). This saves on electricity (or gas as the case may be). I'll be the first to admit, I used to cook dried beans like a complete idiot and soak them overnight, and then boil them for 5 hours or something. With a pressure cooker, there is no need to soak legumes overnight and cooking them takes about 1 hr. Most importantly, it completely seals in the flavour for whatever meal you have planned: burritos (like me), kaali, masoor, or tadka dal - or good, old-fashioned soups (e.g. lentil, split-pea)!
A nice side effect: dried legumes take far less energy to transport than cans of legumes that are 60% salt and water; you're going green [2]!
Naturally, not everyone has the proper body chemistry to be able to go vegan with great success, but here is one attractive figure that might catch your eye:
Marathon runners should consume about 1.5 grams of protein per kg of body weight per day [3].
For a 180 pound guy like me (~80kg according to Google's conversion), that's about 50g of chick peas. What is that for a total protein bill per day - about 25¢ ??
Not bad at all :)
[1] The Ideal Gas Law (Influences amazing things! E.g. how fast a pot of water takes to boil)
[2] Vegetarian Diets Help Protect the Environment
(As if you didn't already know how green a vegan diet is!!)
[3] Sources of Protein for Runners: Spring Marathon Training Plan Part 5
Labels:
beans,
environment,
green,
health,
vegan
Location:
Burlington, ON, Canada
20111216
20111129
Two Thumbs Up to Koush
I just installed & tweeked Koush's Cyanogen Mod 9 alpha 11 for my Nexus S running Ice Cream Sandwich from AOSP. You can read his original message on the XDA forums.
For an engineering build it's running quite smoothly. I'm certainly looking forward to mirroring his git and building a userdebug variant. Typically this speeds up most aspects of the UI and other software since debug messages are less frequent.
A few pointers:
For an engineering build it's running quite smoothly. I'm certainly looking forward to mirroring his git and building a userdebug variant. Typically this speeds up most aspects of the UI and other software since debug messages are less frequent.
A few pointers:
- If you feel that the boot animation is continuing infinitely, you probably forgot to erase the data partition (I did, originally)
- If you like Google Car Home, which is a great home-replacement while driving, then install it manually from a backed-up apk and install the 3rd party Car Mode Control app. The original google car home will install, but it is claimed not to work with ICS and does not show up in the launcher so there is no way to use it unless Car Mode Control is installed.
- If you encounter "Unfortunately, Google TTS Engine has stopped" Select PicoTTS to get Navigation and My Tracks to work.
Labels:
android,
armv7a,
ice cream sandwich,
linux,
nexus s
20111111
An Update
Just to dispel any confusion that might arise if people google me to dig up 'dirt'.
Yes, I am in fact single again. Yes, there may be photos of me & my ex floating around on the interwebs that seem to be very recent - and they are! I only did become single again recently, and it was a bit sudden for me too!
So is life, however, and it does go on, as they say.
It's actually really surprising how little I'm blogging these days, with the major shift changing from blogging to micro-blogging via Twitter, FaceBook, and Google+ . Sorry if I haven't been terribly vocal.
Just thought I would post an update.
Ciao!
C
Yes, I am in fact single again. Yes, there may be photos of me & my ex floating around on the interwebs that seem to be very recent - and they are! I only did become single again recently, and it was a bit sudden for me too!
So is life, however, and it does go on, as they say.
It's actually really surprising how little I'm blogging these days, with the major shift changing from blogging to micro-blogging via Twitter, FaceBook, and Google+ . Sorry if I haven't been terribly vocal.
Just thought I would post an update.
Ciao!
C
20110831
Google Nexus S Android Phone Suffers USB Death
Today I am a very lucky guy, in spite of the fact that the USB OTG functionality on my Google Nexus S has just vanished. Why does that make me lucky? Well, it doesn't, but luckily I had ordered a second Nexus S that works properly with Canadian HSDPA frequencies on the Rogers network, and it arrived literally the same second that my old Nexus S stopped working. Total coincidence... I think.
Actually, I should be more specific - nothing on the old phone has stopped working except for the USB OTG controller. So when I plug my in my phone to my workstation, I receive "unable to enumerate device on port... " under Linux and "USB Device Not Recognized" under Windows 7. In layman's terms, my phone no longer works as a USB disk.
Being a clever hacker, I managed to get the dmesg output on my Nexus S, which I hope will be of some use for people at either Google or Samsung. The source code for the Nexus S (codenamed crespo) is available, so I might look into it further some time later.
In reference to the dmesg output below,
"The FSA9480 chip is used on some Samsung phones to detect various accessories using sensing resistors on the ID pin of the USB port." [1]
It's likely an authentication chip - there are several vendors that provide something similar. The datasheet is only available under NDA of course. Naturally, I've tried several cables, and several different workstations, to no avail. There are many layers of software and electronics at work (or rather not at work) here, so without some chip documentation / resources, there's not really a way that I can debug this just using the source code of the Linux driver.
But just to clarify - anytime an 'err -6' appears, that corresponds to with -ENXIO "No such device or address", and anytime 'err -5' appears, it corresponds to -EIO "I/O error", so the outlook is not good. It's likely that the chip in question had a bad solder joint and is not powering up with the rest of the phone, or it experienced a "massive" current spike from my laptop that it couldn't handle.
I believe my device is still under warranty though, so I'll certainly be shipping it back for repair soon.
The strangest part of this whole thing is that I've kept my phone in pristine condition, which (sadly) suggests that the design quality of this Nexus S was lacking, in spite of what Google has said in various marketing videos. It could also be Fairchild's fault, if in fact it turned out to be an ESD issue. Anything that's connected on the USB should be able to handle 'typical' levels of ESD from a PC's USB pins.
[ 2066.560942] fsa9480 7-0025: dev1: 0x0, dev2: 0x0
[ 2068.234132] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.362855] fsa9480 7-0025: fsa9480_irq_thread: err -6
[ 2068.363813] fsa9480 7-0025: fsa9480_detect_dev: err -6
[ 2068.363919] fsa9480 7-0025: dev1: 0xfa, dev2: 0xff
[ 2068.374642] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2068.377227] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.377957] i2c i2c-7: sendbytes: NAK bailout.
[ 2068.378051] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2068.379090] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2068.975317] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.977052] fsa9480 7-0025: dev1: 0x1f, dev2: 0xff
[ 2068.978903] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2068.991221] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.992016] i2c i2c-7: sendbytes: NAK bailout.
[ 2068.992109] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2068.993178] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2068.994968] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.003127] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.004982] fsa9480 7-0025: dev1: 0x10, dev2: 0x3
[ 2069.006708] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.008463] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.009962] i2c i2c-7: sendbytes: NAK bailout.
[ 2069.010054] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2069.010498] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.012253] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.014000] fsa9480 7-0025: dev1: 0x10, dev2: 0x1f
[ 2069.015793] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.035247] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.037069] fsa9480 7-0025: dev1: 0xff, dev2: 0xff
[ 2069.038796] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.041289] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.043017] fsa9480 7-0025: dev1: 0x10, dev2: 0xff
[ 2069.044765] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.048313] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.050040] fsa9480 7-0025: dev1: 0x17, dev2: 0xff
[ 2069.051853] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.060308] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.062035] fsa9480 7-0025: dev1: 0x13, dev2: 0xff
[ 2069.063858] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.067409] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.068963] i2c i2c-7: sendbytes: NAK bailout.
[ 2069.069124] fsa9480 7-0025: fsa9480_detect_dev: err -5
[ 2069.069209] fsa9480 7-0025: dev1: 0xfb, dev2: 0xff
[ 2069.070971] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.091186] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.092983] fsa9480 7-0025: dev1: 0x10, dev2: 0x3
[ 2069.094731] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2069.104292] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2069.105018] i2c i2c-7: sendbytes: NAK bailout.
[ 2069.105108] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2069.106102] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.150280] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2070.152079] fsa9480 7-0025: dev1: 0xff, dev2: 0xff
[ 2070.153836] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.166528] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2070.167026] i2c i2c-7: sendbytes: NAK bailout.
[ 2070.167188] fsa9480 7-0025: fsa9480_reg_init: err -5
[ 2070.168389] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.192257] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[ 2070.193986] fsa9480 7-0025: dev1: 0x10, dev2: 0x1
[ 2070.195786] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
...
[ 2070.210682] fsa9480 7-0025: dev1: 0x10, dev2: 0x0
[1] http://electronics.stackexchange.com/questions/13041/how-do-i-make-the-fairchild-fsa9280-fsa9480-fsa880-boot-pin-trigger-samsung-gal
20110829
UNetbootin on Mac OS X
Just in case anyone wants to use UNetbootin to create e.g. an Ubuntu Live USB device and it isn't working, there are two key steps that are not performed by the UNetbootin binary for OS X.
After downloading the ISO, use Disk Utility to partition your USB device. Ensure that you've selected Options -> MBR . After formatting the disk...
1) Ensure that you've marked the partition active
2) Download syslinux and write the critical mbr binary your device.
After downloading the ISO, use Disk Utility to partition your USB device. Ensure that you've selected Options -> MBR . After formatting the disk...
1) Ensure that you've marked the partition active
fdisk -e /dev/rdisk1
f 1
write
exit2) Download syslinux and write the critical mbr binary your device.
dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/rdisk1
After that, just use UNetbootin as usual.20110803
OMAP3 SGX EGL Drivers Add Wayland Support
Just in case anyone was wondering this is a pretty big deal. Imagination Technologies, whose 3D graphics cores drive most mobile displays, has announced support for the EGL_KHR_Image_Pixmap extensions used by the Wayland display server protocol.
For those who haven't been following, Wayland has gained a lot of momentum as a non-X-based window compositor for Linux-based operating systems. Wayland facilitates client-side rendering, similar to the Quartz compositor used in Mac OS X. It has since been adopted by Meego and Ubuntu as their preferred compositing backend.
The stated goal of Wayland is to provide a user experience where "every frame is perfect". This is a rather necessary and long overdue improvement since traditional Linux desktops based on the aging X11 display server tended to suffer from artifacts such as tearing, visible redrawing, and flickering. However, Wayland retains the capabilities to encapsulate the traditional rootless X server for legacy applications. Wayland rendering targets already exist for popular toolkits such as GTK+ and QT among others.
Check out the video below for a (slightly older) demo.
For those who haven't been following, Wayland has gained a lot of momentum as a non-X-based window compositor for Linux-based operating systems. Wayland facilitates client-side rendering, similar to the Quartz compositor used in Mac OS X. It has since been adopted by Meego and Ubuntu as their preferred compositing backend.
The stated goal of Wayland is to provide a user experience where "every frame is perfect". This is a rather necessary and long overdue improvement since traditional Linux desktops based on the aging X11 display server tended to suffer from artifacts such as tearing, visible redrawing, and flickering. However, Wayland retains the capabilities to encapsulate the traditional rootless X server for legacy applications. Wayland rendering targets already exist for popular toolkits such as GTK+ and QT among others.
Check out the video below for a (slightly older) demo.
Today, Wayland support exists for graphics chipsets from Intel, AMD, NVIDIA (nouveau) and SGX (OMAP3) platforms. OMAP4 support probably isn't far off.
I guess it's time to fire up the old BeagleBoard ;-) Incidentally, happy birthday!
Labels:
BeagleBoard,
imagination technologies,
linux,
omap,
sgx,
texas instruments,
wayland
20110726
Canon Printer Drivers under Mac OS X
For my regular readers, please disregard this post. I'm merely using this blog post as a conglomerate location for my bug and other similar bugs that are occurring with Canon Printer drivers on Mac OS X.
Here is a list of URL's describing exactly the same issue:
https://discussions.apple.com/message/15218891#15218891
https://discussions.apple.com/message/15086171#15086171
https://discussions.apple.com/message/12138167#12138167
https://discussions.apple.com/message/12577853#12577853
https://discussions.apple.com/message/12777003#12777003
https://discussions.apple.com/message/12423314#12423314
https://discussions.apple.com/message/13276113#13276113
https://discussions.apple.com/message/15015078#15015078
I have tried every variant of UFR2 driver available from version 1.60 to version 2.25 and none of them work.
Here is a list of URL's describing exactly the same issue:
https://discussions.apple.com/message/15218891#15218891
https://discussions.apple.com/message/15086171#15086171
https://discussions.apple.com/message/12138167#12138167
https://discussions.apple.com/message/12577853#12577853
https://discussions.apple.com/message/12777003#12777003
https://discussions.apple.com/message/12423314#12423314
https://discussions.apple.com/message/13276113#13276113
https://discussions.apple.com/message/15015078#15015078
I have tried every variant of UFR2 driver available from version 1.60 to version 2.25 and none of them work.
20110706
Parc Oka for the Canada Day Long Weekend
We went on a bike & camping trip to Parc Oka for the weekend and documented the trip with some photos.
Originally we were supposed to take a train to and from Deux Montagnes, which would have made this trip very easy, but the AMT had some unannounced line work. So Erin threw together some last minute improvisational plans and the "to" portion of our trip included a horrific STM then CIT commuting.
We ended up biking from St. Eustache, which was only about 5 km further. Taking the AMT from Deux Montagnes on the way back was much more accommodating for our bikes, and our bike-seats and Croozer full of camping gear / 3yo child.
I also traced our trip using MyTracks for Android, and it worked quite well. Considering how much I'm on my bike, MyTracks is practically like a personal trainer given that it records all of the stats you can imagine (latitude, longitude, bearing, speed, elevation, time, etc).
It was the perfect weekend to get away, and Parc Oka was awesome. The water provided an excellent escape from the heat that weekend.
Originally we were supposed to take a train to and from Deux Montagnes, which would have made this trip very easy, but the AMT had some unannounced line work. So Erin threw together some last minute improvisational plans and the "to" portion of our trip included a horrific STM then CIT commuting.
We ended up biking from St. Eustache, which was only about 5 km further. Taking the AMT from Deux Montagnes on the way back was much more accommodating for our bikes, and our bike-seats and Croozer full of camping gear / 3yo child.
I also traced our trip using MyTracks for Android, and it worked quite well. Considering how much I'm on my bike, MyTracks is practically like a personal trainer given that it records all of the stats you can imagine (latitude, longitude, bearing, speed, elevation, time, etc).
It was the perfect weekend to get away, and Parc Oka was awesome. The water provided an excellent escape from the heat that weekend.
Subscribe to:
Posts (Atom)
