This is another way to have math in web pages. It’s not as portable as jsMath since MathML is not wildly supported yet. However, it allows executing the script from an external server and thus can be used on Blogger.
Category: Computer
jsMath
This is a very neat way to add math to a web page. It’s as easy to use as typing in TeX and much portable than the right way of doing such things.
base64 representation of current time
#!/bin/bash
time=$(date +%s%N)
s=$(for b in `bc<<<"obase=256;$time"`; do
j=000`bc<<<"obase=8;$b"`
j="\${j: -3}"
echo -n $j
done)
eval "echo $'$s'"|base64
remove duplicate paths from $PATH in BASH
Here is one that I came up with:
PATH=`awk -F: ‘{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$PATH`
torque, rsync, and selinux
Somehow, rsync dies quietly when run inside a qsub script if selinux is enabled (on a Fedora 7 system). I can by-pass this by changing the security context inside the script. However, this should be the job of torque. Anyway, make selinux permissive is the simplest way of dealing with it.
Tool for the Job
There is an old Chinese saying: “Doing a good job requires a good tool”. Here is a very good tool for my trade.
New Monitor
The old monitor suddenly went dark without warning. We went out and got a Samsung 205BW which features an 1680×1050 resolution. However, the on board VIA KM400 video card of my machine does not find any of the modelines gathered by DDC and refused to run at the optimal resolution. Luckily this post by Hendrik on the userforum at openchrome.org saved the day. The modeline mentioned on the page simply worked for me as posted. Many thanks to Hendrik!