# workaround to allow require_relative in ruby < 1.9.2
unless Kernel.respond_to?(:require_relative)
module Kernel
def require_relative(path)
require File.join(File.dirname(caller[0]), path.to_str)
end
end
end
Thursday, November 29, 2012
Ruby require_relative Backwards Compatibility
The following snippet can be used when using require_relative within ruby to ensure it is backwards compatible with older versions which do not contain require_relative:
Saturday, June 23, 2012
Upgrading to Ubuntu 12.04
Here are a few notes regarding upgrading to Ubuntu 12.04:
- Use a separate user for running the upgrade (I've had problems in the past whereby user settings were somehow modified and I was unable to restore them and had to resort to deleting and re-creating my user)
- Remember to show the terminal during the installation, as it prompts for input sometimes
- Following the installation, you may encounter this bug relating to permissions on ~/.config/nautilus-actions. The simple fix is to run the following:
chmod u+r ~/.config/nautilus-actions
Monday, June 11, 2012
Ubuntu on Mac Grey Screen on Boot
Some time ago, I posted what I believed was a fix for my Mac hanging on boot before booting Ubuntu. Unfortunately, this did not completely resolve the problem and I still occasionally experience problems. However, I am happy to say that I have found a solution which is yet to fail!
Next time you encounter the Mac sitting on the grey boot screen rather than booting Ubuntu, plug something into one of the USB drives (I normally plug in my usb thumb drive or a usb mouse). I don't know exactly what the Mac is trying to do when it waits on this screen rather than booting Ubuntu, but plugging something into a USB drive seems to make it break out of its looping state and start booting Ubuntu.
Next time you encounter the Mac sitting on the grey boot screen rather than booting Ubuntu, plug something into one of the USB drives (I normally plug in my usb thumb drive or a usb mouse). I don't know exactly what the Mac is trying to do when it waits on this screen rather than booting Ubuntu, but plugging something into a USB drive seems to make it break out of its looping state and start booting Ubuntu.
Saturday, February 25, 2012
Skype webcam on 64 bit ubuntu
After a bit of searching, I think I've got to the bottom of my built in isight camera not working with skype. The problem was that I didn't have the 32 bit libraries installed. To resolve, perform the following:
-
sudo apt-get install lib32v4l-0 libv4l-0 - Create a wrapper script within ~/bin/skype_wrapper/skype_wrapper.sh for starting skype containing the following:
- Within a terminal, run the following:
- You can then start skype by running the following from a terminal:
#!/usr/bin/env bash
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype
chmod +x ~/bin/skype_wrapper/skype_wrapper.sh
~/bin/skype_wrapper/skype_wrapper.sh
Add Missing apt-get Public Key
After updating your list of software sources within update manager, you may receive the following message:
'The action would require the installation of packages from non-authenticated sources'
To resolve, perform the following:
'The action would require the installation of packages from non-authenticated sources'
To resolve, perform the following:
- Open a terminal and run:
- Then take note of all the numbers (keys) after ‘NO_PUBKEY’
- Run the following for each missing public key:
- Finally, run the following:
sudo apt-get update
W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXXXX
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com XXXXXXXXXXXXXXXX
sudo apt-get update Saturday, December 17, 2011
Prevent Speaker Static in Ubuntu on Mac
One of the minor problems I've had since making the switch to ubuntu on a mac has been the static noises coming from the speakers. It's not loud and if there is any ambient noise around, it is almost impossible to hear, however after a bit of googling, I came across this post which suggests a fix which worked for me. In summary:
- Run the following from a terminal to create an init script:
- Make the script executable by running:
- Set the init script to run early in the startup sequence
echo -e '#!/bin/bash\nrmmod snd-hda-intel\nmodprobe snd-hda-intel' |
sudo tee /etc/init.d/soundrestart
sudo chmod +x /etc/init.d/soundrestart
sudo update-rc.d soundrestart start 10 2 3 4 5 .
sudo update-rc.d -f soundrestart remove &&
sudo rm /etc/init.d/soundrestart
Saturday, November 12, 2011
Ubuntu 11.10 on Mac - Take 2
I've now finished setting up my ubuntu installation on my MacBook Pro 2,2. A few tips to keep in mind are as follows:
- Use Partition Editor from within the ubuntu live disk to set the partion table to be dos prior to installation, otherwise you will encounter an error during installation when trying to install GRUB
- To reduce the time the system spends on the grey screen before booting ubuntu, insert the mac os x install disk, open a terminal and type the following:
bless --device /dev/disk0s1 --setBoot --legacy - To remove the red light from the headphone jack:
amixer set IEC958 off - Keep in mind that if trying to copy files from your Time Machine disk, you might not be able to read some folders. I got around this by using a friend's mac to copy the folders from my Time Machine disk to a FAT formatted disk which ubuntu could read
- BackInTime as my backup program
- Gvim
- VLC
- rcs
- texworks and texlive-latex-extra
Subscribe to:
Comments (Atom)