It needs more code

Kitchen Sink Included

Notes on KVM

leave a comment »

Sharing sound with the host:
export QEMU_AUDIO_DRV=alsa; kvm -hda $image_name.img -m 1024 -soundhw all

-hda = Hard disk image
-m = Memory
-soundhw = Sound Hardware

Written by cake

February 20, 2009 at 11:48 am

Posted in RandomHelp

Git Hook Caveat

leave a comment »

If you’re doing something that needs to change its directory to another place (like say, you have the unfortunate need to call an external repository to perform a subtree merge after your repository has been updated), the variable GIT_DIR needs to be unset for things to work properly.

Do:
unset GIT_DIR
in your bash script to make this happen.

References:
http://www.kernel.org/pub/software/scm/git/docs/howto/rebuild-from-update-hook.txt

Written by cake

January 16, 2009 at 9:34 am

Posted in RandomHelp

Adding an IP address to Debian/Ubuntu Linux

leave a comment »

# sudo vi /etc/network/interfaces

Your original will look something like this:


# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo eth0

iface lo inet loopback

iface eth0 inet static
address XXX.XXX.XXX.XXX
netmask 255.255.255.255
broadcast 0.0.0.0

Add the following below it to add another address to the same interface:


auto eth0:1
iface eth0:1 inet static
address XXX.XXX.XXX.XXX
netmask 255.255.255.255
broadcast 0.0.0.0

Exit.

# sudo /etc/init.d/networking restart

Ping the interface and check to see if the IP is up.

Written by cake

November 4, 2008 at 12:44 am

Installing mod_rails on CentOS

with one comment

First, you should follow this guide: http://wiki.rubyonrails.org/rails/pages/RailsOnCentos to install Rails and Ruby in general.

After you install RubyGems, install passenger by issuing gem install passenger.
After the installation completes, issue: passenger-install-apache2-module at the command prompt.
The installation steps should be straightforward, and it’ll tell you how to work through everything.

If you get the following error: cannot open /httpd/build/config_vars.mk: No such file or directory at /usr/sbin/apxs line 201 (this may appear at the beginning of running passenger-install-apache2-module), you need to install apr-devel. Issue yum install apr-devel to take care of that.

Written by cake

August 15, 2008 at 12:33 am

Posted in RandomHelp, RoR

Instaling Ubuntu Linux on the HP Pavilion tx25135cl

with one comment

The HP Pavilion tx25135cl is a 12.1″ laptop tablet. It comes with an AMD Turion X2 RM-70 processor clocked at 2.0Ghz per core. Along with an ATi Radeon 3200 HD, this makes it a part of the AMD Puma platform. It has 3GB of RAM, a 250GB hard drive, and is usually pre-installed with Windows Vista Home Premium.

All installation work was done on the Ubuntu alternative installer.

Things that need fixing:
Installation:
You will need to pass nolapic and acpi=off as kernel options, both for installation and normal boot. Not doing this results in a thermal warning (and subsequently a forced shutdown). Specifying other combinations is prone to causing a kernel panic (and subsequently a hard system lockup as a result).

Ethernet:
Realtek Ethernet is severely broken with the RTL8111/816B that gets loaded as stock.
A bug report for this is here: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/141343

The fastest way to fix this is to use Jameson William’s fixup. You will want to load the file there onto a USB stick. From a fresh Hardy install (alternative installer), the patch program was not installed, so you may need to grab a deb as well.

Grab the fixup here (read the instructions for it and install): http://www.jamesonwilliams.com/hardy-r8168.html
If you end up needing the patch utility, you can find it here: http://us.archive.ubuntu.com/ubuntu/pool/main/p/patch/
Select the appropriate architecture, download it onto your USB stick, and as root on the affected computer, issue a `dpkg -i patch_[version here]_[architecture here].deb` to install it.

Wireless:
Broadcom BCM4328 a/b/g/n

This Broadcom chipset is VERY nice, it does 802.11 a/b/g/n. However it doesn’t get recognized as stock, and thus it falls over on itself:

https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx/Feisty_No-Fluff#Testimonials

This did not work for me on the cl, even though others with similar configurations had working wireless configurations. This may change in the future.

At this point, I decided to return the laptop due to time constraints (I was not able to get to work on the video or tablet features). Hopefully this post helps somebody out.

Written by cake

July 21, 2008 at 7:16 pm

Posted in Uncategorized

Buying Steam games using Wine

with one comment

When you get an error that Firefox doesn’t know how to handle the Steam protocol, and you’re buying using PayPal, do the following in the same directory the Steam.exe executable is in. (This is usually ~/.wine/drive_c/Program Files/Steam/)

$ wine Steam.exe steam://paypal/return

This will cause your current Wine’d Steam to continue along properly to complete the purchase.

Written by cake

June 22, 2008 at 4:57 am

Posted in Uncategorized

Irssi with IRC Proxy on OpenWRT

leave a comment »

Irssi has this nifty feature that allows you to proxy through the client. This isn’t installed by default, and is not configured in the Makefile.

This will be a sparse walkthrough, until I can flesh it out more later. I did modify the Makefile using –with-proxy, but this didn’t seem to work (the ipkg contained only the binary irssi and other sparse files).

In any case, requirements:
OpenWRT SDK, with Irssi package
Copy the following from the SDK directory:

cd openwrt/build_dir/mipsel/irssi-0.8.10/src/irc/proxy/.libs
scp * root@openwrt:/usr/lib/irssi/modules/

Starting irssi and performing /LOAD proxy showed the following:
Warning: Warning!! Password not specified, everyone can use this proxy! Use
/set irssiproxy_password to set it
Warning: No proxy ports specified. Use /SET irssiproxy_ports =
= … to set them.
03:08 -!- Irssi: Loaded module proxy/irc

Resources:
http://www.irssi.org/documentation/proxy
http://wiki.openwrt.org/BuildingPackagesHowTo

Written by cake

April 27, 2008 at 3:07 am

Posted in RandomHelp

When setting up a Hadoop cluster..

leave a comment »

Make sure you clear out your /etc/hosts. I had plenty of hunting trying to figure out why the dfs daemon kept binding to localhost and how to unbind it.

For those interested in setting up a Hadoop cluster, go
here

Written by cake

March 25, 2008 at 9:43 am

Posted in Uncategorized

Enabling SSH keys on OpenWRT

leave a comment »

Your SSH keys should go into /etc/dropbear, and not into ~/.ssh/.

More documentation here, including how to generate DSA public/private keys.

Update: Keep in mind that regular users you create (by editing /etc/passwd), have their ssh keys in their home directories.

Written by cake

February 11, 2008 at 7:46 am

Posted in Uncategorized

Asking a question, on the Internet

leave a comment »

Here are four steps to get your question answered:
Step 1: Ask your question.
Step 2: Disguise yourself as another person (taking all the necessary precautions to ensure you’re another person).
Step 3: Respond with the most off-beat, crazy, put-your-knife-in-that-live-electrical-outlet-its-ok answer possible.
Step 4: Watch as people scramble to go “NO! DON’T DO THAT! DO IT THIS WAY (the correct way)”

If that fails, well… search ze web?

Written by cake

February 2, 2008 at 11:30 am

Posted in RandomHelp

Tagged with , ,