Muffinresearch Labs by Stuart Colville

Can’t install user.js in Google Chrome | 0 Comments

Posted in Browsers on 1st October 2012, 8:36 am by Stuart

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:

spacer

“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.

Post Tools

  • Permalink
  • Comments
  • Feed
  • Tag it!

Fixing pbuilder dependency 404 errors | 0 Comments

Posted in Linux/Unix on 15th September 2012, 12:45 pm by Stuart

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.

Post Tools

  • Permalink
  • Comments
  • Feed
  • Tag it!

Recover Files from Nandroid Backup | 1 Comment

Posted in Code, Mobile on 27th October 2011, 10:42 pm by Stuart

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!

Compiling unyaffs

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.

Getting Files onto a Rooted Phone

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.

Post Tools

  • Permalink
  • Comments
  • Feed
  • Tag it!

Insert a tab character in vim when expand tabs is on|(0)

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.

GNU screen: open tab in current working directory|(1)

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

Archive Categories

  • Apple
  • Browsers
  • Code
  • Coffee
  • CSS
  • Design
  • Events
  • Film
  • Geek
  • General
  • Hosting
  • humour
  • Life
  • Linux/Unix
  • Mobile
  • Muffin Research Labs
  • Music
  • News
  • performance
  • Project Fondue
  • Python
  • security
  • Slides
  • Snippets
  • social
  • Software
  • Tech
  • Web 2.0
  • Web Standards
  • Work
  • WSG

Last 12 months

  • October 2012
  • September 2012
  • November 2011
  • October 2011
  • August 2011
  • March 2011
  • February 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010

Lab Syndication

  • Full Fat RSS
  • Skimmed RSS
  • Snippets RSS

Technorati

  • Blogs that link here
  • View my profile

Events and Notices

  • spacer

Hot Muffins

  • Microsoft Access Training
  • Dana Hammond
  • Name Badges By Badgemaster

Friends

  • Andy Hume – Usable Type
  • Chris Heilmann
  • Drew McLellan
  • Ed Eliot
  • John McKerrell
  • Richard Keen
  • Robert Nyman
  • Shane Shepherd
  • Snook.ca
  • Tim Huegdon
  • Tom Croucher

Worthy Reads

  • // Hicksdesign
  • Clagnut
  • Ian Lloyd
  • Veerle’s Blog

Recommended Sites

  • Cafe Research
  • CSS Beauty
  • Favicon Generator
  • Permissions Calculator
  • Project Fondue
  • Project Fondue Blog
  • Stuart Colville
  • Website Performance

Photos on Flickr

© 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.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.