Posts

Pull files off Android phone

Image
This assumes you have Android Debug Bridge (ADB) installed. This will pull all files from a directory in an Android phone. cd /path/to/destination/directory adb pull /path/to/source . As Julian says, "Easy-peasy, lemon squeezy." (I use this, by the way, since the Nexus 5 and OS X Mavericks refuse to work together in USB mode.)

Open URL in Chrome incognito mode from Terminal

/usr/bin/open -a "Google Chrome Canary" <url> --args --incognito (Works in 10.10.1, at least.)

Answered prayers

[tl;dr: God delivers. :-)] We started the year full of plans filled with hope and expectations. Some plans fell through, others were fulfilled in ways beyond what we imagined. In January, I went to Amsterdam for a job interview. It was exhilarating: my first time in Europe, interviewing for a dream job. I got to travel for free! Sadly, the offer didn't materialize. But, a few days after that, we received better news: kuya Gab got accepted to Pisay. That started the ball rolling as we brainstormed on whether to have him reside in a dorm or relocate with the entire family. We decided on the latter. After that, it was a mad scramble to look for a suitable place. There were doubts, for sure: can we financially support this, how will the kids cope? But one by one, the pieces fell into place. Through a church friend, we met people in Clark who helped point us in the right direction. We leased a unit inside Clark, very near Pisay. In a matter of days, we closed the de...

FIX: Postfix without MySQL dependency

MySQL client libraries has been bundled with Postfix in RHEL 5 . Unfortunately, this conflicts with the Oracle MySQL libraries when we try to update Postfix: ---> Package postfix.x86_64 2:2.3.3-6.el5 set to be updated --> Processing Dependency: mysql for package: postfix --> Running transaction check ---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be updated --> Processing Conflict: MySQL-client conflicts mysql --> Processing Conflict: MySQL-server conflicts mysql --> Processing Conflict: mysql conflicts MySQL --> Finished Dependency Resolution mysql-5.0.95-5.el5_9.x86_64 from Updates has depsolving problems --> mysql conflicts with MySQL-server MySQL-client-5.6.10-1.rhel5.i386 from installed has depsolving problems --> MySQL-client conflicts with mysql MySQL-server-5.6.10-1.rhel5.i386 from installed has depsolving problems --> MySQL-server conflicts with mysql Error: MySQL-server conflicts with mysql Error: mysql conflicts with MySQL-server Err...

Tough nut to crack

To exercise my (almost-non-existent) Python skillz, I wrote a script to generate passwords and passphrases from common words. The script ( in Github ) also computes the bit entropy of the generated passwords, and compares them against the plain words (without obfuscation). As a bonus, I also wrote a generator for XKCD's passphrase scheme : choose four random words from a word list, resulting in a higher entropy and better recall. The script uses four schemes -- well, three, actually, if you don't count the plain text version (for control): simple character substitutions (e.g. "@" for "a", "3" for "e", similar to " l337 $p3a|< ") and padding in-between words; padding short passwords with random characters; and the XKCD algorithm. Here's a test run using the word list from Linux, /usr/share/dict/words : Cryptogamia738314396617973004177668 35 208.40 0nl3pYUG%/50$?9&(.)+.70:01 The padding scheme produces p...

FIX: Cannot boot after vmware-tools installation

Ugh, more SLES 10 SP4 woes! A bunch of SLES 10 SP4 servers failed to boot after VMware tools were installed. Apparently, initrd did not load the necessary drivers and modules. This was a known issue that was fixed in a later version of vmware-tools . The VMware tools installer takes apart /etc/sysconfig/kernel , specifically the INITRD_MODULES directive, and reconstructs it by adding its modules ( vmxnet and vmxnet3 ). However, the new configuration removes the rest of the original modules: - INITRD_MODULES="piix mptspi processor thermal fan reiserfs dm_mod edd" + INITRD_MODULES="vmxnet vmxnet3" and rebuilds the initial ramdisk image with only these drivers. Hence, the server will fail to boot without the other devices. The workaround in the Novell site was to boot from a rescue disk, reconstruct the configuration file, and run mkinitrd . To prevent the boot failure, what we did was edit the config file right after the installer finishes. We then run /usr/bin/v...

FIX: Hung suse_register when connecting to local repo

We have legacy SLES 10 SP4 servers that needed to be rebuilt. After the usual AutoYaST unattended builds, we had to register it to a local repo managed using SMT (Subscription Management Tool, Novell's version of Red Hat Satellite). However, the registration to the Novell Customer Center hung. As it turned out, it was waiting for data from ZMD, the Zen Management daemon. However, the ZMD service thinks it's still busy and fails to respond accordingly. suse_register needs data from ZMD to determine the installed products to be sent to the Customer Center, and with a broken ZMD, it cannot continue and just hangs there. So, the ZMD service had to be restarted, but since it thinks it's still busy, the normal /etc/init.d/novell-zmd stop or rczmd stop invocations won't work. It had to be forcibly killed: killall -9 zmd After that, its cache, DB and log file needed to be removed: rm -rf /var/cache/zmd/web/* rm /var/lib/zmd/zmd.db /var/log/zmd-messages.log (The log file had to...