Programming


So damn funny, yet so damn true.

Found in Apache logs…on a domain that doesn’t even have MySQL installed…

85.17.155.21 “GET /phpmyadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /myadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /PMA/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpmyadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/sysadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/sqladmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/db/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/web/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/pMA/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/mysql/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/myadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/webadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/mysqladmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpmyadmin2/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.2.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.2.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.5.1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.5.4/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.5.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.0/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.0-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.2-rc1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.3-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/phpMyAdmin-2.6.3-rc1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /db/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /web/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /PMA/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /mysql/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /myadmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /mysqladmin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /mysql-admin/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpmyadmin2/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.2.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.2.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.5.1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.5.4/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.5.6/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.0/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.0-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.2-rc1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.3/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.3-pl1/main.php HTTP/1.0″ 404 - “-” “-”
85.17.155.21 “GET /phpMyAdmin-2.6.3-rc1/main.php HTTP/1.0″ 404 - “-” “-”

Little know seq (sequence) utility is a great way to loop on a range of numbers in Linux. It came in very handy today and will hopefully stick in my brain in the future.

for i in `seq 1 10`
do
..
done

Amusing use of the ternary from our codebase..

log.debug( ( randomize ? "R" : "Not r" ) + "andomizing content" );

:)

Facebook development team has open-sourced their light-weight, cross-language development platform, Thrift.

I played around it with it for a while and it looks interesting enough, but I don’t have an immediate need for it.

Check it out if you have a cross-language environment Thrift currently supports C++, Java, Ruby, Python and PHP - a list that should satisfy most everyone.

A POSIX-compliant *NIX system is a requirement, but I’d be curious if it’s possible to get it up n’ running inside of Cygwin (as a development-only exercise, of course).

I discovered a large gap in my bash kung fun today - I had no idea how to loop on lines of data in a file.

It turns out that “while data” pulls off this trick quite nicely:


while read myline
  do $myline
done < inputfile

I haven’t been using “traditional” singletons for a couple of years now (Spring craze and all), so the Initialization On Demand Holder idiom, which allows for lazy instantiation of singletons, has escaped me until now.

private static class LazySomethingHolder {
    public static Something something = new Something();
}

public static Something getInstance() {
    return LazySomethingHolder.something;
}

Here’s the explanation, courtesy of Bill Pugh, Brian Goetz and friends.

Found via TheServerSide.

I was sick of typing in username/password for each login (I’m currently working on XP, deploying to a Linux-only env), so I finally went through the pain of following the steps here and set up PuTTY/Peagant public key authentication.

It was a relatively painless setup process, but here are a couple of things to keep in mind when going through it:

  • PuTTY is a pain to update/navigate as you have to remember to load/save during each setting update
  • You can “pre-enter” your remote username by setting “username@hostname” as the hostname
  • authorized_keys file on the remote box should have a mask of 600
  • putty.exe -load “session_name” allows you to create PuTTY shorcuts for each of your connections

Register is running a great story about how Bill Joy created vi.

Apparently, vi commands are cryptic because they were optimized for Bill’s 1200 baud connection.

For additional entertainment, you can read Reddit’s discussion of the article here - complete with (always entertaining) emacs/vi mud-slinging.

Can you find a friggin’ login link on http://www.tadalist.com/ or http://backpackit.com/?

It’s almost a joke.

Why can’t the self-proclaimed gurus of UIs figure out that their users want to SIGN IN some of the time AND NOT STARE AT FULL-PAGE ADS on home pages?

I was writing a multi-line batch script with multiple call-outs to Ant and I was confused when it kept exiting after the first call-out.

I’m proud to be rusty at batch scripting, so I’m not ashamed to share the (obvious) fix…

To run a batch program from within the current batch program, use the call command followed by the name of the batch program you wish to run. After the second program is finished, it will return to the command which follows the call command.

If you invoke a batch file without using the call command (from within a batch file that is), control passes over to the new batch program and does not return.

I’ve lost most of my respect for Aaron Swartz over this password debacle.

See more coverage here: Never store passwords in a database!

Next Page »