Tag: command line

join: the command

From the manual: [crayon-5f9d0d99755b1302048792/] I had two CSVs, baz01.csv and baz02.csv. They shared the same first column, which was a list of database table names. The second column contained the number of rows from each table. The row numbers between the two files were different, and I wanted to compare them. The join command to

something wicked this way comes

[crayon-5f9d0d99757f7344204989/] When I ping fujipi, it reports the correct IP – it’s in my hosts file! For the record, the host key should not have changed.

Getting folding@home cores downloaded

So I was trying to contribute some cycles to the Folding@Home project recently, and ran into a problem that took seemingly forever to figure out. The log.txt file showed that the core (the build of the executable that’s optimized for a given platform) wouldn’t download. [crayon-5f9d0d9975849259923747/]

AWK blows me away

How did I not know this about awk!? Don’t get me wrong, I’m no awk expert; I’m always using some of the most simple and obvious features it has. But I almost always use the -F option to specify the field separator. Until today, I thought you could only give it either a single character

MySQL engines, constraints & keys

I wanted to see how I could improve the performance of a MySQL database with mixed table engines by converting all the MyISAM tables to InnoDB, as well as make the huge DB responsive while backing up by using mysqldump with the --single-transaction option. I used the following PHP script (I know, spare me): [crayon-5f9d0d9975948000032341/]

VX ConnectBot

I had been using ConnectBot for a long time on my Android devices, because I wanted something to remotely administer machines without needing an actual laptop. It’s nice because the data plan is built-in to most mobiles, so one doesn’t necessarily need a wifi connection nearby. Unfortunately, it’s rather time-consuming and clumsy to use an

Probable compiler bug on Raspberry Pi

I was messing around with Varnish on my Pi and was a little peeved that it kept crashing right after start up. Turns out, this issue is well known to the Googles and everyone who’s tried to run it on the Pi, or at least on Raspbian like I am. If you try running Varnish

Just a little panicked

I nearly lost data permanently last night while trying to merge master and dev branches in my web server’s document root. Thankfully I had a not-so-recent backup that included all the uploaded media that I’d intentionally excluded from the git repo. Seems all is well now, but like every technology, Git is both wonderful and

Faster webserver on Raspberry Pi

The Raspberry Pi has a 32-bit ARM CPU running at 700MHz by default, although you can usually overclock them somewhat and still enjoy stable behavior. I’m running Raspbian, a Debian-based distribution built for the Pi. One thing that’s mildly annoying is that running WordPress on the Pi using Nginx and php-fpm has been dog slow,

glances

Great write up on the glances utility over here. [crayon-5f9d0d9975a2d143198685/]

enabled SSL/TLS on devolve

Big thanks to StartSSL for getting me set up with a signed certificate. Their FAQ on configuring with openssl and nginx worked like a charm. I even got a handy email from them after I thought I was done, telling me that I needed to concatenate the certificate they gave me with a sub cert

climagic is magic

If you’re not following @climagic, you should be forced to listen to this for hours on end: [crayon-5f9d0d9975a6d164620455/] That’s just one of the many glorious bits from this timeline.

Check certificates for known weak entropy

On Ubuntu/Debian, you can sudo apt-get install openssl-blacklist.Then just run the following: [crayon-5f9d0d9975a97690475969/] The last line of output is the most important; It should read “not blacklisted.” :-)

sed is great, but not that great

TIL: http://stackoverflow.com/questions/1103149/non-greedy-regex-matching-in-sed It turns out, sed has no concept of a non-greedy match. You have to use perl or some other advanced tool to get that regex feature. The workaround given at Stack Overflow only works if you have a single character ending match delimiter (in this case, it was [^/]+ to match until the

Seeing HTTP headers that a browser won’t show you

I learned today that tools like Firebug won’t display the headers on a file that would normally be downloaded (as opposed to say, displayed in a browser). The solution? The command line, of course. I wanted to make sure a web server was setting the right MIME type for an mp4 video. curl -I http://path.to/videos/vid.mp4