June 30th, 2008 by Leons Petrazickis
I ran into a tiny pickle while installing the ibm_db gem on Ubuntu:
Select which gem to install
for your platform
(i486-linux
)
1.
ibm_db 0.9.5 (ruby
)
2.
ibm_db 0.9.5 (mswin32
)
3.
ibm_db 0.9.4 (ruby
)
4.
ibm_db 0.9.4 (mswin32
)
5.
Skip this gem
6.
Cancel installation
>
1
Building native extensions.
This could take a
while…
ERROR:
While executing gem …
(Gem::Installer::ExtensionBuildError
)
ERROR: Failed to build gem native extension.
ruby extconf.rb install ibm_db
extconf.rb:9:in `require’: no such file to load — mkmf (LoadError)
from extconf.rb:9
The problem is that mkmf isn’t included in the base Ruby package on Ubuntu. You need need the full development package to install gems from source. Installing it solves the problem.
sudo apt-get install ruby1.8-dev
Posted in db2, ruby | No Comments »
May 22nd, 2008 by Leons Petrazickis
I am looking for an online tool that takes a feed and then republishes in digest format — one entry per day. Feed Informer just does a straight, entry-for-entry republishing. Ditto for Feedburner.
This is for a Twitter feed, and Twitter Digest claims to do what I want, but it appears defective and unprofessional overall.
Any ideas?
Update: I found a Yahoo Pipes-based solution.
Posted in atom | No Comments »
April 15th, 2008 by Leons Petrazickis
Substantial content is in the pipes, but in the meantime here’s Arve Bersvendsen’s history meme:
history | awk ‘{a[$2]++ } END{for(i in a){print a[i] " " i}}’|sort -rn|head
In my cygwin:
52 python
44 ssh
33 exit
33 cd
18 ls
7 java
5 diff
4 nano
2 ping
1 svn
And on a Linux machine I administrate:
211 sudo
92 ls
80 cd
34 locate
14 nano
6 rm
6 exit
6 cp
3 tar
3 python2.4
I can survive in vi if pressed, but nano is my text-mode editor of choice. I do serious Linux development in Eclipse, Kate, or Kdevelop.
Posted in Uncategorized | No Comments »
March 4th, 2008 by Leons Petrazickis
TeXnicCenter is an excellent IDE for developing TeX documents on Windows. It follows the usual interface conventions and is quite helpful in getting started and debugging. TeX is the standard page layout language for writing mathematical and scientific papers.
Here are some excellent tutorials for getting started with TeX.
The IDE requires MikTeX for actually compiling TeX files into PDF, PS, and so on.
Posted in unix, tex | No Comments »
March 3rd, 2008 by Leons Petrazickis
After I installed Suse Linux Enterprise Desktop 10, I tried to update it. It prompted me for a root password even though the install hadn’t asked for one — it had only created a regular user. Sudo didn’t help.
I tried booting in single-user mode, but that also prompted me for the root password.
Finally, I appended init=/bin/bash to the Linux boot command in GRUB. That booted me in a passwordless command line, letting me run passwd and fix things.
Posted in unix | No Comments »
March 2nd, 2008 by Leons Petrazickis
One of the tables of my MediaWiki installation crashed. When I tried to repair it, I got this less-than-helpful error message. So did the mysqlcheck utility when I SSHed to the server. However, the command has extra options that can be used to repair high levels of corruptions, such as when the MYI is missing.
REPAIR TABLE tablename USE_FRM;
Posted in mysql | No Comments »
January 23rd, 2008 by Leons Petrazickis
John Resig writes very positively about Jaxer. It runs Javascript on the server while serving documents to the client, with seamless communication between JS on the client and JS on the server.
Jaxer provides:
- Full DOM on the server
- Shared code between client and server
- Database, file, and socket access from JavaScript
- Familiar APIs
- Integration with PHP, Java, Rails, etc. apps
In other news, IE8 will use the latest rendering mode by default for documents with the HTML5 doctype:
<!DOCTYPE html>
Finally, Good Math has a published a good defense of Google’s MapReduce algorithm.
Posted in javascript, ajax, html | No Comments »
January 22nd, 2008 by Leons Petrazickis
Posted in html | No Comments »
January 22nd, 2008 by Leons Petrazickis
After an internal build of Internet Explorer 8 passed the Acid2 test, they’ve announced that the new engine will only be used for sites with a special, opt-in meta tag:
<!– IE8 engine –>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<!– latest engine –>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
It can also be triggered from the server via an HTTP header:
X-UA-Compatible: IE=8;
Firefox is unlikely to follow suit.
In other news, John Resig has done some testing on sub-pixel rounding across browsers.
Posted in javascript, css, html | No Comments »
December 20th, 2007 by Leons Petrazickis
Base2 has just come out in beta on Google Code. It’s hosted there and can be included straight off the Google Code server.
I think it’s a really neat library because it basically fixes all browsers so that the built-in DOM, events, etc work the same way. Instead of providing an API of its own, it makes the existing API work consistently and reliably.
Base2 Features:
- A fast implementation of the Selectors API
- Fixes broken browser implementations of the DOM events module including document.createEvent(), dispatchEvent(), addEventListener(), etc
- Supports DOMContentLoaded
- Fixes getAttribute()/hasAttribute()/setAttribute() (Internet Explorer)
- Implements a few other useful DOM methods like getComputedStyle() and compareDocumentPosition()
- Supports a variety of browsers including ancient browsers like IE5.0 (Windows and Mac)
Dean Edwards has also done the excellent Packer Javascript minifier. It has probably the most in-depth support for obscure language features that simpler minifiers tend to mangle.
Posted in javascript, ajax, base2 | No Comments »