Updated Android SDK released
A new, updated Android SDK was released today.
Get it here:
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
A new, updated Android SDK was released today.
Get it here:
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
I wanted to mention that I’ve been looking for something like for this a bit — a USB key that comes with a way to install multiple Linux distributions. While at work, we primarily use Gentoo, we still have a Ubuntu server or CentOS install to do occasionally, and it would be nice to have a non-CD way of doing it.
Billix to the rescue!
This little 110MB download includes netinstalls for all of these distros: three Ubuntu installs (Feisty, Edgy, Dapper; both desktop and server editions), Debian Sarge and Edgy, Centos 5.1 and 4.6, Fedora Core 8. It also includes memtest86+, ntpwd, and DSL (Damn Small Linux.)
Give it a try if you have a use for it!
I wrote a BASH script that will run “optimize table” on any table fragmented. it’s pretty tidy, and you can supply usernames and passwords, and even run it against remote MySQL databases.
Here’s an example of it’s output:
root@lit [~]# mysqlFragFinder
MySQL fragmentation finder (and fixer) v0.7.2, written by Phil Dufault ( http://www.dufault.info/ )
Found 59 databases
Checking someforum_forum … found 1 fragmented table.
Optimizing log_online … done
Checking dufault_blog … found 2 fragmented tables.
Optimizing wp_comments … done
Optimizing wp_options … done
3 tables were fragmented, and were optimized.
I find this a great script — maybe a feature to add later is a way to prevent it from optimizing really large tables.
Here’s a link to the source:
mysqlFragFinder
Any other features you’d like to see in it? Comment!
I’ve been using this for the past two weeks:
MySQL Tuner
I’ve used on servers running on MySQL 4.0, or 5.1 lately to tweak their preformances. Itt’s an awesome script, and I recommend using it on any MySQL server you can find.
I recently learned of a newish OpenSSH feature, a feature that let’s you reuse existing SSH connections.
If you want to enable this functionality on a per-host basis, then you can setup your ~/.ssh/config file like this:
Host *
ControlMaster no
ControlPath ~/.ssh/master-%l-%h-%p-%r.sock
Host someserver
Compression yes
ControlMaster yes
To enable it:
ssh -f -N someserver
After that, just ssh in like you would normally:
ssh someserver
Combining this with SSH keys and keychain — that’s some fast SSHing. Enjoy!
Source for this article: http://www.revsys.com/writings/quicktips/ssh-faster-connections.html
There seems to be not a lot of information on Google about this, thus, I post.
At my work, the majority of our servers have hot-swappable drive bays — however, Linux doesn’t usually automatically notice the drive is gone. Worse, sometimes it doesn’t even notice new drives hooked up.
Now, SCSI and SAS both support hot-plugging on a protocol level, and SATA II does as well. If your chassis is equipped with a hotswap drive bays, then that’s all you really need. I haven’t noticed any problems with SATA I hotswaps, but they appear to be less successful.
A common task I need to do is either:
If the drive is in a RAID, or if it’s a separate sized drive for a disk upgrade, it’s a good idea to trigger the kernel driver to rescan information about the new disk.
In /sys/bus/scsi/devices, you’ll find a number of numbers that’ll correspond to your disk drives:
server devices # ls -1
0:0:0:0@
1:0:0:0@
2:0:0:0@
You can determine more information about the drive by cat’ing it’s model file:
server devices # cat "0:0:0:0/model"
ST3250410AS
Now, to cause the kernel to rescan the drive attached to the port, do this:
echo > "0:0:0:0/rescan"
Check dmesg now:
server devices # dmesg
---snip---
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
Now, that’s pretty exciting, as this can be used to skip a reboot. If you switch the drive, and trigger the rescan, it’ll update the drive information including the partition layout. Make sure you don’t swap out your main system drive, otherwise your computer will freeze, and there will be data loss and possibly corruption.
Sometimes, this strategy fails to work, and I don’t know why (and resort to rebooting.) I’m currently researching how to do this a bit better, I have a buggy script that I use to improve this method, but it’s not ready for public release yet. Does anyone have a better method? Please comment!
It came up in IRC today that there was a typing game called typespeed — one of the categories is “Unix Commands.” Better yet, this supports head to head networking mode, so you can play against people in your office, I didn’t even need to edit my firewall configuration on Ubuntu.
Playing your coworkers is good fun, give it a try!
To install libtidy in PHP5, it’s really quite easy.
Make sure your /tmp directory doesn’t have something like noexec set on it, otherwise this would be more difficult.
Here’s the install command:
pecl install http://pecl.php.net/get/tidy-1.2.tgz
Find where your main php.ini file is:
root@server [~]# php -i|grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
Add the module to your php.ini:
$EDITOR /usr/local/lib/php.ini
You’ll need to scroll down to the extensions area, I just keep searching for extension till I find it.
Add this line:
extension=tidy.so
Save, and restart your Apache web service:
service httpd restart
Test via phpinfo(); to make sure it’s working.
Today is the annual Sysadmin Day, so take the time and honour your hard working local sysadmins that keep things running.
Update: My boss bought me lunch as a present. Hooray!
This in from Martin’s page:
Update(24/7/08): I’ve repackaged the files in android.zip and updated a few things. Now you don’t need to copy 256M to your SD card, just put system.gz and data.gz on the card and the first time it boots they will be extracted to system.img and data.img (thanks to Kevin’s initramfs installer for the idea). Keep your data.img if you have saved anything on it and delete system.img to use the new stiff. Audio in calls should be better, vibrate on receiving calls and SMS should work better. When the screen is off only the power button should wake it up. SDHC cards should work better. Volume up and down are not left and right any more because i’m working on audio, they are useful for zooming in the browser too.
Looks pretty cool, I’m starting to get curious about what settings he’s changing, and where; a Changelog would be nice for each update.
Here’s Martin’s homepage:
http://it029000.massey.ac.nz/vogue/