RandomSequence

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, July 20, 2013

Fast Diet - Incredible Body Hack

Posted on 1:38 AM by Unknown
In terms of body hacks, the Fast Diet probably ranks all the way at the top for me.

I first read about it in the papers and found the technique rather intriguing. Could something that simple actually work? Besides the book, it didn't really have anything fancy to sell. No secret formula, patent-pending ingredient, celebrity endorsement etc.

A few weeks later, at a whim, I started to try the diet on myself. At this point, I have not read the book yet. I just started restricting my diet two days a week to 600 calories. And I wasn't too particular with counting the calories either. I simply looked it up on the smartphone and kept a rough count through the day. Sometimes I prepared the food specifically for myself. Other times, I simply ate a smaller portion of whatever the wife had cooked. One or twice, I actually broke fast midday as unexpected commitments cropped up.

I also wasn't particularly keeping a keen eye on my weight during this time. Ironically, I didn't really think the diet would work. It just seems too free-and-easy. Not enough suffering! Then about 8 weeks later, I weighed myself in the bathroom and found that I had lost 6kg. To say I was surprised was an understatement! I started weighing myself more regularly from then on, now out of curiosity then anything. I found myself steadily losing weight at a rate of about 0.5kg per week. Another 8 weeks on, I have lost another 3kg or so. I haven't seen this weight for a long long time, not since my university days!

And I was still eating all my usual junk on the off days: cakes, chips, chocolate, fries, fizzy drinks. Nothing "health conscious" has crept into my mindset so far that I was deliberately avoiding them. I was just eating normally as before.

I did pick up the book to see if I coud learn anything new, but I didn't. I am quite familiar with scientific studies of how severe calorie restriction can prolong life, but most of us can't live that way. Even ADF (Alternate Day Fasting) seems too harsh to me. I think the breakthrough for the book is to introduce the idea that even a moderate amount of fasting will do us plenty of good. Other than that, I am not sure one has to read the book in order to get started on the diet. I don't even find the recipes in the book particularly useful. As I mentioned, I did quite alright with eating whatever my wife cooks, but in smaller quantities.

The book did mention that once you reach the desired weight, you can go into "maintenance mode" and reduce the fasting to once a week. For me, I plan to carry on fasting twice a week just to see how far this diet can hack my body weight. I am pretty sure my weight will stabilize at a certain point and will not reduce indefinitely! I will blog about my progress in times to come.
Read More
Posted in fastdiet | No comments

Friday, July 19, 2013

ComboFix - Malware Removal Tool

Posted on 6:58 AM by Unknown
Again, I am writing this down more for my own future reference, with the hope that it will benefit others Googling for this info as well.

ComboFix is a relatively unknown but surprisingly good anti-malware tool. I had in the past received a number of computers from relatives/friends that have been infected with malware. The general characteristics are that the machines boots OK into Windows, but runs erratically eg. displays fake error messages, prevents you from running certain executables, logs you off after awhile etc.

In my experience, it was impossible to get the existing antivirus software to perform a proper scan, or to install a new antivirus software because the system ran so erratically. Offline antivirus software that runs off a CD didn't help much either. I have a collection of them and none of them had helped on the computers I was trying to fix.

Enter ComboFix, which was able to get the computers back into good enough working condition so that I can reinstall the antivirus software and perform a proper scan. I am not sure what's the exact magic behind the program. It seems to "implement a collection of pre-made fixes for large amount of known malware and hunts down all files associated with it". Sounds good to me!

Windows Repair (All In One) is also helpful after running ComboFix. Some malware messes up all kinds of stuff, and functions like "Set Windows Services To Default Startup" is invaluable for straightening the system.

Of course, some people will tell you it's best to wipe the machine when it has been compromised. From a technical point of view, I would totally agree and will do it with my own machines. But in the real world with real people, that's not always the ideal solution for them. So I am glad ComboFix and Windows Repair AIO has enabled me to help some people along the way.
Read More
Posted in antivirus, windows | No comments

Monday, July 1, 2013

Do not upgrade to CM10.1 if you use Bluetooth A2DP extensively

Posted on 3:53 PM by Unknown
I flashed my Nexus S to CM10.1 recently and found that the A2DP streaming stutters so badly to the point of being unusable. Some googling reveals that from Android 4.1 to 4.2, Google swapped the Bluez stack that was used in Android since 2.x and replaced it with a stack contributed by Broadcom. This replacement has apparently created more issues than it has solved.

Anyway, I am back to CM10 (based on Android 4.1.2 with the Bluez stack), and all is well again. So if you use A2DP as much as I do (I listen to podcasts, 1~2 hours a day), you have been warned!
Read More
Posted in a2dp, android, bluetooth | No comments

Tuesday, June 18, 2013

Samba Server on Android Media Player

Posted on 12:57 AM by Unknown
I recently bought an Android-based media player: the Minix Neo X5. It came with the original firmware, which had issues playing the MTS video files that my digital camera produces, so I promptly upgrade to the latest ver 011 of the firmware. That solved the MTS playback issue, but the firmware itself was not very stable and hang quite frequently. So I promptly installed Clockmod Recovery, followed by the CWM version of Finless V1.2b. Now everything is fast and stable!

Next, I needed an SMB server on the media player so that I can manage its content from other PCs in the house. Surprisingly this turned out to be harder than I thought given the hackish nature of Android.

SambaDroid was quite easy to install and work with. Unfortunately, it does not support files > 2GB in size. This is quite a major limitation given than many media files these days are > 2GB in size.

Samba Server turned out to be a dud. Despite having root access, I couldn't set it up so that it is accessible by other Windows PCs. I even performed some registry hacks to enable legacy NTLM without any success.

I had partial success with Samba Filesharing (V1.0.6) and it supports files > 2GB, but I could only get it to work occasionally after a lot of coxing. Turns out it does not yet support Jelly Bean, so the app crashes the other 99% of the time, even with the samba-rc hack.

With no other candidates to try, I tried hacking into Samba Filesharing to see if I can make it work better with JB. Armed with adb shell,  I found that the Android version of smbd and nmbd are found under /data/data/com.funkyfresh.samba/files and can be started by running:

> sh ./samba-rc restart

But the app itself interfered with the operation of the daemons. Perhaps it is trying to control them and ended up crashing/killing the daemons. Anyway, the conclusion is that there is a fully working version of Samba included with the app. It's the app itself that is incompatible with JB. The app is a wrapper that receives events so that it can start smbd and nmbd when the network is up, and kill the daemons upon user request or when the network goes down.

So what I ended doing was:

1. Install and configure Samba Filesharing. This properly configures samba-rc and smb.conf.

2. Perform adb pull /data/data/com.funkyfresh.samba/files. Then update samba-rc by adding a single line.

3. Uninstall Samba Filesharing. This gets rid of the app itself so that it does not interfere with the daemons.

4. Manually create /data/data/com.funkyfresh.samba/files via adb shell.

5. Zip up the files and upload via adb push. The zipping is necessary because adb push can only handle individual files. Then adb shell and unzip.

6. Perform chmod 0777 samba-rc smbd nmbd.

Then I try to manually execute sh ./samba-rc restart. This started the smbd and nmbd daemons and I was able to connect to the shares from another machine.

Now this left the problem of running the script when the machine starts up, after the network interface is brought up. The simplest way I found was to use Script Manager. There are probably other ways (eg. via DHCP hooks), but I am lazy and went with the simplest method that worked.

I am sure Samba Filesharing will eventually be updated to support JB fully. There is a very active thread here on xda-developers for this purpose. But in the mean time, if Samba Filesharing does not work directly on your device yet, I hope my experience here is of some help to get it working on yours.
Read More
Posted in android | No comments

Monday, June 17, 2013

General (lossy) method for normalizing volume of any video file

Posted on 9:56 PM by Unknown
I have an MKV video file (H264 video, AC3 audio) whose volume I need to normalize. Unfortunately, there doesn't seem to be any lossless way of normalizing the AC3 audio track. So I found out the general (lossy) way of normalizing the audio track of any video file is:

> ffmpeg -i input.mkv -vol nnn -vcodec copy output.mkv

nnn = 256 (no change)
nnn = 128 (half the volume)
nnn = 512 (double the volume)
etc.

This should work for any video file format that ffmpeg recognizes.

In addition, I can use the -map commands to remove any unwanted subtitles.

> ffmpeg -i input.mkv -map 0:0 -map 0:1 -ac 2 -vol nnn -vcodec copy output.mkv

This tells ffmpeg to only include track 0 (video) and 1 (audio) in the output file and ignore the rest.
Read More
Posted in video | No comments

Sunday, December 16, 2012

Adding "Stereo Mixer" to Windows 7 with Conexant sound card

Posted on 4:16 AM by Unknown
This procedure worked for my laptop (Thinkpad E530) with a Conexant 20671 sound card, but I suspect it will work for other sound cards in the Conexant family.

I was playing with CamStudio to do a video capture of a Flash-based cartoon so that I can put it on the WDTV media player and play it on the big screen in the living room for my kids. The video capture worked brilliantly, but to do a sound capture, I needed to do some hacking.

Apparently, there was this recording device called "Stereo Mixer" that was pretty standard in the Windows XP days. This allowed you to capture whatever was played to the speaker in all its digital glory. Then under pressure from various organizations on the dark side of the force, Microsoft and soundcard makers starting disabling this wonderful feature from Windows Vista onwards.

So after much Googling around, I found out that for most sound cards, the hardware feature is still there, just not enabled on the software side. Unfortunately, to enable the "Stereo Mixer" feature is not as simple as ticking a checkbox. The procedure is frequently complicated and is different for various soundcard chipset families.

Luckily, for the Conexant sound card on my laptop, the procedure to enable the stereo mixer feature was comparatively straightforward.

First, right-click on the "Sound" icon in the system tray and select "Recording devices":

 

Then right-click on the whitespace and select "Show Disabled Devices":


Make sure you don't see a "Stereo Mix" device that was previously hidden.

Now, you need to add some entries to the registry. Create a ".reg" file with a text editor with the following content:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\Settings\EPattributes\EpSettings\StereoMixEnable]
"Enable"=hex:01
"MixAssocSeq"=hex:e0,e0
"MuteGainSettings"=hex:00,00


Double-click on the .reg file and enter it into the registry. Verify by firing up "regedit".


This enters the "StereoMixEnable" values under "HKLM\System\CurrentControlSet". You also need to enter this into all "ControlSet00x" subtrees under "HKLM\System". So for example, since I have "ControlSet001" and "ControlSet002" under "HKLM\System" on my machine, I edit the .reg file to:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\
ControlSet001\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\Settings\EPattributes\EpSettings\StereoMixEnable]
"Enable"=hex:01
"MixAssocSeq"=hex:e0,e0
"MuteGainSettings"=hex:00,00


and double-click to enter it into the registry. I repeat for "ControlSet002".

Now reboot the machine. Then follow the previous steps to bring up the recording devices. If all goes well, you should now see a new, disabled "Stereo Mix" device in the list.

Right-click on the device and select "Enable":


Then set it to the default device by highlighting it, and selecting "Set Default".


Now, under CamStudio, I select "Options, Record audio from microphone". Since the default recording device is now "Stereo Mix", anything that is played through the speaker is now piped through to CamStudio for recording.

Mission accomplished!
Read More
Posted in windows | No comments

Sunday, December 2, 2012

Using Google Dashboard to manage your Android device backup

Posted on 5:23 AM by Unknown
I used to use AppBrain/Fast Web Install to keep track of which apps I have installed on my phone, and to make it easier to reinstall those apps when the phone gets wiped or replaced. But AppBrain had been going down the tubes, and Fast Web Install had always been a hit-and-miss affair.

Android's own "backup to the cloud" system had previously been even more unusable. There isn't a place where you can see what has been backed up. And when you setup a new phone with your Google account, you just have to wait and pray that your favorite apps will be restored to the phone. Typically all the stars have to be aligned just right for this to happen. More often than not, after waiting for an hour or so and nothing happens, you just curse under your breath and proceed to install your favorites apps manually via the Play Store.

But I just looked again recently and was pleasantly surprised that things are much more civilized now. Firstly there is a place now where you can look at all the apps that are backed up. It's called the Google Dashboard. This is where you can find out almost all the information Google stores on your behalf across its wide range of services, including Contacts, Calendar, Docs, Gmail, Google+ etc.

If this is the first time you are visiting Google Dashboard, you will be shocked how much Google knows about you. If you are not (and you own an Android smartphone with location history turned on), then you should definitely take a look at "Google Location History" (under "Latitude"). Even my wife doesn't know that much about me!

Anyway, under "Play Store", you should see an "Installed Applications" link.


Click on that link and you will be brought to a page that shows 1) the apps currently installed on your devices 2) all the apps you have ever installed on your devices


You can quite comfortably manage your entire app library from the web browser, including install/update/delete apps. The only thing missing is probably batch install, which I hope will be added later. But if you choose multiple apps for installation, the system is smart enough to install the apps sequentially so as not to max out the device CPU and storage I/O.

Note that this only tackles app backup. App settings will only be backed up if the app explicitly built it into its code. You can check which apps backup their settings to Google's cloud by looking under "Android devices, More data stored about this device".



Not sure why this information is provided on a separate page. It would have been more intuitive if this was integrated into the "Play Store" page IMHO.

Nevertheless, this is a major improvement compared to what we had previously. All the details about the backup on each device are displayed, and managing apps from the page works very robustly from my testing (compared to Fast Web Install). All we need now is batch install function. Google, are you listening?
Read More
Posted in android | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 110GB+ worth of photos/videos on a microSD memory card #2
    In my previous post, I talked about wanting to write a script to see how far I can squeeze 110GB worth of media (photos and videos). I wrote...
  • Looking for the perfect car MP3 player/FM transmitter
    I have bought quite a number of car MP3 player/FM transmitters from DealExtreme and other similar websites. A car MP3 player/FM transmitter...
  • Children - The ultimate test in anger management
    Having just spent two full holiday weeks with my kids, it occurred to me this morning that raising young children is the ultimate test in an...
  • Coding the Liturgical Calendar
    For a long time, I've wanted to integrate the Roman Breviary into a couple of projects (nothing public) but have never been able to find...
  • Ubuntu: WebDAV + DAVfs2 + FUSE == Thunar Goodness
    One of the corner-stones of any *nix utility is that it should do a simple job and do it well. Every piece of software that I can think of ...
  • Fast Diet - Hunger Pangs
    When I am doing the Fast Diet , I frequently experience long periods of calm after a brief period of hunger pangs. It is as if the body has ...
  • ...and this is why I'm Catholic
    When I was looking for answers from the Methodist church about all the things I was wondering about as a teenager, I was dismayed to find t...
  • Fast Diet - Incredible Body Hack
    In terms of body hacks, the Fast Diet probably ranks all the way at the top for me. I first read about it in the papers and found the techn...
  • Jamming Flagpoles
    Today I read a report about Iran's alleged "flagpole jamming network".  Reading all of this, it became plainly obvious that, ...
  • Freeing up phone storage with Link2SD
    Another more powerful way of freeing up phone storage is with Link2SD . Using this method requires you to have a rooted phone. If you don...

Categories

  • a2dp
  • administrata
  • android
  • antivirus
  • avi
  • bluetooth
  • chrome
  • coding
  • culture
  • dos
  • eee
  • faith
  • family
  • fastdiet
  • firefox
  • gadgets
  • geeekry
  • geekery
  • hardware
  • homeschooling
  • howto
  • java
  • laptop
  • life and the universe
  • linguistics
  • link2sd
  • linux
  • migration
  • mp4
  • pdf
  • politics
  • printer
  • roomba
  • security
  • soapbox
  • software
  • transcode
  • travel
  • ubuntu
  • video
  • virtualization
  • webapps
  • windows

Blog Archive

  • ▼  2013 (11)
    • ▼  August (3)
      • 110GB+ worth of photos/videos on a microSD memory ...
      • 110GB+ worth of photos/videos on a microSD memory ...
      • Coding the Liturgical Calendar
    • ►  July (6)
    • ►  June (2)
  • ►  2012 (25)
    • ►  December (2)
    • ►  November (4)
    • ►  October (4)
    • ►  September (1)
    • ►  June (11)
    • ►  May (3)
  • ►  2011 (11)
    • ►  December (1)
    • ►  September (2)
    • ►  August (1)
    • ►  July (3)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (10)
    • ►  December (2)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
    • ►  July (1)
    • ►  May (1)
    • ►  March (1)
    • ►  February (1)
  • ►  2009 (29)
    • ►  December (2)
    • ►  November (2)
    • ►  September (1)
    • ►  August (3)
    • ►  July (2)
    • ►  June (5)
    • ►  May (2)
    • ►  April (2)
    • ►  March (6)
    • ►  February (3)
    • ►  January (1)
  • ►  2008 (57)
    • ►  November (2)
    • ►  October (4)
    • ►  September (1)
    • ►  July (8)
    • ►  June (3)
    • ►  May (8)
    • ►  April (12)
    • ►  March (6)
    • ►  February (8)
    • ►  January (5)
Powered by Blogger.

About Me

Unknown
View my complete profile