-
PHP Breadcrumbs
I just redid the bread crumbs code on my site to handle breadcrumbs without horribly mangling links containing slashes the query string. Details below.
-
Converting between DOS and Unix
Quick Overview DOS (and Windows) use different formats to mark the ned of a line in a text file. DOS uses a CR-LF, while Unix just uses a LF. There are many ways to switch between the formats.. some common ones are below Explicit Programs The programs dos2unix and unix2dos provide a simple way to […]
-
Careful of AWK Comments
Passing a script with comments from a shell script. If you’re like me, you write awk scripts by creating a file, let’s say script.sh, and it looks something like this (let’s say.. count lines where the 2nd comma-delimited number is greater than 3): #!/bin/sh<br /> awk -F, ‘BEGIN {<br /> # Minimum threashold<br /> THRESHHOLD=3<br […]
-
Full Matrix to Half Matrix
Quick Overview How to make a directed representation of a symetric matrix into an undirected representation. Overview That’s a long task. Really what it means is as follows. Suppose I have a matrix, let’s say, A[i,j]. Now, if A is sparse (that is, most of the elements are zero / null / any constant value), […]
-
Bezeq PPPoA with an Alcatel Speedtouch 510
Quick Overview Bezeq is the telephone company in Israel, and the supplier for ADSL lines here. Although one can sign up for any ISP they choose, all lines come from Bezeq, and use their setup. By default, the modems they give try and use PPTP or PPPoE, requiring a dialer program running on a PC. […]