In recent Chrome versions (22 in my case on Ubuntu) it’s not possible to install user.js (Greasemonkey) scripts by just dragging them onto a window. Instead the script is downloaded and you see the following message:
“Extensions, apps and user scripts can only be added from the Chrome Web Store”
Fortunately the resolution is quite straight-forward. First download the script you want to a local directory/folder, then go to chrome://chrome/extensions/ and drag the user.js script there instead. This feature is designed to protect users from malicious installs and as long as you know the workaround to install user.js scripts it’s not too much of a big deal.
If you’re building packages with pbuilder sometimes you might hit something like the following errors which cause the build to fail because the dependencies can’t be found.
Err archive.ubuntu.com/ubuntu/ precise-updates/main devscripts i386 2.11.6ubuntu1.2
404 Not Found [IP: 91.189.92.188 80]
Err archive.ubuntu.com/ubuntu/ precise-updates/main openssl i386 1.0.1-4ubuntu5.2
404 Not Found [IP: 91.189.92.188 80]
The cause is the pbuilder image being out of date and some dep packages are no longer present becuase they’ve been superceded by more recent versions. The good news is the fix is really simple just run:
pbuilder-<dist> update
Which will update your pbuilder image and from there the dependency installation should work just fine.
I recently flashed my Htc Desire with CyanogenMod 7.1 and I have to say it’s great to be free of htc sense. Given the rigmarole around the official Gingerbread update for the Desire I don’t think my next phone will be an htc one.
Anyhow, prior to installing CM 7.1 I’d carefully made a nandroid backup with ClockWorkMod recovery. Having set everything up I chose a ringtone + notification sound. Having lived with it for a bit I realised I miss the old sounds from the stock desire rom. To recover them I needed to mount extract the system.img file and then push the old audio files to the correct place.
Warning: Please follow these steps at your own risk!
To extract .img files you’ll need unyaffs which can extract the files from a yaffs file system image. First copy the .img file into a directory. (For me the Nandroid img files were found in clockworkmod/backup/<date>/<foo>.img on the sdcard)
To compile unyaffs grab the unyaff.c and unyaffs.h from code.google.com/p/unyaffs/downloads/list and compile it with:
gcc -o unyaffs unyaffs.c
Once you’ve done that and added it to your path (alternatively copy it to /usr/local/bin).
Navigate to the directory containing the yaff img and run:
./unyaffs system.img
This will un-pack the files into that directory.
Once you have the files the next step is to get them onto your phone. To do that you’ll need the Android SDK to be installed and set-up.
When the SDK is there, connect your phone with the USB cable (with USB debugging enabled – Settings->Application->Development) run the following from the sdk’s platform-tools directory.
./adb reboot recovery
When the phone reboots to recovery mount the system partition.
Next as an example here’s the command I ran to copy the ringtones from the desire rom onto the phone:
./adb remount
./adb push /home/bungle/desire-system/media/audio/ringtones /system/media/audio/ringtones
This will copy all the files in the ringtones dir onto the phone.
I have vim set-up to use spaces in place of tabs. Sometimes you need to use an actual tab e.g. editing a Makefile. Now whilst it’s possible to change settings so that tabs are used for specific files, a quick tip to remember is to simply type in insert mode:
Ctrl+v tab
That is Ctrl and “V” and hit the tab key, et voila you’ve entered an actual tab.
A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc
# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"
Hat tip: mteckert on SuperUser.com
© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 1.784s.